YinBin 1 år sedan
incheckning
a365557c50
100 ändrade filer med 13076 tillägg och 0 borttagningar
  1. 2 0
      README.md
  2. 317 0
      cwfx.iml
  3. 232 0
      pom.xml
  4. 584 0
      src/cwfx.sql
  5. 248 0
      src/main/java/com/post/action/AnalysisAction.java
  6. 122 0
      src/main/java/com/post/action/AnnounceAction.java
  7. 127 0
      src/main/java/com/post/action/AuditAction.java
  8. 90 0
      src/main/java/com/post/action/AuthAction.java
  9. 38 0
      src/main/java/com/post/action/BaseAction.java
  10. 177 0
      src/main/java/com/post/action/BudgetAction.java
  11. 266 0
      src/main/java/com/post/action/CostAction.java
  12. 91 0
      src/main/java/com/post/action/DeptAction.java
  13. 79 0
      src/main/java/com/post/action/DownAction.java
  14. 119 0
      src/main/java/com/post/action/DownloadAction.java
  15. 93 0
      src/main/java/com/post/action/FileAction.java
  16. 92 0
      src/main/java/com/post/action/KindAction.java
  17. 117 0
      src/main/java/com/post/action/KmlzAction.java
  18. 119 0
      src/main/java/com/post/action/LinkAction.java
  19. 116 0
      src/main/java/com/post/action/MenuAction.java
  20. 90 0
      src/main/java/com/post/action/ProjectAction.java
  21. 100 0
      src/main/java/com/post/action/RoleAction.java
  22. 90 0
      src/main/java/com/post/action/ShangpinAction.java
  23. 201 0
      src/main/java/com/post/action/UploadAction.java
  24. 171 0
      src/main/java/com/post/action/UploadFileAction.java
  25. 179 0
      src/main/java/com/post/action/UserAction.java
  26. 33 0
      src/main/java/com/post/action/VerifyCodeAction.java
  27. 90 0
      src/main/java/com/post/action/ZrzxAction.java
  28. 92 0
      src/main/java/com/post/action/kjkmAction.java
  29. 21 0
      src/main/java/com/post/comparator/AuthComparator.java
  30. 16 0
      src/main/java/com/post/comparator/DeptComparator.java
  31. 16 0
      src/main/java/com/post/comparator/KindComparator.java
  32. 21 0
      src/main/java/com/post/comparator/MenuComparator.java
  33. 18 0
      src/main/java/com/post/comparator/NameComparator.java
  34. 16 0
      src/main/java/com/post/comparator/RoleMenuComparator.java
  35. 24 0
      src/main/java/com/post/comparator/SizeComparator.java
  36. 16 0
      src/main/java/com/post/comparator/SubjectComparator.java
  37. 18 0
      src/main/java/com/post/comparator/TypeComparator.java
  38. 164 0
      src/main/java/com/post/dao/BaseDaoI.java
  39. 238 0
      src/main/java/com/post/dao/impl/BaseDaoImpl.java
  40. 117 0
      src/main/java/com/post/excelTools/ExcelBean.java
  41. 529 0
      src/main/java/com/post/excelTools/ExcelUtils.java
  42. 61 0
      src/main/java/com/post/excelTools/FormulaProcessor.java
  43. 732 0
      src/main/java/com/post/excelTools/JsGridReportBase.java
  44. 266 0
      src/main/java/com/post/excelTools/TableColumn.java
  45. 323 0
      src/main/java/com/post/excelTools/TableData.java
  46. 92 0
      src/main/java/com/post/excelTools/TableDataCell.java
  47. 115 0
      src/main/java/com/post/excelTools/TableDataRow.java
  48. 161 0
      src/main/java/com/post/excelTools/TableHeaderMetaData.java
  49. BIN
      src/main/java/com/post/excelTools/module.xls
  50. BIN
      src/main/java/com/post/excelTools/module1.xls
  51. 196 0
      src/main/java/com/post/excelUtil/DateUtil.java
  52. 202 0
      src/main/java/com/post/excelUtil/ExcelUtils.java
  53. 37 0
      src/main/java/com/post/interceptor/AuthInterceptor.java
  54. 19 0
      src/main/java/com/post/interceptor/EncodingInterceptor.java
  55. 42 0
      src/main/java/com/post/interceptor/SessionFilter.java
  56. 23 0
      src/main/java/com/post/interceptor/SessionInterceptor.java
  57. 43 0
      src/main/java/com/post/listener/OgnlSecurityListener.java
  58. 106 0
      src/main/java/com/post/model/Tannounce.java
  59. 133 0
      src/main/java/com/post/model/Tauth.java
  60. 318 0
      src/main/java/com/post/model/Tbudget.java
  61. 319 0
      src/main/java/com/post/model/Tcost.java
  62. 166 0
      src/main/java/com/post/model/Tdept.java
  63. 106 0
      src/main/java/com/post/model/Tdownload.java
  64. 182 0
      src/main/java/com/post/model/Tfile.java
  65. 109 0
      src/main/java/com/post/model/Tkind.java
  66. 110 0
      src/main/java/com/post/model/Tkmlz.java
  67. 106 0
      src/main/java/com/post/model/Tlink.java
  68. 133 0
      src/main/java/com/post/model/Tmenu.java
  69. 84 0
      src/main/java/com/post/model/Tproject.java
  70. 107 0
      src/main/java/com/post/model/Trole.java
  71. 73 0
      src/main/java/com/post/model/TroleTauth.java
  72. 73 0
      src/main/java/com/post/model/TroleTmenu.java
  73. 73 0
      src/main/java/com/post/model/Tshangpin.java
  74. 120 0
      src/main/java/com/post/model/Tsubject.java
  75. 202 0
      src/main/java/com/post/model/Tuser.java
  76. 73 0
      src/main/java/com/post/model/TuserTrole.java
  77. 206 0
      src/main/java/com/post/model/Tzdywys.java
  78. 84 0
      src/main/java/com/post/model/Tzrzx.java
  79. 53 0
      src/main/java/com/post/pageModel/Analysis.java
  80. 96 0
      src/main/java/com/post/pageModel/Announce.java
  81. 119 0
      src/main/java/com/post/pageModel/Auth.java
  82. 376 0
      src/main/java/com/post/pageModel/Budget.java
  83. 411 0
      src/main/java/com/post/pageModel/Cost.java
  84. 69 0
      src/main/java/com/post/pageModel/CostPrint.java
  85. 35 0
      src/main/java/com/post/pageModel/DataGrid.java
  86. 111 0
      src/main/java/com/post/pageModel/Dept.java
  87. 95 0
      src/main/java/com/post/pageModel/Download.java
  88. 179 0
      src/main/java/com/post/pageModel/File.java
  89. 32 0
      src/main/java/com/post/pageModel/Json.java
  90. 92 0
      src/main/java/com/post/pageModel/Kind.java
  91. 121 0
      src/main/java/com/post/pageModel/Kmlz.java
  92. 101 0
      src/main/java/com/post/pageModel/Link.java
  93. 130 0
      src/main/java/com/post/pageModel/Menu.java
  94. 74 0
      src/main/java/com/post/pageModel/Project.java
  95. 26 0
      src/main/java/com/post/pageModel/Pzh.java
  96. 112 0
      src/main/java/com/post/pageModel/Role.java
  97. 87 0
      src/main/java/com/post/pageModel/SessionInfo.java
  98. 74 0
      src/main/java/com/post/pageModel/Shangpin.java
  99. 138 0
      src/main/java/com/post/pageModel/Subject.java
  100. 61 0
      src/main/java/com/post/pageModel/TjNormal.java

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+![系统登录](http://git.oschina.net/uploads/images/2016/0501/232103_272882f4_619849.png "在这里输入图片标题")
+![系统管理](http://git.oschina.net/uploads/images/2016/0501/232036_761fc23f_619849.png "在这里输入图片标题")

+ 317 - 0
cwfx.iml

@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
+        </webroots>
+      </configuration>
+      <facet type="struts" name="Struts">
+        <configuration>
+          <option name="myStrutsValidationEnabled" value="true" />
+          <option name="myTilesValidationEnabled" value="true" />
+          <option name="myValidatorValidationEnabled" value="true" />
+          <option name="myReportErrorsAsWarnings" value="true" />
+          <option name="mySuppressPropertiesValidation" value="false" />
+        </configuration>
+      </facet>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration>
+        <fileset id="fileset" name="Spring Application Context" removed="false">
+          <file>file://$MODULE_DIR$/src/main/resources/spring-hibernate.xml</file>
+          <file>file://$MODULE_DIR$/src/main/resources/spring.xml</file>
+        </fileset>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: javax.servlet:jstl:1.2" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet.jsp:jsp-api:2.2.1-b03" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.24" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.7" level="project" />
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:jconsole:1.8.0">
+        <CLASSES>
+          <root url="jar://C:/tools/Java/jdk1.8.0_45/lib/jconsole.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:tools:1.8.0">
+        <CLASSES>
+          <root url="jar://C:/tools/Java/jdk1.8.0_45/lib/tools.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.7.2" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:4.2.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.0.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.15.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:4.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.struts:struts2-core:2.3.12" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.struts.xwork:xwork-core:2.3.12" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm:3.3" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm-commons:3.3" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm-tree:3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.19" level="project" />
+    <orderEntry type="library" name="Maven: ognl:ognl:3.0.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.struts:struts2-spring-plugin:2.3.12" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.struts:struts2-convention-plugin:2.3.12" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:3.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.11" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
+    <orderEntry type="library" name="Maven: bsh:bsh:1.3.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="struts-struts" level="project" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterAutoMake" value="false" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.annotationGutterIconEnabled" value="true" />
+        <entry key="property.annotationSuppressWarningsClass" value="edu.umd.cs.findbugs.annotations.SuppressFBWarnings" />
+        <entry key="property.annotationTextRangeMarkupEnabled" value="true" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="AtomicityProblem" value="true" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="BuildStringPassthruGraph" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckRelaxingNullnessAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CovariantArrayAssignment" value="false" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DefaultEncodingDetector" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="ExplicitSerialization" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindComparatorProblems" value="true" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNoSideEffectMethods" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="false" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="false" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRoughConstants" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUseOfNonSerializableValue" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FindUselessObjects" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="FunctionsThatMightBeMistakenForProcedures" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientIndexOf" value="false" />
+        <entry key="InefficientInitializationInsideLoop" value="false" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="false" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InitializeNonnullFieldsInConstructor" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="IntCast2LongAsInstant" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableEnum" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="false" />
+        <entry key="NoteNonnullReturnValues" value="false" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OptionalReturnNull" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantConditions" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TestingGround2" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainLongInstantfParams" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>

+ 232 - 0
pom.xml

@@ -0,0 +1,232 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>japost</groupId>
+	<artifactId>cwfx</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<packaging>war</packaging>
+	<name />
+	<description />
+
+	<properties>
+		<!-- 指明使用JDK7 -->
+		<java-version>1.7</java-version>
+		<!-- 指明使用utf-8编码 -->
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+	
+	<!-- 指定Maven仓库 -->
+	<repositories>
+		<!-- oschina的maven仓库 -->
+		<repository>
+			<id>oschinaRepository</id>
+			<name>local private nexus</name>
+			<url>http://maven.oschina.net/content/groups/public/</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</repository>
+
+		<!-- 官方maven仓库 -->
+		<!-- <repository> <id>maven</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url>http://repo1.maven.org/maven2</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> -->
+	</repositories>
+
+	<!-- 指定maven plugin仓库 -->
+	<pluginRepositories>
+		<!-- oschina的maven plugin仓库 -->
+		<pluginRepository>
+			<id>oschinaPluginRepository</id>
+			<name>local private nexus</name>
+			<url>http://maven.oschina.net/content/groups/public/</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</pluginRepository>
+	</pluginRepositories>
+
+	<dependencies>
+		<!-- jstl -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.2.1-b03</version>
+			<scope>provided</scope>
+		</dependency>
+		<!-- fastJson -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.3</version>
+		</dependency>
+		<!-- mysql数据库驱动 -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>5.1.24</version>
+		</dependency>
+		<!-- sql server数据库驱动 -->
+		<!-- <dependency> <groupId>net.sourceforge.jtds</groupId> <artifactId>jtds</artifactId> 
+			<version>1.2.4</version> </dependency> -->
+		<!-- oracle数据库驱动 -->
+
+
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<!-- druid -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.0.7</version>
+		</dependency>
+		<!-- aspectjweaver -->
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+			<version>1.7.2</version>
+		</dependency>
+		<!-- servlet -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<!-- log4j -->
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+		</dependency>
+		<!-- junit -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.11</version>
+			<scope>test</scope>
+		</dependency>
+		<!-- hibernate4 -->
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-core</artifactId>
+			<version>4.2.0.Final</version>
+		</dependency>
+		<!-- struts2 -->
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts2-core</artifactId>
+			<version>2.3.12</version>
+			<exclusions>
+				<exclusion>
+					<groupId>javassist</groupId>
+					<artifactId>javassist</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts2-spring-plugin</artifactId>
+			<version>2.3.12</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts2-convention-plugin</artifactId>
+			<version>2.3.12</version>
+		</dependency>
+		<!-- spring3 -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-core</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-beans</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-expression</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-orm</artifactId>
+			<version>3.2.2.RELEASE</version>
+		</dependency>
+		<!-- excel操作类 POI -->
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi</artifactId>
+			<version>3.11</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>3.11</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml-schemas</artifactId>
+			<version>3.11</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.8.3</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>bsh</groupId>
+			<artifactId>bsh</artifactId>
+			<version>1.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>2.6</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.7</source>
+					<target>1.7</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 584 - 0
src/cwfx.sql

@@ -0,0 +1,584 @@
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : local
+Source Server Version : 50536
+Source Host           : localhost:3306
+Source Database       : cwfx
+
+Target Server Type    : MYSQL
+Target Server Version : 50536
+File Encoding         : 65001
+
+Date: 2016-05-01 23:02:28
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for tannounce
+-- ----------------------------
+DROP TABLE IF EXISTS `tannounce`;
+CREATE TABLE `tannounce` (
+  `CID` varchar(36) NOT NULL,
+  `CCONTENT` longtext,
+  `CCREATEDATE` datetime DEFAULT NULL,
+  `CMODIFYDATE` datetime DEFAULT NULL,
+  `CTITLE` varchar(200) DEFAULT NULL,
+  `USERID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK849E0DD2D65CDBF` (`USERID`),
+  CONSTRAINT `FK849E0DD2D65CDBF` FOREIGN KEY (`USERID`) REFERENCES `tuser` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tannounce
+-- ----------------------------
+INSERT INTO `tannounce` VALUES ('87f3a646-2b99-42b2-a435-f0ab6cea7a41', '2016年五一放假三天', '2016-04-30 21:48:03', '2016-04-30 21:48:03', '五一放假通知', '1');
+
+-- ----------------------------
+-- Table structure for tauth
+-- ----------------------------
+DROP TABLE IF EXISTS `tauth`;
+CREATE TABLE `tauth` (
+  `CID` varchar(36) NOT NULL,
+  `CDESC` varchar(200) DEFAULT NULL,
+  `CNAME` varchar(100) NOT NULL,
+  `CSEQ` decimal(22,0) DEFAULT NULL,
+  `CURL` varchar(5000) DEFAULT NULL,
+  `CPID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK690841C5F603FBE` (`CPID`),
+  CONSTRAINT `FK690841C5F603FBE` FOREIGN KEY (`CPID`) REFERENCES `tauth` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tauth
+-- ----------------------------
+INSERT INTO `tauth` VALUES ('9fba5577-0a5c-49fc-b033-9713ace053f3', null, '管理员', '1', '/analysisAction!subject.action,/auditAction!auditManager.action,/budgetAction!budgetManager.action,/costAction!costManager.action,/kmlzAction!kmlzAdd.action,/analysisAction!funds.action,/userAction!userManager.action,/menuAction!menuManager.action,/authAction!authManager.action,/roleAction!roleManager.action,/deptAction!deptManager.action,/announceAction!announceManager.action,/linkAction!linkManager.action,/fileAction!fileManager.action,/kindAction!kindManager.action,/kjkmAction!kjkmManager.action,/projectAction!projectManager.action,/shangpinAction!shangpinManager.action,/zrzxAction!zrzxManager.action,/downloadAction!downloadManager.action,/authAction!authEdit.action', null);
+
+-- ----------------------------
+-- Table structure for tbudget
+-- ----------------------------
+DROP TABLE IF EXISTS `tbudget`;
+CREATE TABLE `tbudget` (
+  `CID` varchar(36) NOT NULL,
+  `CAUDITFILENAME` varchar(200) DEFAULT NULL,
+  `CAUDITFILEPATH` varchar(200) DEFAULT NULL,
+  `CCREATEDATE` datetime DEFAULT NULL,
+  `CDATE` date DEFAULT NULL,
+  `CFYCY` double DEFAULT NULL,
+  `CMODIFYDATE` datetime DEFAULT NULL,
+  `CSJ` double DEFAULT NULL,
+  `CSJFY` double DEFAULT NULL,
+  `CSJQSSJ` date DEFAULT NULL,
+  `CSTATE` int(11) DEFAULT NULL,
+  `CTOTAL` double DEFAULT NULL,
+  `CYJFY` double DEFAULT NULL,
+  `CYJLR` double DEFAULT NULL,
+  `CYJQSSJ` date DEFAULT NULL,
+  `CYJYWLS` double DEFAULT NULL,
+  `CYT` double DEFAULT NULL,
+  `CYTCY` double DEFAULT NULL,
+  `CDEPTID` varchar(36) DEFAULT NULL,
+  `CFILEID` varchar(36) DEFAULT NULL,
+  `CPROJECTID` varchar(36) DEFAULT NULL,
+  `CUSERID` varchar(36) DEFAULT NULL,
+  `CZRZXID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FKA62D88B984A42656` (`CDEPTID`),
+  KEY `FKA62D88B988452304` (`CFILEID`),
+  KEY `FKA62D88B91EA8957C` (`CPROJECTID`),
+  KEY `FKA62D88B9A26EB7E2` (`CUSERID`),
+  KEY `FKA62D88B9AAF4C278` (`CZRZXID`),
+  CONSTRAINT `FKA62D88B91EA8957C` FOREIGN KEY (`CPROJECTID`) REFERENCES `tproject` (`CID`),
+  CONSTRAINT `FKA62D88B984A42656` FOREIGN KEY (`CDEPTID`) REFERENCES `tdept` (`Cid`),
+  CONSTRAINT `FKA62D88B988452304` FOREIGN KEY (`CFILEID`) REFERENCES `tfile` (`CID`),
+  CONSTRAINT `FKA62D88B9A26EB7E2` FOREIGN KEY (`CUSERID`) REFERENCES `tuser` (`CID`),
+  CONSTRAINT `FKA62D88B9AAF4C278` FOREIGN KEY (`CZRZXID`) REFERENCES `tzrzx` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tbudget
+-- ----------------------------
+INSERT INTO `tbudget` VALUES ('70ac5bbb-deb3-44b7-bdcc-39c8b19e0494', '', '', '2016-05-01 22:08:01', null, '988', '2016-05-01 22:25:16', '123', '1111', '2016-05-01', '3', '1234', '123', '12345', '2016-04-26', '123456', null, null, 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', '92497c94-0e9d-4f7f-acd2-7e8b4e21e110', '27c2ae69-3df3-4c50-a7f4-3a98371ece4f', '1', '6efd229a-349e-4bab-add2-3b56cee42538');
+INSERT INTO `tbudget` VALUES ('9c75ff48-c6be-4b63-8d90-906729be41e3', null, null, '2016-04-30 22:53:08', null, null, '2016-05-01 00:12:23', null, null, null, '3', null, '1', '1', '2016-04-13', '1', null, null, 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', '56ba71da-49dd-40c8-b1bf-f2e181f4a7b7', '27c2ae69-3df3-4c50-a7f4-3a98371ece4f', '1', '3720c808-56db-4649-9e0b-4f05de158095');
+
+-- ----------------------------
+-- Table structure for tcost
+-- ----------------------------
+DROP TABLE IF EXISTS `tcost`;
+CREATE TABLE `tcost` (
+  `CID` varchar(36) NOT NULL,
+  `CAMOUNT` double DEFAULT NULL,
+  `CBH` varchar(20) DEFAULT NULL,
+  `CCREATEDATE` datetime DEFAULT NULL,
+  `CDATE` date DEFAULT NULL,
+  `CFX` varchar(10) DEFAULT NULL,
+  `CISZD` int(11) DEFAULT NULL,
+  `CLZFS` varchar(20) DEFAULT NULL,
+  `CMODIFYDATE` datetime DEFAULT NULL,
+  `CPROGRESS` int(11) DEFAULT NULL,
+  `CPZH` varchar(30) DEFAULT NULL,
+  `CRZSX` varchar(4) DEFAULT NULL,
+  `CSHIYOU` longtext,
+  `CSJ` double DEFAULT NULL,
+  `CXZ` varchar(8) DEFAULT NULL,
+  `CGSYS` varchar(36) DEFAULT NULL,
+  `CDEPTMENT` varchar(36) DEFAULT NULL,
+  `CGUILEI` varchar(36) DEFAULT NULL,
+  `CPROJECT` varchar(36) DEFAULT NULL,
+  `CSHANGPIN` varchar(36) DEFAULT NULL,
+  `CKJKM` varchar(36) DEFAULT NULL,
+  `CUSERID` varchar(36) DEFAULT NULL,
+  `CZRZX` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK691564160554B7C` (`CGSYS`),
+  KEY `FK6915641EE290499` (`CDEPTMENT`),
+  KEY `FK69156418AA4187A` (`CGUILEI`),
+  KEY `FK6915641F53C85E1` (`CPROJECT`),
+  KEY `FK6915641D049DE51` (`CSHANGPIN`),
+  KEY `FK691564184574082` (`CKJKM`),
+  KEY `FK6915641A26EB7E2` (`CUSERID`),
+  KEY `FK691564164E9279D` (`CZRZX`),
+  CONSTRAINT `FK691564160554B7C` FOREIGN KEY (`CGSYS`) REFERENCES `tbudget` (`CID`),
+  CONSTRAINT `FK691564164E9279D` FOREIGN KEY (`CZRZX`) REFERENCES `tzrzx` (`CID`),
+  CONSTRAINT `FK691564184574082` FOREIGN KEY (`CKJKM`) REFERENCES `tsubject` (`CID`),
+  CONSTRAINT `FK69156418AA4187A` FOREIGN KEY (`CGUILEI`) REFERENCES `tkind` (`CID`),
+  CONSTRAINT `FK6915641A26EB7E2` FOREIGN KEY (`CUSERID`) REFERENCES `tuser` (`CID`),
+  CONSTRAINT `FK6915641D049DE51` FOREIGN KEY (`CSHANGPIN`) REFERENCES `tshangpin` (`CID`),
+  CONSTRAINT `FK6915641EE290499` FOREIGN KEY (`CDEPTMENT`) REFERENCES `tdept` (`Cid`),
+  CONSTRAINT `FK6915641F53C85E1` FOREIGN KEY (`CPROJECT`) REFERENCES `tproject` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tcost
+-- ----------------------------
+INSERT INTO `tcost` VALUES ('60b604b3-d8ec-4845-8801-a8ad4a4d3bbe', '123456', '123412', '2016-05-01 22:30:09', '2016-05-01', '借', '1', '银行', '2016-05-01 22:30:09', '1', null, '正常', 'danfan', '0', '正常', null, 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', null, null, 'a3309e8d-0b53-4828-889d-ab5ce558a01b', '111', '1', '94a74c4c-d400-46e7-ae00-fd4189528d81');
+INSERT INTO `tcost` VALUES ('749895bb-f270-48de-8578-1bc449d302ce', '123452134', '12342134', '2016-05-01 00:17:06', '2016-05-01', '借', '2', '现金', '2016-05-01 00:17:06', '2', '123243', '正常', '餐饮费', '1234', '正常', null, 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', '68e2caab-76ce-4263-8c19-85454d398799', '27c2ae69-3df3-4c50-a7f4-3a98371ece4f', '4882d575-4445-4422-b74d-c2bf2f5ba67c', '123', '1', '3720c808-56db-4649-9e0b-4f05de158095');
+INSERT INTO `tcost` VALUES ('c8ff6774-ac94-4910-9fec-92b23d864d64', '123', '1', '2016-05-01 22:06:54', '2016-04-30', '贷', '2', '现金', '2016-05-01 22:06:54', '2', '1234', '正常', '123', '1', '正常', null, 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', '68e2caab-76ce-4263-8c19-85454d398799', '27c2ae69-3df3-4c50-a7f4-3a98371ece4f', '4882d575-4445-4422-b74d-c2bf2f5ba67c', '111', '1', '3720c808-56db-4649-9e0b-4f05de158095');
+
+-- ----------------------------
+-- Table structure for tdept
+-- ----------------------------
+DROP TABLE IF EXISTS `tdept`;
+CREATE TABLE `tdept` (
+  `Cid` varchar(36) NOT NULL,
+  `CcreateDatetime` datetime DEFAULT NULL,
+  `CdeptName` varchar(40) NOT NULL,
+  `CmodifyDatetime` datetime DEFAULT NULL,
+  `Cseq` int(11) DEFAULT NULL,
+  `Pid` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`Cid`),
+  KEY `FK691A4B95F345F9E` (`Pid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tdept
+-- ----------------------------
+INSERT INTO `tdept` VALUES ('fcc63cd4-e153-4a3f-b86b-a6a7df8029c3', '2016-04-30 22:44:15', '痛快科技', '2016-04-30 23:39:38', '1', null);
+
+-- ----------------------------
+-- Table structure for tdownload
+-- ----------------------------
+DROP TABLE IF EXISTS `tdownload`;
+CREATE TABLE `tdownload` (
+  `CID` varchar(36) NOT NULL,
+  `CCOUNT` int(11) DEFAULT NULL,
+  `CFILENAME` varchar(200) DEFAULT NULL,
+  `CFILEPATH` varchar(250) DEFAULT NULL,
+  `CUPLOADDATE` datetime DEFAULT NULL,
+  `CUSERID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK841D14FCA26EB7E2` (`CUSERID`),
+  CONSTRAINT `FK841D14FCA26EB7E2` FOREIGN KEY (`CUSERID`) REFERENCES `tuser` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tdownload
+-- ----------------------------
+INSERT INTO `tdownload` VALUES ('362413c1-2437-4e3e-8a4d-baab3466d831', '0', 'Pictures.zip', '/attached/upload/file/20160430/20160430225558_403.zip', '2016-04-30 22:56:04', '1');
+
+-- ----------------------------
+-- Table structure for tfile
+-- ----------------------------
+DROP TABLE IF EXISTS `tfile`;
+CREATE TABLE `tfile` (
+  `CID` varchar(36) NOT NULL,
+  `CCREATEDATE` datetime DEFAULT NULL,
+  `CDATE` date DEFAULT NULL,
+  `CENDDATE` date DEFAULT NULL,
+  `CFILENUMBER` varchar(30) DEFAULT NULL,
+  `CFILEPATH` varchar(240) DEFAULT NULL,
+  `CMODIFYDATE` datetime DEFAULT NULL,
+  `CNAME` varchar(60) DEFAULT NULL,
+  `CPASS` int(11) DEFAULT NULL,
+  `CSTARTDATE` date DEFAULT NULL,
+  `CDEPTID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK6929BF084A42656` (`CDEPTID`),
+  CONSTRAINT `FK6929BF084A42656` FOREIGN KEY (`CDEPTID`) REFERENCES `tdept` (`Cid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tfile
+-- ----------------------------
+INSERT INTO `tfile` VALUES ('56ba71da-49dd-40c8-b1bf-f2e181f4a7b7', '2016-04-30 22:57:05', '2016-04-30', '2016-04-30', '20160501001', '/attached/upload/file/20160430/20160430225703_6857.zip', '2016-05-01 16:59:08', '发票抬头', '0', '2016-04-30', 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3');
+INSERT INTO `tfile` VALUES ('92497c94-0e9d-4f7f-acd2-7e8b4e21e110', '2016-05-01 16:58:08', '2016-04-01', '2016-05-14', '20160501002', '/attached/upload/file/20160501/20160501165806_8280.zip', '2016-05-01 16:58:54', '报销办法', '0', '2016-04-02', 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3');
+
+-- ----------------------------
+-- Table structure for tkind
+-- ----------------------------
+DROP TABLE IF EXISTS `tkind`;
+CREATE TABLE `tkind` (
+  `CID` varchar(36) NOT NULL,
+  `CNAME` varchar(30) DEFAULT NULL,
+  `CSEQ` int(11) DEFAULT NULL,
+  `PID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK694E2085F379CED` (`PID`),
+  CONSTRAINT `FK694E2085F379CED` FOREIGN KEY (`PID`) REFERENCES `tkind` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tkind
+-- ----------------------------
+INSERT INTO `tkind` VALUES ('68e2caab-76ce-4263-8c19-85454d398799', '报销类', '1', null);
+INSERT INTO `tkind` VALUES ('c284e368-200c-493b-9e66-714d23e7c589', '发票类', '2', null);
+
+-- ----------------------------
+-- Table structure for tkmlz
+-- ----------------------------
+DROP TABLE IF EXISTS `tkmlz`;
+CREATE TABLE `tkmlz` (
+  `CID` varchar(36) NOT NULL,
+  `CAMOUNT` double DEFAULT NULL,
+  `CDATE` date DEFAULT NULL,
+  `CPZH` varchar(20) DEFAULT NULL,
+  `CCOST` varchar(36) DEFAULT NULL,
+  `CKJKM` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK694F0E464D4264B` (`CCOST`),
+  KEY `FK694F0E484574082` (`CKJKM`),
+  CONSTRAINT `FK694F0E464D4264B` FOREIGN KEY (`CCOST`) REFERENCES `tcost` (`CID`),
+  CONSTRAINT `FK694F0E484574082` FOREIGN KEY (`CKJKM`) REFERENCES `tsubject` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tkmlz
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for tlink
+-- ----------------------------
+DROP TABLE IF EXISTS `tlink`;
+CREATE TABLE `tlink` (
+  `CID` varchar(36) NOT NULL,
+  `CCREATEDATE` datetime DEFAULT NULL,
+  `CMODIFYDATE` datetime DEFAULT NULL,
+  `CTITLE` varchar(150) DEFAULT NULL,
+  `CURL` varchar(200) DEFAULT NULL,
+  `CUSERID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK695566EA26EB7E2` (`CUSERID`),
+  CONSTRAINT `FK695566EA26EB7E2` FOREIGN KEY (`CUSERID`) REFERENCES `tuser` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tlink
+-- ----------------------------
+INSERT INTO `tlink` VALUES ('5d0f55d4-a12f-4740-a15c-915bfc39e301', '2016-04-30 18:52:13', '2016-04-30 18:52:22', '百度', 'www.baidu.com', '1');
+
+-- ----------------------------
+-- Table structure for tmenu
+-- ----------------------------
+DROP TABLE IF EXISTS `tmenu`;
+CREATE TABLE `tmenu` (
+  `CID` varchar(36) NOT NULL,
+  `CICONCLS` varchar(100) DEFAULT NULL,
+  `CNAME` varchar(100) NOT NULL,
+  `CSEQ` decimal(22,0) DEFAULT NULL,
+  `CURL` varchar(200) DEFAULT NULL,
+  `CPID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK695BBD35F657775` (`CPID`),
+  CONSTRAINT `FK695BBD35F657775` FOREIGN KEY (`CPID`) REFERENCES `tmenu` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tmenu
+-- ----------------------------
+INSERT INTO `tmenu` VALUES ('00856f62-d0e5-4b13-b271-40fe5393ba8f', 'icon-sum', '统计分析', '33', '', null);
+INSERT INTO `tmenu` VALUES ('01b31419-01e8-4866-be58-4ce8f91655ca', '', '资金管理', '21', 'analysisAction!funds.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('0d37b32f-fc32-4ca5-a7dd-72f6478a4a33', 'icon-sum', '文件管理', '23', '', null);
+INSERT INTO `tmenu` VALUES ('0e4df649-efab-4308-9712-9ecd9b00bed0', '', '预算管理', '10', 'budgetAction!budgetManager.action', '10a5efe6-f836-429c-a9e3-d2931b8eb122');
+INSERT INTO `tmenu` VALUES ('10a5efe6-f836-429c-a9e3-d2931b8eb122', 'icon-sum', '财务管理', '25', '', null);
+INSERT INTO `tmenu` VALUES ('120d920f-d495-4d13-a9a7-555c5a22b733', 'icon-sum', '系统管理', '22', '', null);
+INSERT INTO `tmenu` VALUES ('19a18df9-efdd-46af-9d98-7c781d5fe09e', '', '商品管理', '19', 'shangpinAction!shangpinManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('1aad3bc5-d6c1-4bf1-aaeb-89b2fdc7edde', '', '用户管理', '2', 'userAction!userManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('1c23b8a7-0e8c-4045-a032-491461e864df', '', '单位管理', '6', 'deptAction!deptManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('23f1974a-c9b3-4e69-99a1-cb6dbb79bb90', '', '会计科目', '15', 'kjkmAction!kjkmManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('2d4286cb-f721-4239-97bc-16a4388fa2d3', '', '正常成本费用', '28', 'analysisAction!normal.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('3b8f425f-b539-452a-908d-8a6607454572', '', '角色管理', '5', 'roleAction!roleManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('49033718-f881-4ca0-9c3a-02a35da53232', '', '通告管理', '8', 'announceAction!announceManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('5e4c748b-1153-440e-946b-8c76e6d647ac', '', '专业管理', '20', 'zrzxAction!zrzxManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('640598e7-bd96-4f8e-a932-826fe0fed3a4', '', '审计管理', '9', 'auditAction!auditManager.action', '10a5efe6-f836-429c-a9e3-d2931b8eb122');
+INSERT INTO `tmenu` VALUES ('70cd042b-7ad3-4349-b781-04faf10f55e7', '', '链接管理', '17', 'linkAction!linkManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('77b77258-8fdd-451d-b3a4-433352fcffa1', '', '重点业务成本', '27', 'analysisAction!project.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('8e299a21-b781-4039-b1b1-7f340b54e27f', '', '文件号管理', '13', 'fileAction!fileManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('91eeea68-8670-4060-9730-52f85e0f8924', '', '资金使用情况', '29', 'analysisAction!funds.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('94cb5b23-fdbd-4cad-aa61-a13fe56109f6', '', '菜单管理', '3', 'menuAction!menuManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+INSERT INTO `tmenu` VALUES ('9dc579a2-c2be-4729-90b9-77e9df2845aa', '', '科目余额', '7', 'analysisAction!subject.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('9ecc0dbb-806c-4b51-bc3a-f720b8c244a1', '', '归类管理', '14', 'kindAction!kindManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('a4a1afe2-7350-4f7d-91e4-a064cf0ea6f8', '', '下载管理', '12', 'downloadAction!downloadManager.action', '0d37b32f-fc32-4ca5-a7dd-72f6478a4a33');
+INSERT INTO `tmenu` VALUES ('a6d4ed2d-6957-410a-8257-b0ee5a83f0a1', '', '消费管理', '11', 'costAction!costManager.action', '10a5efe6-f836-429c-a9e3-d2931b8eb122');
+INSERT INTO `tmenu` VALUES ('b0fe2ef3-b507-422b-98ab-0acab16f6e9f', '', '项目管理', '18', 'projectAction!projectManager.action', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f');
+INSERT INTO `tmenu` VALUES ('b1f9509a-41cd-44bd-afc7-20230b84c6d4', '', '正常成本费用', '32', 'costAction!normalCostManager.action', '10a5efe6-f836-429c-a9e3-d2931b8eb122');
+INSERT INTO `tmenu` VALUES ('b7c960f4-5359-4daf-af4e-106c30c24123', '', '业务费预算审核', '31', 'budgetAction!budgetAudit.action', '10a5efe6-f836-429c-a9e3-d2931b8eb122');
+INSERT INTO `tmenu` VALUES ('c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f', 'icon-sum', '元数据管理', '24', '', null);
+INSERT INTO `tmenu` VALUES ('e00901bb-55b5-4ba6-87f1-64e111d211d7', '', '成本费用', '16', 'kmlzAction!kmlzAdd.action', '00856f62-d0e5-4b13-b271-40fe5393ba8f');
+INSERT INTO `tmenu` VALUES ('f010247d-8bca-4222-811f-3cf50158db38', '', '权限管理', '4', 'authAction!authManager.action', '120d920f-d495-4d13-a9a7-555c5a22b733');
+
+-- ----------------------------
+-- Table structure for tproject
+-- ----------------------------
+DROP TABLE IF EXISTS `tproject`;
+CREATE TABLE `tproject` (
+  `CID` varchar(36) NOT NULL,
+  `CNAME` varchar(100) DEFAULT NULL,
+  PRIMARY KEY (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tproject
+-- ----------------------------
+INSERT INTO `tproject` VALUES ('27c2ae69-3df3-4c50-a7f4-3a98371ece4f', '数据城市');
+INSERT INTO `tproject` VALUES ('cfe820c7-8087-478c-8f03-199085e80311', '地中海项目');
+
+-- ----------------------------
+-- Table structure for trole
+-- ----------------------------
+DROP TABLE IF EXISTS `trole`;
+CREATE TABLE `trole` (
+  `CID` varchar(36) NOT NULL,
+  `CDESC` varchar(200) DEFAULT NULL,
+  `CNAME` varchar(100) NOT NULL,
+  PRIMARY KEY (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of trole
+-- ----------------------------
+INSERT INTO `trole` VALUES ('5d6292c6-1fff-4dc3-b983-a10daf943594', '拥有超级权限', '超级管理员');
+INSERT INTO `trole` VALUES ('98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a', '', '普通管理员');
+
+-- ----------------------------
+-- Table structure for trole_tauth
+-- ----------------------------
+DROP TABLE IF EXISTS `trole_tauth`;
+CREATE TABLE `trole_tauth` (
+  `CID` varchar(36) NOT NULL,
+  `CAUTHID` varchar(36) DEFAULT NULL,
+  `CROLEID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FKE482B6878067985C` (`CAUTHID`),
+  KEY `FKE482B6879D196278` (`CROLEID`),
+  CONSTRAINT `FKE482B6878067985C` FOREIGN KEY (`CAUTHID`) REFERENCES `tauth` (`CID`),
+  CONSTRAINT `FKE482B6879D196278` FOREIGN KEY (`CROLEID`) REFERENCES `trole` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of trole_tauth
+-- ----------------------------
+INSERT INTO `trole_tauth` VALUES ('38a68c25-20e8-4e80-8a63-8acf14006b6f', '9fba5577-0a5c-49fc-b033-9713ace053f3', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tauth` VALUES ('dd4401ab-20ff-448f-895e-a929c628fa0c', '9fba5577-0a5c-49fc-b033-9713ace053f3', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+
+-- ----------------------------
+-- Table structure for trole_tmenu
+-- ----------------------------
+DROP TABLE IF EXISTS `trole_tmenu`;
+CREATE TABLE `trole_tmenu` (
+  `CID` varchar(36) NOT NULL,
+  `CMENUID` varchar(36) DEFAULT NULL,
+  `CROLEID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FKE487EE3E9402F60A` (`CMENUID`),
+  KEY `FKE487EE3E9D196278` (`CROLEID`),
+  CONSTRAINT `FKE487EE3E9402F60A` FOREIGN KEY (`CMENUID`) REFERENCES `tmenu` (`CID`),
+  CONSTRAINT `FKE487EE3E9D196278` FOREIGN KEY (`CROLEID`) REFERENCES `trole` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of trole_tmenu
+-- ----------------------------
+INSERT INTO `trole_tmenu` VALUES ('05878262-4969-48f5-add0-5df8150e26af', 'b7c960f4-5359-4daf-af4e-106c30c24123', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('1a829a38-3881-4091-a2a6-7ad15e6763fd', '1aad3bc5-d6c1-4bf1-aaeb-89b2fdc7edde', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('20c99bf7-0eee-4555-9d40-61f7225656a4', '120d920f-d495-4d13-a9a7-555c5a22b733', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('25b46051-5802-49cf-95a8-c3728ccc68fa', '94cb5b23-fdbd-4cad-aa61-a13fe56109f6', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('2ea1979b-cb35-493b-a9b3-3399e24d296e', '8e299a21-b781-4039-b1b1-7f340b54e27f', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('354d6e5e-3954-4fb3-ab74-76548db4ff39', '5e4c748b-1153-440e-946b-8c76e6d647ac', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('42f28de8-3c58-4f8d-9452-b44f67d1210c', '0d37b32f-fc32-4ca5-a7dd-72f6478a4a33', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('4e091d14-40dd-4eab-9941-10eb8f37fe08', '70cd042b-7ad3-4349-b781-04faf10f55e7', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('5586cd31-bb43-4836-9bb0-31fec49ce1d1', '01b31419-01e8-4866-be58-4ce8f91655ca', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('56d1cc90-c714-42cc-a3fe-3813af81f669', 'b0fe2ef3-b507-422b-98ab-0acab16f6e9f', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('59e72ebd-6c36-490e-b5ef-9cdd3db056de', '9dc579a2-c2be-4729-90b9-77e9df2845aa', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('5a319017-383c-45e1-820f-1335c91bddb2', 'b1f9509a-41cd-44bd-afc7-20230b84c6d4', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('5d49312a-b2ff-415e-b676-749060fe359d', '640598e7-bd96-4f8e-a932-826fe0fed3a4', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('5fe32932-539a-4135-a3bc-dc952939d23f', '1c23b8a7-0e8c-4045-a032-491461e864df', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('691ec1bd-f1f4-4ee1-a543-6781a71b5feb', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('6f6704c1-13df-45ea-99d6-288a6e0862df', 'a4a1afe2-7350-4f7d-91e4-a064cf0ea6f8', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('79fc7512-5b51-404a-9aab-08e871a5187e', 'a6d4ed2d-6957-410a-8257-b0ee5a83f0a1', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('94ef155c-bdca-412f-a1f6-3196273425a2', '9ecc0dbb-806c-4b51-bc3a-f720b8c244a1', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('96f2f9cf-6f24-4c6e-a8cd-32c1aae08bdd', 'a4a1afe2-7350-4f7d-91e4-a064cf0ea6f8', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('978e74d9-a2da-4cca-8112-0eba5795298d', 'f010247d-8bca-4222-811f-3cf50158db38', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('98363ae9-102b-4a20-a136-d7ffec61f48e', '2d4286cb-f721-4239-97bc-16a4388fa2d3', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('a171685a-9f0d-4d78-9060-6ab8c1e04e12', '19a18df9-efdd-46af-9d98-7c781d5fe09e', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('a86eb256-5a19-4ad9-a917-f86799ea1322', '0e4df649-efab-4308-9712-9ecd9b00bed0', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('a951e7b0-592d-4f5d-8ac4-3f996dc60454', '5e4c748b-1153-440e-946b-8c76e6d647ac', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('a9a54bcc-b327-4158-9897-a5aa278fdb9f', '01b31419-01e8-4866-be58-4ce8f91655ca', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('b5702b8a-5d4e-4af5-8d3f-276c261a985f', '3b8f425f-b539-452a-908d-8a6607454572', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('b7b1f624-f1d2-4ee3-a380-14950789658b', '91eeea68-8670-4060-9730-52f85e0f8924', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('b966fdc6-bc83-4e77-84f1-703a19b0c99c', 'b0fe2ef3-b507-422b-98ab-0acab16f6e9f', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('bc336ea8-4203-42e3-baf0-218144085adf', '640598e7-bd96-4f8e-a932-826fe0fed3a4', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('bccaa691-c8e4-4ae6-8671-95bfd0bb7f48', 'e00901bb-55b5-4ba6-87f1-64e111d211d7', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('be9f1b45-fe23-43b9-bcf6-d0c1378d0bec', '49033718-f881-4ca0-9c3a-02a35da53232', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('c197e95a-7a5d-440e-9dd7-14adab90746d', '0d37b32f-fc32-4ca5-a7dd-72f6478a4a33', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('c8b8e3c6-b9b3-450f-9be8-520a3a0d4cd3', 'e00901bb-55b5-4ba6-87f1-64e111d211d7', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('cce60976-8cd3-4969-b6e6-62b3599e98d4', '9ecc0dbb-806c-4b51-bc3a-f720b8c244a1', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('cd75b956-e911-41a5-9164-790dd03cd2a2', 'c7bda01e-fae1-4f18-9b7a-1ebabaa88c6f', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('cf26c500-e9ea-4d69-a8bd-4ef0aa65d550', '10a5efe6-f836-429c-a9e3-d2931b8eb122', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('d848e649-eec3-4178-9491-0cac32bc118c', 'a6d4ed2d-6957-410a-8257-b0ee5a83f0a1', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('dc8a0478-6074-45f1-a54b-5c3597816493', '19a18df9-efdd-46af-9d98-7c781d5fe09e', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('e1177c32-8acc-478b-b7f7-8015a201f8af', '0e4df649-efab-4308-9712-9ecd9b00bed0', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('e25c0ca7-8272-41c5-9f79-edece11b7f41', '23f1974a-c9b3-4e69-99a1-cb6dbb79bb90', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('e545e559-d2f0-4ca6-8f4f-60bbac405a86', '77b77258-8fdd-451d-b3a4-433352fcffa1', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('e6d0362f-4e83-4ee1-b240-6c6d0a3fa200', '10a5efe6-f836-429c-a9e3-d2931b8eb122', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+INSERT INTO `trole_tmenu` VALUES ('eedfc897-6449-41a4-8365-96c3ff975212', '8e299a21-b781-4039-b1b1-7f340b54e27f', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('f4b38e43-dce4-4c8b-96a3-4a20472ff750', '9dc579a2-c2be-4729-90b9-77e9df2845aa', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('f4e10f51-0ebe-4095-9c43-6049d1429e86', '23f1974a-c9b3-4e69-99a1-cb6dbb79bb90', '98d0b3b8-08aa-4f3f-b577-44cdee6b0f8a');
+INSERT INTO `trole_tmenu` VALUES ('f5c289ac-30e1-4852-9f96-7cf799655d6d', '00856f62-d0e5-4b13-b271-40fe5393ba8f', '5d6292c6-1fff-4dc3-b983-a10daf943594');
+
+-- ----------------------------
+-- Table structure for tshangpin
+-- ----------------------------
+DROP TABLE IF EXISTS `tshangpin`;
+CREATE TABLE `tshangpin` (
+  `CID` varchar(36) NOT NULL,
+  `CNAME` varchar(50) DEFAULT NULL,
+  PRIMARY KEY (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tshangpin
+-- ----------------------------
+INSERT INTO `tshangpin` VALUES ('4882d575-4445-4422-b74d-c2bf2f5ba67c', '电脑');
+INSERT INTO `tshangpin` VALUES ('a3309e8d-0b53-4828-889d-ab5ce558a01b', '单反相机');
+
+-- ----------------------------
+-- Table structure for tsubject
+-- ----------------------------
+DROP TABLE IF EXISTS `tsubject`;
+CREATE TABLE `tsubject` (
+  `CID` varchar(36) NOT NULL,
+  `CNAME` varchar(50) DEFAULT NULL,
+  `CSEQ` int(11) DEFAULT NULL,
+  `CPID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FKA2B2AA387EE09CE6` (`CPID`),
+  CONSTRAINT `FKA2B2AA387EE09CE6` FOREIGN KEY (`CPID`) REFERENCES `tsubject` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tsubject
+-- ----------------------------
+INSERT INTO `tsubject` VALUES ('111', '产品部', '2', null);
+INSERT INTO `tsubject` VALUES ('123', '项目部', '1', null);
+
+-- ----------------------------
+-- Table structure for tuser
+-- ----------------------------
+DROP TABLE IF EXISTS `tuser`;
+CREATE TABLE `tuser` (
+  `CID` varchar(36) NOT NULL,
+  `CCREATEDATETIME` datetime DEFAULT NULL,
+  `CLASTLOGIN` datetime DEFAULT NULL,
+  `CMODIFYDATETIME` datetime DEFAULT NULL,
+  `CPASSWORD` varchar(40) NOT NULL,
+  `CROLE` int(11) DEFAULT NULL,
+  `CUSERNAME` varchar(36) NOT NULL,
+  `CDEPARTMENT` varchar(36) NOT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FK699923F26321208` (`CDEPARTMENT`),
+  CONSTRAINT `FK699923F26321208` FOREIGN KEY (`CDEPARTMENT`) REFERENCES `tdept` (`Cid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tuser
+-- ----------------------------
+INSERT INTO `tuser` VALUES ('1', '2016-04-30 18:45:04', '2016-04-30 18:45:07', '2016-04-30 23:21:21', 'e10adc3949ba59abbe56e057f20f883e', null, 'admin', 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3');
+INSERT INTO `tuser` VALUES ('a7e5a579-5208-47b9-a097-452c7e292996', '2016-04-30 23:25:23', null, '2016-04-30 23:38:26', 'e10adc3949ba59abbe56e057f20f883e', null, 'test', 'fcc63cd4-e153-4a3f-b86b-a6a7df8029c3');
+
+-- ----------------------------
+-- Table structure for tuser_trole
+-- ----------------------------
+DROP TABLE IF EXISTS `tuser_trole`;
+CREATE TABLE `tuser_trole` (
+  `CID` varchar(36) NOT NULL,
+  `CROLEID` varchar(36) DEFAULT NULL,
+  `CUSERID` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`),
+  KEY `FKEB0130EA9D196278` (`CROLEID`),
+  KEY `FKEB0130EAA26EB7E2` (`CUSERID`),
+  CONSTRAINT `FKEB0130EA9D196278` FOREIGN KEY (`CROLEID`) REFERENCES `trole` (`CID`),
+  CONSTRAINT `FKEB0130EAA26EB7E2` FOREIGN KEY (`CUSERID`) REFERENCES `tuser` (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tuser_trole
+-- ----------------------------
+INSERT INTO `tuser_trole` VALUES ('574a7175-dc77-4e23-911d-7536841ecf54', '5d6292c6-1fff-4dc3-b983-a10daf943594', 'a7e5a579-5208-47b9-a097-452c7e292996');
+INSERT INTO `tuser_trole` VALUES ('c48e63a1-1d4d-4246-8f3a-8dc8bd173a74', '5d6292c6-1fff-4dc3-b983-a10daf943594', '1');
+
+-- ----------------------------
+-- Table structure for tzdywys
+-- ----------------------------
+DROP TABLE IF EXISTS `tzdywys`;
+CREATE TABLE `tzdywys` (
+  `CID` varchar(36) NOT NULL,
+  `CCONTENT` longtext,
+  `CCOST` double DEFAULT NULL,
+  `CCREATEDATETIME` datetime DEFAULT NULL,
+  `CCREATEUSER` varchar(36) DEFAULT NULL,
+  `CCYCLE` varchar(16) DEFAULT NULL,
+  `CFILENAME` varchar(100) DEFAULT NULL,
+  `CFILENUMBER` varchar(30) DEFAULT NULL,
+  `CMAKEDATE` date DEFAULT NULL,
+  `CMODIFYDATETIME` datetime DEFAULT NULL,
+  `CPLANDATE` date DEFAULT NULL,
+  `CPROFIT` double DEFAULT NULL,
+  `CPROJECT` varchar(36) DEFAULT NULL,
+  `CYWLS` double DEFAULT NULL,
+  `CZHUANYE` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tzdywys
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for tzrzx
+-- ----------------------------
+DROP TABLE IF EXISTS `tzrzx`;
+CREATE TABLE `tzrzx` (
+  `CID` varchar(36) NOT NULL,
+  `CNAME` varchar(36) DEFAULT NULL,
+  PRIMARY KEY (`CID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tzrzx
+-- ----------------------------
+INSERT INTO `tzrzx` VALUES ('3720c808-56db-4649-9e0b-4f05de158095', 'IT类');
+INSERT INTO `tzrzx` VALUES ('6efd229a-349e-4bab-add2-3b56cee42538', '一线生产');
+INSERT INTO `tzrzx` VALUES ('94a74c4c-d400-46e7-ae00-fd4189528d81', '工业类');

+ 248 - 0
src/main/java/com/post/action/AnalysisAction.java

@@ -0,0 +1,248 @@
+package com.post.action;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.excelTools.ExcelUtils;
+import com.post.excelTools.JsGridReportBase;
+import com.post.excelTools.TableColumn;
+import com.post.excelTools.TableData;
+import com.post.excelTools.TableHeaderMetaData;
+import com.post.pageModel.Cost;
+import com.post.pageModel.TjNormal;
+import com.post.pageModel.TjProject;
+import com.post.pageModel.TjSubject;
+import com.post.pageModel.Zrzx;
+import com.post.service.CostServiceI;
+import com.post.service.KjkmServiceI;
+import com.post.service.ZrzxServiceI;
+import com.post.util.MyUtil;
+
+/**
+ * 分析
+ */
+@Action(value = "analysisAction", results = {
+		@Result(name = "subject", location = "/analysis/subject.jsp"),
+		@Result(name = "project", location = "/analysis/project.jsp"),
+		@Result(name = "normal", location = "/analysis/normal.jsp"),
+		@Result(name = "funds", location = "/analysis/funds.jsp")
+})
+public class AnalysisAction extends BaseAction implements ModelDriven<Cost>  {
+	
+	private Cost cost = new Cost();
+	private CostServiceI costService;
+	private KjkmServiceI subjectService;
+	private ZrzxServiceI zrzxService;
+	
+	
+	
+
+	public ZrzxServiceI getZrzxService() {
+		return zrzxService;
+	}
+
+	@Autowired
+	public void setZrzxService(ZrzxServiceI zrzxService) {
+		this.zrzxService = zrzxService;
+	}
+
+	public CostServiceI getCostService() {
+		return costService;
+	}
+
+	@Autowired
+	public void setCostService(CostServiceI costService) {
+		this.costService = costService;
+	}
+
+	public KjkmServiceI getSubjectService() {
+		return subjectService;
+	}
+
+	@Autowired
+	public void setSubjectService(KjkmServiceI subjectService) {
+		this.subjectService = subjectService;
+	}
+
+	public String subject() {
+		return "subject";
+	}
+	
+	public String project() {
+		return "project";
+	}
+	
+	public String normal() {
+		return "normal";
+	}
+	
+	public String funds() {
+		List<Zrzx> zrzxs = zrzxService.combobox();
+		int i = zrzxs.size()+1;
+		String[] f=new String[i];
+		f[0]="deptname";
+		String[] c=new String[i];
+		c[0] = "单位";
+		int k = 0;
+		for (Zrzx zrzx:zrzxs){
+			k++;
+			f[k]=zrzx.getCid();
+			c[k]=zrzx.getCname();
+		}
+		String fields = MyUtil.arrayToDatagrid(c, f);
+		ServletActionContext.getRequest().getSession().setAttribute("fields",fields);
+		return "funds";
+	}
+	
+	public void tjsubject(){
+		super.writeJsonDate(costService.tjSubject(cost));
+	}
+
+	public void tjproject(){
+		super.writeJsonDate(costService.tjProject(cost));
+	}
+	
+	public void tjnormal(){
+		super.writeJsonDate(costService.tjNormal(cost));
+	}
+	
+	public void tjfunds(){
+		super.writeJsonDate(costService.tjFunds(cost));
+	}
+	
+	
+	@Override
+	public Cost getModel() {
+		return cost;
+	}
+	
+	public void exportTjSubject() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd");
+		String title;
+		String[] hearders;
+		String[] fields;
+		int[]  columnwidths;
+		TableData td ;
+		response.setContentType("application/msexcel;charset=GBK");
+        List<TjSubject> list=costService.exportTjSubject(cost);
+        if (cost.getCiszd()==2){
+	        title = "重点业务科目余额表("+formatter.format(cost.getStartdate())+"-"+formatter.format(cost.getEnddate())+")";
+        }
+        else
+        {
+        	if(cost.getCiszd()==1){
+        		title = "正常成本科目余额表("+formatter.format(cost.getStartdate())+"-"+formatter.format(cost.getEnddate())+")";
+        	}
+        	else{
+        		title = "科目余额表("+formatter.format(cost.getStartdate())+"-"+formatter.format(cost.getEnddate())+")";
+        	}
+        }
+        hearders = new String[] {"单位","科目编号","会计科目名称","上期余额", "本期发生额(借)","本期发生额(贷)", "本期余额"};//表头数组
+        fields = new String[] {"deptName","subjectId", "subjectName","sqye","bqyej","bqyed", "bqye"};//对象属性数组
+        columnwidths = new int[]{14,16,26,14,18,18,14};//每列宽度
+        td = ExcelUtils.createTableData(list, ExcelUtils.createTableHeader(hearders),fields);
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	public void exportTjzrzx() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		String title;
+		String[] hearders;
+		String[] fields;
+		int[]  columnwidths;
+		TableData td ;
+		response.setContentType("application/msexcel;charset=GBK");
+        List<TjProject> list=costService.exportTjProject(cost);
+        title = "业务成本费用列支情况总表("+cost.getCmonth()+")";
+        hearders = new String[] {"单位名称","专业名称","本年累计","本年支付内部","本年支付外部","本月累计","本月支付内部","本月支付外部"};//表头数组
+        fields = new String[] { "deptName","cname","bntotal","bnnb","bnwb", "bytotal","bynb","bywb"};//对象属性数组
+        columnwidths = new int[]{14,14,14,18,18,14,18,18};//每列宽度
+        td = ExcelUtils.createTableData(list, getTableHeader(hearders),fields);
+        td.compute();
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	public void exportTjNormal() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		String title;
+		String[] hearders;
+		String[] fields;
+		int[]  columnwidths;
+		TableData td ;
+		response.setContentType("application/msexcel;charset=GBK");
+        List<TjNormal> list=costService.exportTjNormal(cost);
+        title = "成本费用列支情况表("+cost.getCmonth()+")";
+        hearders = new String[] {"单位名称","项目名称","本年累计","本月累计"};//表头数组
+        fields = new String[] { "deptName","cname","bntotal", "bytotal"};//对象属性数组
+        columnwidths = new int[]{22,22,22,22};//每列宽度
+        td = ExcelUtils.createTableData(list, getTableHeader(hearders),fields);
+        td.compute();
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	public void exportTjFund() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		String title;
+		List<Zrzx> zrzxs = zrzxService.combobox();
+		int i = zrzxs.size()+1;
+		String[] fields=new String[i];
+		int[]  columnwidths = new int[i];
+		String[] hearders=new String[i];
+		fields[0]="deptname";
+		columnwidths[0]=18;
+		hearders[0] = "单位";
+		int k = 0;
+		for (Zrzx zrzx:zrzxs){
+			k++;
+			fields[k]=zrzx.getCid();
+			hearders[k]=zrzx.getCname();
+			columnwidths[k]=12;
+		}
+		
+		TableData td ;
+		response.setContentType("application/msexcel;charset=GBK");
+        List<Map<String,String>> list=costService.tjFunds(cost);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+        title = "资金使用情况表("+sdf.format(cost.getStartdate())+"-"+sdf.format(cost.getEnddate())+")";
+        td = ExcelUtils.createTableData(list, ExcelUtils.createTableHeader(hearders),fields);
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	private TableHeaderMetaData getTableHeader(String[] hearders){
+	    int spanCount = 1;//需要合并的列数。从第1列开始到指定列。
+	    //创建表头对象
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(int i=0;i<hearders.length;i++){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(hearders[i]);
+			//设置按指定列统计
+			if(i==0)//按第1列单位进行小计
+				tc.setDisplaySummary(true);
+			if(i>1)//进行求和
+				tc.setAggregateRule("sum");
+			if(i<spanCount)//前3列行合并
+				tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+}

+ 122 - 0
src/main/java/com/post/action/AnnounceAction.java

@@ -0,0 +1,122 @@
+package com.post.action;
+
+import java.util.List;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Announce;
+import com.post.pageModel.Json;
+import com.post.service.AnnounceServiceI;
+
+/**
+ * 通告
+ */
+@Action(value = "announceAction", results = {
+		@Result(name = "announceManager", location = "/admin/announce/announceManager.jsp"),
+		@Result(name = "announceAdd", location = "/admin/announce/announceAdd.jsp"),
+		@Result(name = "announceEdit", location = "/admin/announce/announceEdit.jsp"),
+		@Result(name = "showContent", location = "/admin/announce/showContent.jsp"),
+		@Result(name = "showAnnounce", location = "/layout/portal/announce.jsp")})
+public class AnnounceAction extends BaseAction implements ModelDriven<Announce> {
+
+	private Announce announce = new Announce();
+	private AnnounceServiceI announceService;
+	private List<Announce> alist;
+	
+	
+
+	public List<Announce> getAlist() {
+		return alist;
+	}
+
+	public void setAlist(List<Announce> alist) {
+		this.alist = alist;
+	}
+
+	public AnnounceServiceI getAnnounceService() {
+		return announceService;
+	}
+
+	@Autowired
+	public void setAnnounceService(AnnounceServiceI announceService) {
+		this.announceService = announceService;
+	}
+
+	@Override
+	public Announce getModel() {
+		return announce;
+	}
+
+
+	public String announceManager() {
+		return "announceManager";
+	}
+	
+	public String do_listAnnounce() {
+		alist = announceService.listAnnounce();
+		return "showAnnounce";
+	}
+
+	public String announceEdit() {
+		return "announceEdit";
+	}
+
+	public String announceAdd() {
+		return "announceAdd";
+	}
+
+	public String do_showContent() {
+		ServletActionContext.getRequest().setAttribute("content", announceService.getContentById(announce.getCid()));
+		return "showContent";
+	} 
+	
+	public void do_showAnnounce(){
+		super.writeJson(announceService.listAnnounce());
+	}
+	
+	public void do_datagrid() {
+		super.writeJson(announceService.datagrid(announce));
+	}
+	
+	public void add() {
+		Json j = new Json();
+		try {
+			announceService.add(announce);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			announceService.edit(announce);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			announceService.delete(announce);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(announce.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+}

+ 127 - 0
src/main/java/com/post/action/AuditAction.java

@@ -0,0 +1,127 @@
+package com.post.action;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.excelTools.ExcelUtils;
+import com.post.excelTools.JsGridReportBase;
+import com.post.excelTools.TableColumn;
+import com.post.excelTools.TableData;
+import com.post.excelTools.TableHeaderMetaData;
+import com.post.pageModel.Budget;
+import com.post.pageModel.Json;
+import com.post.service.BudgetServiceI;
+
+/**
+ * 审计
+ */
+@Action(value = "auditAction", results = {
+		@Result(name = "auditManager", location = "/busi/audit/auditManager.jsp"),
+		@Result(name = "auditEdit", location = "/busi/audit/auditEdit.jsp"),
+		@Result(name = "auditView", location = "/busi/audit/auditView.jsp")
+		})
+public class AuditAction extends BaseAction implements ModelDriven<Budget> {
+
+	private Budget budget = new Budget();
+	private BudgetServiceI budgetService;
+
+	public BudgetServiceI getBudgetService() {
+		return budgetService;
+	}
+
+	@Autowired
+	public void setBudgetService(BudgetServiceI budgetService) {
+		this.budgetService = budgetService;
+	}
+
+	@Override
+	public Budget getModel() {
+		return budget;
+	}
+
+	public String auditManager() {
+		return "auditManager";
+	}
+
+
+	public String auditEdit() {
+		return "auditEdit";
+	}
+	
+	public String auditView() {
+		return "auditView";
+	}
+	
+
+	public void do_datagrid() {
+		super.writeJsonDate(budgetService.datagrid(budget));
+	}
+
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			budgetService.auditEdit(budget);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	
+	public void do_totalBudget(){
+		Json j = new Json();
+		j.setSuccess(true);
+		j.setObj(budgetService.totalBudget(budget.getFileId()));
+		super.writeJson(j);
+	}
+	
+	public void exportExcel() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		response.setContentType("application/msexcel;charset=GBK");
+        List<Budget> list=budgetService.excelAudit(budget);
+        String title = budget.getDeptName()+"成本费用清算表";
+        String[] hearders = new String[] {"单位","文件制定日期", "文件字号", "文件名称", "考核开始日期", "考核结束日期", "所属专业","所属项目","预计业务量收","预计费用(不含税)","预计利润","预计清算时间","实际清算时间","实际清算(不含税)","清算与预计差异","已预提","清算与预提差异","税金","总成本费用"};//表头数组
+        String[] fields = new String[] {"deptName","fileDate", "fileNumber", "fileName", "startdate", "enddate", "zrzxName","projectName","cyjywls","cyjfy","cyjlr","cyjqssj","csjqssj","csjfy","cfycy","cyt","cytcy","csj","ctotal"};//对象属性数组
+        int[]  columnwidths = new int[]{16,12,22,40,12,12,20,20,14,16,14,12,12,16,14,10,14,10,16};
+        TableData td = ExcelUtils.createTableData(list, getTableHeader(hearders),fields);
+        td.compute();
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	private TableHeaderMetaData getTableHeader(String[] hearders){
+	    int spanCount = 4;//需要合并的列数。从第1列开始到指定列。
+	    //创建表头对象
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(int i=0;i<hearders.length;i++){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(hearders[i]);
+			//设置按指定列统计
+			if(i==2)//按第2列文件字号进行小计
+				tc.setDisplaySummary(true);
+			
+			if(i>7 && i<11)//进行求和
+				tc.setAggregateRule("sum");
+			
+			if (i>12 && i<19)
+				tc.setAggregateRule("sum");
+			
+			if(i<spanCount)//前3列行合并
+				tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+}

+ 90 - 0
src/main/java/com/post/action/AuthAction.java

@@ -0,0 +1,90 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Auth;
+import com.post.pageModel.Json;
+import com.post.service.AuthServiceI;
+
+/**
+ * 权限
+ */
+@Action(value = "authAction", results = {
+		@Result(name = "authManager", location = "/admin/auth/authManager.jsp"),
+		@Result(name = "authAdd", location = "/admin/auth/authAdd.jsp"),
+		@Result(name = "authEdit", location = "/admin/auth/authEdit.jsp") })
+public class AuthAction extends BaseAction implements ModelDriven<Auth> {
+
+	private Auth auth = new Auth();
+	private AuthServiceI authService;
+
+	public AuthServiceI getAuthService() {
+		return authService;
+	}
+
+	@Autowired
+	public void setAuthService(AuthServiceI authService) {
+		this.authService = authService;
+	}
+
+	@Override
+	public Auth getModel() {
+		return auth;
+	}
+
+	public String authManager() {
+		return "authManager";
+	}
+	
+	public String authAdd(){
+		return "authAdd";
+	}
+	
+	public String authEdit(){
+		return "authEdit";
+	}
+
+	public void do_treegrid() {
+		super.writeJson(authService.treegrid(auth, true));
+	}
+	
+	public void add(){
+		Json j = new Json();
+		try {
+			authService.add(auth);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void edit(){
+		Json j = new Json();
+		try {
+			authService.edit(auth);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void delete(){
+		Json j = new Json();
+		try {
+			authService.delete(auth);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(auth.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+}

+ 38 - 0
src/main/java/com/post/action/BaseAction.java

@@ -0,0 +1,38 @@
+package com.post.action;
+
+import java.io.IOException;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Namespace;
+import org.apache.struts2.convention.annotation.ParentPackage;
+
+import com.alibaba.fastjson.JSON;
+
+@ParentPackage("basePackage")
+@Namespace("/")
+public class BaseAction {
+
+	public void writeJson(Object object) {
+		try {
+			String json = JSON.toJSONStringWithDateFormat(object, "yyyy-MM-dd HH:mm:ss");
+			ServletActionContext.getResponse().setContentType("text/html;charset=utf-8");
+			ServletActionContext.getResponse().getWriter().write(json);
+			ServletActionContext.getResponse().getWriter().flush();
+			ServletActionContext.getResponse().getWriter().close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public void writeJsonDate(Object object) {
+		try {
+			String json = JSON.toJSONStringWithDateFormat(object, "yyyy-MM-dd");
+			ServletActionContext.getResponse().setContentType("text/html;charset=utf-8");
+			ServletActionContext.getResponse().getWriter().write(json);
+			ServletActionContext.getResponse().getWriter().flush();
+			ServletActionContext.getResponse().getWriter().close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 177 - 0
src/main/java/com/post/action/BudgetAction.java

@@ -0,0 +1,177 @@
+package com.post.action;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.excelTools.ExcelUtils;
+import com.post.excelTools.JsGridReportBase;
+import com.post.excelTools.TableColumn;
+import com.post.excelTools.TableData;
+import com.post.excelTools.TableHeaderMetaData;
+import com.post.pageModel.Budget;
+import com.post.pageModel.Json;
+import com.post.service.BudgetServiceI;
+
+/**
+ * 预算
+ */
+@Action(value = "budgetAction", results = {
+		@Result(name = "budgetManager", location = "/busi/budget/budgetManager.jsp"),
+		@Result(name = "budgetAdd", location = "/busi/budget/budgetAdd.jsp"),
+		@Result(name = "budgetEdit", location = "/busi/budget/budgetEdit.jsp"),
+		@Result(name = "budgetView", location = "/busi/budget/budgetView.jsp"),
+		@Result(name = "budgetAddPzh", location = "/busi/budget/budgetAddPzh.jsp"),
+		@Result(name = "budgetAudit", location = "/busi/budget/budgetAudit.jsp")})
+public class BudgetAction extends BaseAction implements ModelDriven<Budget> {
+
+	private Budget budget = new Budget();
+	private BudgetServiceI budgetService;
+
+	public BudgetServiceI getBudgetService() {
+		return budgetService;
+	}
+
+	@Autowired
+	public void setBudgetService(BudgetServiceI budgetService) {
+		this.budgetService = budgetService;
+	}
+
+	@Override
+	public Budget getModel() {
+		return budget;
+	}
+
+	public String budgetManager() {
+		return "budgetManager";
+	}
+
+	public String budgetAdd() {
+		return "budgetAdd";
+	}
+
+	public String budgetEdit() {
+		return "budgetEdit";
+	}
+	
+	public String budgetView() {
+		return "budgetView";
+	}
+	
+	public String budgetAddPzh() {
+		return "budgetAddPzh";
+	}
+	
+	public String budgetAudit() {
+		return "budgetAudit";
+	}
+
+	public void do_datagrid() {
+		super.writeJsonDate(budgetService.datagrid(budget));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			budgetService.add(budget);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			budgetService.edit(budget);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		budgetService.delete(budget);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+	
+	public void audit() {
+		Json j = new Json();
+		budgetService.audit(budget);
+		j.setSuccess(true);
+		j.setMsg("审核成功!");
+		super.writeJson(j);
+	}
+	
+	public void notAudit() {
+		Json j = new Json();
+		budgetService.notAudit(budget);
+		j.setSuccess(true);
+		j.setMsg("操作成功!");
+		super.writeJson(j);
+	}
+	
+	public void submit() {
+		Json j = new Json();
+		budgetService.submit(budget);
+		j.setSuccess(true);
+		j.setMsg("提交审核成功!");
+		super.writeJson(j);
+	}
+	
+	public void do_totalBudget(){
+		Json j = new Json();
+		j.setSuccess(true);
+		j.setObj(budgetService.totalBudget(budget.getFileId()));
+		super.writeJson(j);
+	}
+	
+	public void exportExcel() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		response.setContentType("application/msexcel;charset=GBK");
+        List<Budget> list=budgetService.excelData(budget);
+        String title = budget.getDeptName()+"成本费用预算表";
+        String[] hearders = new String[] {"单位","文件制定日期", "文件字号", "文件名称", "考核开始日期", "考核结束日期", "所属专业","所属项目","预计业务量收","预计费用(不含税)","预计利润","预计清算时间","已用费用(不含税)","实际清算时间","实际清算(不含税)","清算与预计差异","税金","总成本费用"};//表头数组
+        String[] fields = new String[] {"deptName","fileDate", "fileNumber", "fileName", "startdate", "enddate", "zrzxName","projectName","cyjywls","cyjfy","cyjlr","cyjqssj","cyt","csjqssj","csjfy","cfycy","csj","ctotal"};//对象属性数组
+        int[]  columnwidths = new int[]{16,12,22,40,12,12,20,20,14,16,14,12,12,16,14,10,10,16};
+        TableData td = ExcelUtils.createTableData(list, ExcelUtils.createTableHeader(hearders),fields);
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	private TableHeaderMetaData getTableHeader(String[] hearders){
+	    int spanCount = 4;//需要合并的列数。从第1列开始到指定列。
+	    //创建表头对象
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(int i=0;i<hearders.length;i++){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(hearders[i]);
+			//设置按指定列统计
+			if(i==2)//按第2列文件字号进行小计
+				tc.setDisplaySummary(true);
+			
+			if(i>7 && i<11)//进行求和
+				tc.setAggregateRule("sum");
+			
+			if(i<spanCount)//前3列行合并
+				tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+}

+ 266 - 0
src/main/java/com/post/action/CostAction.java

@@ -0,0 +1,266 @@
+package com.post.action;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.excelTools.ExcelUtils;
+import com.post.excelTools.JsGridReportBase;
+import com.post.excelTools.TableColumn;
+import com.post.excelTools.TableData;
+import com.post.excelTools.TableHeaderMetaData;
+import com.post.model.Tbudget;
+import com.post.pageModel.Cost;
+import com.post.pageModel.CostPrint;
+import com.post.pageModel.Json;
+import com.post.service.BudgetServiceI;
+import com.post.service.CostServiceI;
+
+/**
+ * 成本
+ */
+@Action(value = "costAction", results = {
+		@Result(name = "costManager", location = "/busi/cost/costManager.jsp"),
+		@Result(name = "costAdd", location = "/busi/cost/costAdd.jsp"),
+		@Result(name = "costEdit", location = "/busi/cost/costEdit.jsp"),
+		@Result(name = "costView", location = "/busi/cost/costView.jsp"),
+		@Result(name = "costPrint", location = "/busi/cost/costPrint.jsp"),
+		@Result(name = "normalCostManager", location = "/busi/cost/normalCostManager.jsp"),
+		@Result(name = "normalCostAdd", location = "/busi/cost/normalCostAdd.jsp"),
+		@Result(name = "normalCostEdit", location = "/busi/cost/normalCostEdit.jsp"),
+		@Result(name = "normalCostPrint", location = "/busi/cost/normalCostPrint.jsp"),
+		@Result(name = "normalCostView", location = "/busi/cost/normalCostView.jsp")})
+public class CostAction extends BaseAction implements ModelDriven<Cost> {
+
+	private Cost cost = new Cost();
+	private CostServiceI costService;
+	private BudgetServiceI budgetService;
+
+	public BudgetServiceI getBudgetService() {
+		return budgetService;
+	}
+
+	@Autowired
+	public void setBudgetService(BudgetServiceI budgetService) {
+		this.budgetService = budgetService;
+	}
+
+	public CostServiceI getCostService() {
+		return costService;
+	}
+
+	@Autowired
+	public void setCostService(CostServiceI costService) {
+		this.costService = costService;
+	}
+
+	@Override
+	public Cost getModel() {
+		return cost;
+	}
+
+	public String costManager() {
+		return "costManager";
+	}
+
+	public String costAdd() {
+		return "costAdd";
+	}
+
+	public String costEdit() {
+		return "costEdit";
+	}
+
+	public String costView() {
+		return "costView";
+	}
+
+	public String normalCostManager() {
+		return "normalCostManager";
+	}
+
+	public String normalCostAdd() {
+		return "normalCostAdd";
+	}
+
+	public String normalCostEdit() {
+		return "normalCostEdit";
+	}
+
+	public String normalCostView() {
+		return "normalCostView";
+	}
+
+	public String normalCostPrint(){
+		CostPrint cp = costService.printData(cost);
+		ServletActionContext.getRequest().getSession().setAttribute("costs", cp);
+		return "normalCostPrint";
+	}
+	
+	public String costPrint(){
+		CostPrint cpdatas = costService.printData(cost);
+		ServletActionContext.getRequest().getSession().setAttribute("datas", cpdatas);
+		return "costPrint";
+	}
+	
+	public void do_datagrid() {
+		super.writeJsonDate(costService.datagrid(cost));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			costService.add(cost);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void addPzh() {
+		Json j = new Json();
+		try {
+			costService.addPzh(cost);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			costService.edit(cost);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		costService.delete(cost);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_totalCost() {
+		Json j = new Json();
+		j.setSuccess(true);
+		j.setObj(costService.totalCost(cost));
+		super.writeJson(j);
+	}
+
+	public void do_sumyt() {
+		Json j = new Json();
+		j.setSuccess(true);
+		Object o = costService.sumyt(cost);
+		if (o != null) {
+			j.setObj(o);
+		} else {
+			j.setObj(0);
+		}
+		super.writeJson(j);
+	}
+
+	public void do_check() {
+		Json j = new Json();
+		double totalBudget;
+		double totalAmount = costService.sumyt(cost);;
+		Tbudget t = budgetService.get(cost.getBudgetId());
+		if (t.getCsjfy()== null){
+			totalBudget = t.getCyjfy();
+			if ((cost.getCamount()+totalAmount)>totalBudget*0.7) {
+				j.setSuccess(true);
+			} else {
+				j.setSuccess(false);
+			}
+		}else{
+					totalBudget = t.getCsjfy();
+					if ((cost.getCamount()+totalAmount)>totalBudget) {
+						j.setSuccess(true);
+					} else {
+						j.setSuccess(false);
+					}	
+			}
+		super.writeJson(j);
+	}
+	
+	public void exportExcel() throws Exception{
+		HttpServletRequest request=ServletActionContext.getRequest();
+		HttpServletResponse response=ServletActionContext.getResponse();
+		String title;
+		String[] hearders;
+		String[] fields;
+		int[]  columnwidths;
+		TableData td ;
+		response.setContentType("application/msexcel;charset=GBK");
+        List<Cost> list=costService.excelData(cost);
+        if (cost.getCiszd()==2){
+	        title = cost.getDeptName()+"重点业务成本费用详情表";
+	        hearders = new String[] {"单位","归属文件号","归属文件名称", "事由(摘要)","单证编号", "列支方式","借贷方向", "金额","税金","科目编号", "会计科目", "性质","归类","责任中心","归属项目","入账时间"};//表头数组
+	        fields = new String[] {"deptName", "fileNumber","fileName","cshiyou","cbh", "clzfs", "cfx","camount","csj", "subjectId","subjectName", "cxz","kindName","zrzxName","projectName","cdate"};//对象属性数组
+	        columnwidths = new int[]{10,22,30,40,14,12,12,14,12,18,20,10,14,14,20,12};//每列宽度
+	        td = ExcelUtils.createTableData(list, getTableHeader(hearders),fields);
+        }
+        else
+        {
+        	title = cost.getDeptName()+"正常成本费用详情表";
+ 	        hearders = new String[] {"单位", "事由(摘要)", "单证编号","列支方式","借贷方向", "金额", "科目编号","会计科目", "性质","责任中心","入账时间"};//表头数组
+ 	        fields = new String[] {"deptName", "cshiyou","cbh", "clzfs","cfx", "camount", "subjectId","subjectName", "cxz","zrzxName","cdate"};//对象属性数组
+ 	        columnwidths = new int[]{10,40,14,12,12,14,18,20,10,14,12};//每列宽度
+ 	        td = ExcelUtils.createTableData(list, getTableHeader(hearders),fields);
+        }
+        td.compute();
+        JsGridReportBase report = new JsGridReportBase(request, response);
+        report.exportToExcel(title, "admin",columnwidths, td);
+	}
+	
+	private TableHeaderMetaData getTableHeader(String[] hearders){
+	    int spanCount = 3;//需要合并的列数。从第1列开始到指定列。
+	    if (!cost.getCxz().trim().equals("重点")){
+	    	spanCount = 1;
+	    }
+	    //创建表头对象
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(int i=0;i<hearders.length;i++){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(hearders[i]);
+			//设置按指定列统计
+			if(i==0)//按第1列单位进行小计
+				tc.setDisplaySummary(true);
+			if (cost.getCiszd()==2){
+				if(i==7)//进行求和
+					tc.setAggregateRule("sum");
+				if(i==8)//进行求和
+					tc.setAggregateRule("sum");
+			}
+			else
+			{
+				if (i==5)  tc.setAggregateRule("sum");
+			}
+			
+			if(i<spanCount)//前3列行合并
+				tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+}

+ 91 - 0
src/main/java/com/post/action/DeptAction.java

@@ -0,0 +1,91 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Dept;
+import com.post.pageModel.Json;
+import com.post.service.DeptServiceI;
+
+/**
+ * 单位
+ */
+@Action(value = "deptAction", results = {
+		@Result(name = "deptManager", location = "/admin/dept/deptManager.jsp"),
+		@Result(name = "deptAdd", location = "/admin/dept/deptAdd.jsp"),
+		@Result(name = "deptEdit", location = "/admin/dept/deptEdit.jsp") })
+public class DeptAction extends BaseAction implements ModelDriven<Dept> {
+
+	private Dept dept = new Dept();
+	private DeptServiceI deptService;
+
+	public DeptServiceI getDeptService() {
+		return deptService;
+	}
+
+	@Autowired
+	public void setDeptService(DeptServiceI deptService) {
+		this.deptService = deptService;
+	}
+
+	@Override
+	public Dept getModel() {
+		return dept;
+	}
+
+	public void do_showDept() {
+		super.writeJson(deptService.treeDept(dept));
+	}
+
+	public String deptManager() {
+		return "deptManager";
+	}
+
+	public String deptEdit() {
+		return "deptEdit";
+	}
+
+	public String deptAdd() {
+		return "deptAdd";
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			deptService.add(dept);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			deptService.edit(dept);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			deptService.delete(dept);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(dept.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+}

+ 79 - 0
src/main/java/com/post/action/DownAction.java

@@ -0,0 +1,79 @@
+package com.post.action;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+
+
+@Action(value="downAction",results = {
+		@Result(name = "download", type = "stream", params = {  
+        "contentType", "application/octet-stream",  
+        "inputName", "inputStream", "contentDisposition",  
+        "attachment;filename=\"${downloadFileName}\"", "bufferSize",  
+        "4096" })})  
+public class DownAction extends BaseAction {
+	
+	private String filename;
+	private String filepath;
+	
+	
+
+
+
+	public String getFilepath() {
+		return filepath;
+	}
+
+
+
+
+
+	public void setFilepath(String filepath) {
+		this.filepath = filepath;
+	}
+
+
+
+
+
+	public String getFilename() {
+		return filename;
+	}
+
+
+
+
+
+	public void setFilename(String filename) throws UnsupportedEncodingException {
+		 String agent = ServletActionContext. getRequest().getHeader("User-agent"); 
+		 if(agent.contains("MSIE")){  
+	          this.filename = URLEncoder.encode(filename, "UTF-8");  
+	        }else{  
+	           this.filename =new String(filename.getBytes(),"ISO-8859-1");    
+	        }  
+	    }  
+
+
+
+
+
+	public String download(){
+		return "download";
+	}
+	
+	public String getDownloadFileName(){
+		return filename;
+	}
+	
+	 public InputStream getInputStream() throws Exception { 
+		 String savePath = ServletActionContext.getServletContext().getRealPath(filepath); 
+		 return new FileInputStream(new File(savePath));  
+}  
+	
+}

+ 119 - 0
src/main/java/com/post/action/DownloadAction.java

@@ -0,0 +1,119 @@
+package com.post.action;
+
+import java.util.List;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Download;
+import com.post.pageModel.Json;
+import com.post.service.DownloadServiceI;
+
+/**
+ * 下载
+ */
+@Action(value = "downloadAction", results = {
+		@Result(name = "downloadManager", location = "/admin/download/downloadManager.jsp"),
+		@Result(name = "downloadAdd", location = "/admin/download/downloadAdd.jsp"),
+		@Result(name = "downloadEdit", location = "/admin/download/downloadEdit.jsp"),
+		@Result(name = "showDownload", location = "/layout/portal/download.jsp")})
+public class DownloadAction extends BaseAction implements ModelDriven<Download> {
+
+	private Download download = new Download();
+	private DownloadServiceI downloadService;
+	private List<Download> alist;
+	
+	
+
+	public List<Download> getAlist() {
+		return alist;
+	}
+
+	public void setAlist(List<Download> alist) {
+		this.alist = alist;
+	}
+
+	public DownloadServiceI getDownloadService() {
+		return downloadService;
+	}
+
+	@Autowired
+	public void setDownloadService(DownloadServiceI downloadService) {
+		this.downloadService = downloadService;
+	}
+
+	@Override
+	public Download getModel() {
+		return download;
+	}
+
+
+	public String downloadManager() {
+		return "downloadManager";
+	}
+	public String uploader() {
+		return "uploader";
+	}
+	
+	public String do_listDownload() {
+		alist = downloadService.listDownload();
+		return "showDownload";
+	}
+
+	public String downloadEdit() {
+		return "downloadEdit";
+	}
+
+	public String downloadAdd() {
+		return "downloadAdd";
+	}
+
+	
+	public void do_showDownload(){
+		super.writeJson(downloadService.listDownload());
+	}
+	
+	public void do_datagrid() {
+		super.writeJson(downloadService.datagrid(download));
+	}
+	
+	public void add() {
+		Json j = new Json();
+		try {
+			downloadService.add(download);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			downloadService.edit(download);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			downloadService.delete(download);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(download.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+}

+ 93 - 0
src/main/java/com/post/action/FileAction.java

@@ -0,0 +1,93 @@
+package com.post.action;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.File;
+import com.post.pageModel.Json;
+import com.post.service.FileServiceI;
+
+/**
+ * 文件
+ */
+@Action(value = "fileAction", results = {
+		@Result(name = "fileManager", location = "/busi/file/fileManager.jsp"),
+		@Result(name = "fileAdd", location = "/busi/file/fileAdd.jsp"),
+		@Result(name = "fileEdit", location = "/busi/file/fileEdit.jsp"),
+		@Result(name = "showContent", location = "/busi/file/showContent.jsp")})
+public class FileAction extends BaseAction implements ModelDriven<File> {
+
+	private File file = new File();
+	private FileServiceI fileService;
+
+	public FileServiceI getFileService() {
+		return fileService;
+	}
+
+	@Autowired
+	public void setFileService(FileServiceI fileService) {
+		this.fileService = fileService;
+	}
+
+	@Override
+	public File getModel() {
+		return file;
+	}
+
+	public String fileManager() {
+		return "fileManager";
+	}
+
+	public String fileAdd() {
+		return "fileAdd";
+	}
+
+	public String fileEdit() {
+		return "fileEdit";
+	}
+
+	public void do_datagrid() {
+		super.writeJsonDate(fileService.datagrid(file));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			fileService.add(file);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			fileService.edit(file);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		fileService.delete(file);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_combobox() {
+		super.writeJson(fileService.combobox());
+	}
+	
+
+}

+ 92 - 0
src/main/java/com/post/action/KindAction.java

@@ -0,0 +1,92 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Kind;
+import com.post.service.KindServiceI;
+
+/**
+ * 分类
+ */
+@Action(value="kindAction",results = { @Result(name = "kindManager", location = "/busi/kind/kindManager.jsp"), @Result(name = "kindAdd", location = "/busi/kind/kindAdd.jsp"), @Result(name = "kindEdit", location = "/busi/kind/kindEdit.jsp") })
+public class KindAction extends BaseAction implements ModelDriven<Kind> {
+	
+	private Kind kind=new Kind();
+	private KindServiceI kindService;
+	
+	
+
+	public KindServiceI getKindService() {
+		return kindService;
+	}
+
+
+	@Autowired
+	public void setKindService(KindServiceI kindService) {
+		this.kindService = kindService;
+	}
+
+
+
+	@Override
+	public Kind getModel() {
+		return kind;
+	}
+
+	public String kindManager(){
+		return "kindManager";
+	}
+	
+	public String kindAdd(){
+		return "kindAdd";
+	}
+	
+	public String kindEdit(){
+		return "kindEdit";
+	}
+	
+	public void add(){
+		Json j = new Json();
+		try {
+			kindService.add(kind);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void do_treegrid(){
+		super.writeJson(kindService.treegrid(kind));
+	}
+	
+	public void delete(){
+		Json j = new Json();
+		try {
+			kindService.delete(kind);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(kind.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void edit(){
+		Json j = new Json();
+		try {
+			kindService.edit(kind);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+}

+ 117 - 0
src/main/java/com/post/action/KmlzAction.java

@@ -0,0 +1,117 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Kmlz;
+import com.post.pageModel.Json;
+import com.post.service.KmlzServiceI;
+
+/**
+ * 凭证号
+ */
+@Action(value = "kmlzAction", results = {
+		@Result(name = "kmlzPzhView", location = "/busi/kmlz/kmlzPzhView.jsp"),
+		@Result(name = "kmlzPzhEdit", location = "/busi/kmlz/kmlzPzhEdit.jsp"),
+		@Result(name = "kmlzAdd", location = "/busi/kmlz/kmlzAdd.jsp"),
+		@Result(name = "kmlzPzhAdd", location = "/busi/kmlz/kmlzPzhAdd.jsp") })
+public class KmlzAction extends BaseAction implements ModelDriven<Kmlz> {
+
+	private Kmlz kmlz = new Kmlz();
+	private KmlzServiceI kmlzService;
+
+	public KmlzServiceI getKmlzService() {
+		return kmlzService;
+	}
+
+	@Autowired
+	public void setKmlzService(KmlzServiceI kmlzService) {
+		this.kmlzService = kmlzService;
+	}
+
+	@Override
+	public Kmlz getModel() {
+		return kmlz;
+	}
+
+
+	public String kmlzPzhView() {
+		return "kmlzPzhView";
+	}
+
+	public String kmlzPzhAdd() {
+		return "kmlzPzhAdd";
+	}
+
+	public String kmlzAdd() {
+		return "kmlzAdd";
+	}
+	
+	public String kmlzPzhEdit() {
+		return "kmlzPzhEdit";
+	}
+	
+
+	public void addPzh() {
+		Json j = new Json();
+		try {
+			kmlzService.addPzh(kmlz);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void addKmlzs() {
+		Json j = new Json();
+		int count = 0;
+		try {
+			count = kmlzService.addKmlzs(kmlz);
+			if (count > 0) {
+				j.setSuccess(true);
+				j.setMsg("上传成功,新增" + count + "条科目列账明细!");
+				
+			} else {
+				j.setMsg("添加失败!");
+			}
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			kmlzService.edit(kmlz);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			kmlzService.delete(kmlz);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(kmlz.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void do_datagrid() {
+		super.writeJsonDate(kmlzService.datagrid(kmlz));
+	}
+	
+}

+ 119 - 0
src/main/java/com/post/action/LinkAction.java

@@ -0,0 +1,119 @@
+package com.post.action;
+
+import java.util.List;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Link;
+import com.post.service.LinkServiceI;
+
+/**
+ * 链接
+ */
+@Action(value = "linkAction", results = {
+		@Result(name = "linkManager", location = "/admin/link/linkManager.jsp"),
+		@Result(name = "linkAdd", location = "/admin/link/linkAdd.jsp"),
+		@Result(name = "linkEdit", location = "/admin/link/linkEdit.jsp"),
+		@Result(name = "showLink", location = "/layout/portal/link.jsp")})
+public class LinkAction extends BaseAction implements ModelDriven<Link> {
+
+	private Link link = new Link();
+	private LinkServiceI linkService;
+	private List<Link> alist;
+	
+	
+
+	public List<Link> getAlist() {
+		return alist;
+	}
+
+	public void setAlist(List<Link> alist) {
+		this.alist = alist;
+	}
+
+	public LinkServiceI getLinkService() {
+		return linkService;
+	}
+
+	@Autowired
+	public void setLinkService(LinkServiceI linkService) {
+		this.linkService = linkService;
+	}
+
+	@Override
+	public Link getModel() {
+		return link;
+	}
+
+
+	public String linkManager() {
+		return "linkManager";
+	}
+	public String uploader() {
+		return "uploader";
+	}
+	
+	public String do_listLink() {
+		alist = linkService.listLink();
+		return "showLink";
+	}
+
+	public String linkEdit() {
+		return "linkEdit";
+	}
+
+	public String linkAdd() {
+		return "linkAdd";
+	}
+
+	
+	public void do_showLink(){
+		super.writeJson(linkService.listLink());
+	}
+	
+	public void do_datagrid() {
+		super.writeJson(linkService.datagrid(link));
+	}
+	
+	public void add() {
+		Json j = new Json();
+		try {
+			linkService.add(link);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			linkService.edit(link);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			linkService.delete(link);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(link.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+}

+ 116 - 0
src/main/java/com/post/action/MenuAction.java

@@ -0,0 +1,116 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Menu;
+import com.post.service.MenuServiceI;
+
+/**
+ * 菜单
+ */
+@Action(value = "menuAction", results = { @Result(name = "menuManager", location = "/admin/menu/menuManager.jsp"), @Result(name = "menuAdd", location = "/admin/menu/menuAdd.jsp"), @Result(name = "menuEdit", location = "/admin/menu/menuEdit.jsp") })
+public class MenuAction extends BaseAction implements ModelDriven<Menu> {
+
+
+	private MenuServiceI menuService;
+
+	
+	
+	public MenuServiceI getMenuService() {
+		return menuService;
+	}
+
+	@Autowired
+	public void setMenuService(MenuServiceI menuService) {
+		this.menuService = menuService;
+	}
+
+	private Menu menu = new Menu();
+
+	public Menu getModel() {
+		return menu;
+	}
+
+	/**
+	 * 首页获得菜单树
+	 */
+	public void do_tree() {
+		super.writeJson(menuService.tree(menu, false));
+	}
+
+	public void do_treeRecursive() {
+		super.writeJson(menuService.tree(menu, true));
+	}
+
+	public String menuManager() {
+		return "menuManager";
+	}
+
+	/**
+	 * 获得菜单treegrid
+	 */
+	public void do_treegrid() {
+		super.writeJson(menuService.tgrid(menu, true));
+		//super.writeJson(menuService.treegrid(menu));
+	}
+
+	/**
+	 * 删除一个菜单
+	 */
+	public void delete() {
+		Json j = new Json();
+		try {
+			menuService.delete(menu);
+			j.setSuccess(true);
+			j.setMsg("删除成功!");
+			j.setObj(menu.getCid());
+		} catch (Exception e) {
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public String menuAdd() {
+		return "menuAdd";
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			menuService.add(menu);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public String menuEdit() {
+		return "menuEdit";
+	}
+
+	/**
+	 * 编辑菜单
+	 */
+	public void edit() {
+		Json j = new Json();
+		try {
+			menuService.edit(menu);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		writeJson(j);
+	}
+	
+	public void do_UserMenus(){
+		super.writeJson(menuService.getUserMenus(menu));
+	}
+
+}

+ 90 - 0
src/main/java/com/post/action/ProjectAction.java

@@ -0,0 +1,90 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Project;
+import com.post.service.ProjectServiceI;
+
+/**
+ * 归属项目
+ */
+@Action(value = "projectAction", results = {
+		@Result(name = "projectManager", location = "/busi/project/projectManager.jsp"),
+		@Result(name = "projectAdd", location = "/busi/project/projectAdd.jsp"),
+		@Result(name = "projectEdit", location = "/busi/project/projectEdit.jsp") })
+public class ProjectAction extends BaseAction implements ModelDriven<Project> {
+
+	private Project project = new Project();
+	private ProjectServiceI projectService;
+
+	public ProjectServiceI getProjectService() {
+		return projectService;
+	}
+
+	@Autowired
+	public void setProjectService(ProjectServiceI projectService) {
+		this.projectService = projectService;
+	}
+
+	@Override
+	public Project getModel() {
+		return project;
+	}
+
+	public String projectManager() {
+		return "projectManager";
+	}
+
+	public String projectAdd() {
+		return "projectAdd";
+	}
+
+	public String projectEdit() {
+		return "projectEdit";
+	}
+
+	public void do_datagrid() {
+		super.writeJson(projectService.datagrid(project));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			projectService.add(project);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			projectService.edit(project);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		projectService.delete(project);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_combobox() {
+		super.writeJson(projectService.combobox());
+	}
+
+}

+ 100 - 0
src/main/java/com/post/action/RoleAction.java

@@ -0,0 +1,100 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Role;
+import com.post.service.RoleServiceI;
+
+/**
+ * 角色
+ */
+@Action(value = "roleAction", results = {
+		@Result(name = "roleManager", location = "/admin/role/roleManager.jsp"),
+		@Result(name = "roleAdd", location = "/admin/role/roleAdd.jsp"),
+		@Result(name = "roleEdit", location = "/admin/role/roleEdit.jsp") })
+public class RoleAction extends BaseAction implements ModelDriven<Role> {
+
+	private Role role = new Role();
+	private RoleServiceI roleService;
+
+	public RoleServiceI getRoleService() {
+		return roleService;
+	}
+	
+	@Autowired
+	public void setRoleService(RoleServiceI roleService) {
+		this.roleService = roleService;
+	}
+
+	@Override
+	public Role getModel() {
+		return role;
+	}
+
+	public String roleManager() {
+		return "roleManager";
+	}
+
+	public String roleAdd() {
+		return "roleAdd";
+	}
+
+	public String roleEdit() {
+		return "roleEdit";
+	}
+	
+	public void do_datagrid() {
+		super.writeJson(roleService.datagrid(role));
+	}
+	
+	public void add() {
+		Json j = new Json();
+		try {
+			roleService.add(role);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	/**
+	 * 编辑一个角色
+	 */
+	public void edit() {
+		Json j = new Json();
+		try {
+			roleService.edit(role);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	/**
+	 * 删除一个或多个角色
+	 */
+	public void delete() {
+		Json j = new Json();
+		roleService.delete(role.getIds());
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	/**
+	 * 获得角色下拉列表
+	 */
+	public void do_combobox() {
+		super.writeJson(roleService.combobox());
+	}
+
+
+}

+ 90 - 0
src/main/java/com/post/action/ShangpinAction.java

@@ -0,0 +1,90 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Shangpin;
+import com.post.service.ShangpinServiceI;
+
+/**
+ * 商品
+ */
+@Action(value = "shangpinAction", results = {
+		@Result(name = "shangpinManager", location = "/busi/shangpin/shangpinManager.jsp"),
+		@Result(name = "shangpinAdd", location = "/busi/shangpin/shangpinAdd.jsp"),
+		@Result(name = "shangpinEdit", location = "/busi/shangpin/shangpinEdit.jsp") })
+public class ShangpinAction extends BaseAction implements ModelDriven<Shangpin> {
+
+	private Shangpin shangpin = new Shangpin();
+	private ShangpinServiceI shangpinService;
+
+	public ShangpinServiceI getShangpinService() {
+		return shangpinService;
+	}
+
+	@Autowired
+	public void setShangpinService(ShangpinServiceI shangpinService) {
+		this.shangpinService = shangpinService;
+	}
+
+	@Override
+	public Shangpin getModel() {
+		return shangpin;
+	}
+
+	public String shangpinManager() {
+		return "shangpinManager";
+	}
+
+	public String shangpinAdd() {
+		return "shangpinAdd";
+	}
+
+	public String shangpinEdit() {
+		return "shangpinEdit";
+	}
+
+	public void do_datagrid() {
+		super.writeJson(shangpinService.datagrid(shangpin));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			shangpinService.add(shangpin);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			shangpinService.edit(shangpin);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		shangpinService.delete(shangpin);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_combobox() {
+		super.writeJson(shangpinService.combobox());
+	}
+
+}

+ 201 - 0
src/main/java/com/post/action/UploadAction.java

@@ -0,0 +1,201 @@
+package com.post.action;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Random;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.aspectj.util.FileUtil;
+
+import com.alibaba.fastjson.JSONObject;
+import com.post.util.ConfigUtil;
+
+@Action(value="uploadAction")
+public class UploadAction extends BaseAction {
+	private File imgFile;  
+    /** 
+     * 文件名称 
+     */  
+    private String imgFileFileName;  
+  
+    /** 
+     * 图片宽度 
+     */  
+    private String imgWidth;  
+  
+    /** 
+     * 图片高度 
+     */  
+    private String imgHeight;  
+  
+    /** 
+     * 图片对齐方式 
+     */  
+    private String align;  
+  
+    /** 
+     * 图片标题 
+     */  
+    private String imgTitle;  
+  
+    public File getImgFile() {  
+        return imgFile;  
+    }  
+  
+    public void setImgFile(File imgFile) {  
+        this.imgFile = imgFile;  
+    }  
+  
+    public String getImgFileFileName() {  
+        return imgFileFileName;  
+    }  
+  
+    public void setImgFileFileName(String imgFileFileName) {  
+        this.imgFileFileName = imgFileFileName;  
+    }  
+  
+    public String getImgWidth() {  
+        return imgWidth;  
+    }  
+  
+    public void setImgWidth(String imgWidth) {  
+        this.imgWidth = imgWidth;  
+    }  
+  
+    public String getImgHeight() {  
+        return imgHeight;  
+    }  
+  
+    public void setImgHeight(String imgHeight) {  
+        this.imgHeight = imgHeight;  
+    }  
+  
+    public String getAlign() {  
+        return align;  
+    }  
+  
+    public void setAlign(String align) {  
+        this.align = align;  
+    }  
+  
+    public String getImgTitle() {  
+        return imgTitle;  
+    }  
+  
+    public void setImgTitle(String imgTitle) {  
+        this.imgTitle = imgTitle;  
+    }  
+  
+    public String upload() {  
+  
+        ServletActionContext.getResponse().setContentType(  
+                "text/html; charset=UTF-8");  
+        // 文件保存目录路径  
+        String savePath = ServletActionContext.getServletContext().getRealPath(  
+                "/")  
+                + "attached/";  
+        // 文件保存目录URL  
+        String saveUrl = ServletActionContext.getRequest().getContextPath()  
+                + "/attached/";  
+        // 定义允许上传的文件扩展名  
+  
+     // 定义允许上传的文件扩展名
+     		HashMap<String, String> extMap = new HashMap<String, String>();
+     		extMap.put("image", ConfigUtil.get("image"));
+     		extMap.put("flash", ConfigUtil.get("flash"));
+     		extMap.put("media", ConfigUtil.get("media"));
+     		extMap.put("file", ConfigUtil.get("file"));
+
+     		long maxSize = Long.parseLong(ConfigUtil.get("maxFileSize")); // 允许上传最大文件大小(字节)
+        PrintWriter out = null;  
+        try {  
+            out = ServletActionContext.getResponse().getWriter();  
+        } catch (IOException e1) {  
+  
+        }  
+  
+        if (imgFile == null) {  
+            out.println(getError("请选择文件!"));  
+            return null;  
+        }  
+  
+        // 检查目录  
+        File uploadDir = new File(savePath);  
+        if (!uploadDir.isDirectory()) {  
+        	uploadDir.mkdirs();
+        }  
+        // 检查目录写权限  
+        if (!uploadDir.canWrite()) {  
+            out.println(getError("上传目录没有写权限!"));  
+            return null;  
+        }  
+        String dirName = ServletActionContext.getRequest().getParameter("dir");  
+        if (dirName == null) {  
+            dirName = "image";  
+        }  
+        if (!extMap.containsKey(dirName)) {  
+            System.out.println(getError("目录名不正确!"));  
+            return null;  
+        }  
+        // 创建文件夹  
+        savePath += dirName + "/";  
+        saveUrl += dirName + "/";  
+        File saveDirFile = new File(savePath);  
+        if (!saveDirFile.exists()) {  
+  
+            saveDirFile.mkdirs();  
+        }  
+  
+        // 创建文件夹  
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");  
+        String ymd = sdf.format(new Date());  
+        savePath += ymd + "/";  
+        saveUrl += ymd + "/";  
+        File dirFile = new File(savePath);  
+        if (!dirFile.exists()) {  
+            dirFile.mkdirs();  
+        }  
+        String fileExt = imgFileFileName.substring(  
+                imgFileFileName.lastIndexOf(".") + 1).toLowerCase();  
+        if (!Arrays.<String> asList(extMap.get(dirName).split(",")).contains(  
+                fileExt)) {  
+            System.out.println(getError("上传文件扩展名是不允许的扩展名。\n只允许"  
+                    + extMap.get(dirName) + "格式。"));  
+            return null;  
+        }  
+        if (imgFile.length() > maxSize) {  
+            out.println(getError("[ " + imgFileFileName + " ]超过单个文件大小限制,文件大小[ "  
+                    + imgFile.length() + " ],限制为[ " + maxSize + " ] "));  
+            return null;  
+        }  
+        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");  
+        String newFileName = imgFileFileName + "_"  
+                + new Random().nextInt(1000) + "." + fileExt;  
+        File uploadedFile = new File(savePath, newFileName);  
+        try {  
+            FileUtil.copyFile(imgFile, uploadedFile);  
+            JSONObject obj = new JSONObject();  
+            obj.put("error", 0);  
+            obj.put("url", saveUrl + newFileName);  
+  
+            out.println(obj.toString());  
+  
+        } catch (IOException e) {  
+  
+        }  
+        return null;  
+    }  
+  
+    private String getError(String message) {  
+        JSONObject obj = new JSONObject();  
+        obj.put("error", 1);  
+        obj.put("message", message);  
+        return obj.toString();  
+    }  
+}

+ 171 - 0
src/main/java/com/post/action/UploadFileAction.java

@@ -0,0 +1,171 @@
+package com.post.action;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.aspectj.util.FileUtil;
+
+import com.post.util.ConfigUtil;
+
+
+@Action(value="uploadFileAction")
+public class UploadFileAction extends BaseAction {
+
+	    private File file;
+	    private String fileFileName;
+	    private String fileContentType;
+	    private String message = "文件上传成功!";
+
+		public String getMessage() {
+	        return message;
+	    }
+
+	    public void setMessage(String message) {
+	        this.message = message;
+	    }
+
+	    public File getFile() {
+	        return file;
+	    }
+
+	    public void setFile(File file) {
+	        this.file = file;
+	    }
+
+	    public String getFileFileName() {
+	        return fileFileName;
+	    }
+
+	    public void setFileFileName(String fileFileName) {
+	        this.fileFileName = fileFileName;
+	    }
+
+	    
+	    
+
+	    public String getFileContentType() {
+			return fileContentType;
+		}
+
+		public void setFileContentType(String fileContentType) {
+			this.fileContentType = fileContentType;
+		}
+
+		public void upload() {
+	    	
+			Map<String,Object> m = new HashMap<String,Object>();
+	    	boolean state = false;
+	    	String msg = "文件上传失败!";
+	    	
+	    	ServletActionContext.getResponse().setContentType(  
+	                "text/html; charset=UTF-8");  
+	        // 文件保存目录路径  
+	        String savePath = ServletActionContext.getServletContext().getRealPath(  
+	                "/")  
+	                + "attached\\upload\\";  
+	        // 文件保存目录URL  
+	        String saveUrl = "/attached/upload/";  
+	        // 定义允许上传的文件扩展名  
+	  
+	     // 定义允许上传的文件扩展名
+	     		HashMap<String, String> extMap = new HashMap<String, String>();
+	     		extMap.put("image", ConfigUtil.get("image"));
+	     		extMap.put("flash", ConfigUtil.get("flash"));
+	     		extMap.put("media", ConfigUtil.get("media"));
+	     		extMap.put("file", ConfigUtil.get("file"));
+
+	     		long maxSize = Long.parseLong(ConfigUtil.get("maxFileSize")); // 允许上传最大文件大小(字节)
+	     		
+	     		if (file == null) {  
+	                msg="请选择文件!"; 
+	                state=false;
+	                m.put("msg",msg);
+	                m.put("state", state);
+	                super.writeJson(m);
+	                return ; 
+	            }  
+	      
+	            // 检查目录  
+	            File uploadDir = new File(savePath);  
+	            if (!uploadDir.isDirectory()) {  
+	            	uploadDir.mkdirs();
+	            }  
+	            // 检查目录写权限  
+	            if (!uploadDir.canWrite()) {  
+	            	 msg="上传失败,上传目录没有写权限!"; 
+		                state=false;
+		                m.put("msg",msg);
+		                m.put("state", state);
+		                super.writeJson(m);
+		                return ;  
+	            }  
+	            String dirName = ServletActionContext.getRequest().getParameter("dir");  
+	            if (dirName == null) {  
+	                dirName = "file";  
+	            }  
+	            // 创建文件夹  
+	            savePath += dirName + "\\";  
+	            saveUrl += dirName + "/";  
+	            File saveDirFile = new File(savePath);  
+	            if (!saveDirFile.exists()) {  
+	      
+	                saveDirFile.mkdirs();  
+	            }  
+	      
+	            // 创建文件夹  
+	            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");  
+	            String ymd = sdf.format(new Date());  
+	            savePath += ymd + "\\";  
+	            saveUrl += ymd + "/";  
+	            File dirFile = new File(savePath);  
+	            if (!dirFile.exists()) {  
+	                dirFile.mkdirs();  
+	            }  
+	            String fileExt = fileFileName.substring(  
+	                    fileFileName.lastIndexOf(".") + 1).toLowerCase();  
+	            if (!Arrays.<String> asList(extMap.get(dirName).split(",")).contains(  
+	                    fileExt)) {  
+	            	    msg="上传失败,上传文件扩展名是不允许的扩展名!"; 
+		                state=false;
+		                m.put("msg",msg);
+		                m.put("state", state);
+		                super.writeJson(m);
+		                return ;  
+	            }  
+	            if (file.length() > maxSize) { 
+	            	 msg="上传失败,文件大小超过允许上传的最大值,最大为【"+ maxSize + " 】。 "; 
+		                state=false;
+		                m.put("msg",msg);
+		                m.put("state", state);
+		                super.writeJson(m);
+		                return ; 
+	            }  
+	            SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");  
+	            String newFileName = df.format(new Date()) + "_"  
+	                    + new Random().nextInt(10000) + "." + fileExt;  
+	            File uploadedFile = new File(savePath, newFileName);  
+	            try {  
+	                FileUtil.copyFile(file, uploadedFile); 
+	                state = true;
+	                msg = "上传文件成功!";
+	                m.put("msg",msg);
+	                m.put("state", state);
+	                m.put("filename", fileFileName);
+	                m.put("cfilename", savePath+newFileName);
+	                m.put("url", saveUrl+newFileName);
+	                super.writeJson(m);
+	                return ; 
+	      
+	            } catch (IOException e) {  
+	            	 e.printStackTrace();
+	            }  
+	    }
+}

+ 179 - 0
src/main/java/com/post/action/UserAction.java

@@ -0,0 +1,179 @@
+package com.post.action;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Namespace;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.SessionInfo;
+import com.post.pageModel.User;
+import com.post.service.UserServiceI;
+import com.post.util.IpUtil;
+import com.post.util.ResourceUtil;
+
+/**
+ * 用户
+ */
+@Namespace("/")
+@Action(value = "userAction", results = {
+		@Result(name = "userManager", location = "/admin/user/userManager.jsp"),
+		@Result(name = "userAdd", location = "/admin/user/userAdd.jsp"),
+		@Result(name = "userEdit", location = "/admin/user/userEdit.jsp"),
+		@Result(name = "userChangePwd", location = "/admin/user/userChangePwd.jsp"),
+		@Result(name = "lockWindow", location = "/admin/user/lockWindow.jsp")})
+public class UserAction extends BaseAction implements ModelDriven<User> {
+
+	private UserServiceI userService;
+	private User user = new User();
+
+	public UserServiceI getUserService() {
+		return userService;
+	}
+
+	@Autowired
+	public void setUserService(UserServiceI userService) {
+		this.userService = userService;
+	}
+
+	@Override
+	public User getModel() {
+		return user;
+	}
+
+	public void do_login() {
+		Json j = new Json();
+		User u = userService.login(user);
+		if (u != null) {
+			SessionInfo sessionInfo = new SessionInfo();
+			sessionInfo.setUserId(u.getCid());
+			sessionInfo.setLoginName(user.getCusername());
+			sessionInfo.setIpAddress(IpUtil.getIpAddr(ServletActionContext.getRequest()));
+			ServletActionContext.getRequest().getSession().setAttribute(ResourceUtil.getSessionInfoName(),sessionInfo);
+			sessionInfo.setAuthIds(u.getAuthIds());
+			sessionInfo.setAuthNames(u.getAuthNames());
+			sessionInfo.setRoleIds(u.getRoleIds());
+			sessionInfo.setRoleNames(u.getRoleNames());
+			sessionInfo.setAuthUrls(u.getAuthUrls());
+			sessionInfo.setDeptName(u.getCdeptname());
+			sessionInfo.setDeptId(u.getCdepartment());
+			sessionInfo.setLock(false);
+			j.setSuccess(true);
+			j.setMsg("登陆成功");
+		} else {
+			j.setMsg("登陆失败,用户名或密码错误!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void doNotNeedAuth_unlock(){
+		Json j = new Json();
+		boolean b = userService.unlock(user);
+		if (b) {
+			j.setSuccess(true);
+			j.setMsg("解锁成功!");
+			SessionInfo si=(SessionInfo)ServletActionContext.getRequest().getSession().getAttribute("sessionInfo");
+			if (si!=null ){
+				si.setLock(false);
+			}
+		}else{
+			j.setSuccess(false);
+			j.setMsg("密码错误!");
+		}
+		super.writeJson(j);
+	}
+
+	public String userManager() {
+		return "userManager";
+	}
+	
+	public String doNotNeedAuth_lock(){
+		SessionInfo si=(SessionInfo)ServletActionContext.getRequest().getSession().getAttribute("sessionInfo");
+		if (si!=null ){
+			si.setLock(true);
+		}
+		return "lockWindow";
+	}
+
+	public String userAdd() {
+		return "userAdd";
+	}
+
+	public String userEdit() {
+		return "userEdit";
+	}
+
+	public String doNotNeedAuth_userChangePwd() {
+		return "userChangePwd";
+	}
+
+	public void do_dataGrid() {
+		super.writeJson(userService.datagrid(user));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			userService.addUser(user);
+			j.setMsg("添加成功!");
+			j.setSuccess(true);
+		} catch (Exception e) {
+			j.setMsg("添加失败,用户名已存在!");
+			j.setSuccess(false);
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			userService.update(user);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		try {
+			userService.del(user.getIds());
+			j.setSuccess(true);
+			j.setMsg("删除用户成功!");
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("删除失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void doNotNeedAuth_editPwd() {
+		Json j = new Json();
+		try {
+			Boolean b = userService.editPwd(user);
+			if (b) {
+				j.setSuccess(true);
+				j.setMsg("密码修改成功!");
+			} else {
+				j.setSuccess(false);
+				j.setMsg("密码修改失败,原密码错误!");
+			}
+		} catch (Exception e) {
+			j.setSuccess(false);
+			j.setMsg("密码修改失败!");
+		}
+		super.writeJson(j);
+	}
+	
+	public void do_logout(){
+		ServletActionContext.getRequest().getSession().invalidate();
+		Json j = new Json();
+		j.setSuccess(true);
+		super.writeJson(j);
+	}
+}

+ 33 - 0
src/main/java/com/post/action/VerifyCodeAction.java

@@ -0,0 +1,33 @@
+package com.post.action;
+
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.convention.annotation.Action;
+
+import com.post.pageModel.Json;
+
+@Action(value = "verifyCodeAction")
+public class VerifyCodeAction extends BaseAction {
+	private String code;
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public void do_verify() {
+		Json j = new Json();
+		String yzm = (String) ServletActionContext.getRequest().getSession()
+				.getAttribute("yzm");
+		if (yzm != null && yzm.equalsIgnoreCase(code)) {
+			j.setSuccess(true);
+			j.setMsg("验证码通过!");
+		} else {
+			j.setSuccess(false);
+			j.setMsg("验证码错误!");
+		}
+		super.writeJson(j);
+	}
+}

+ 90 - 0
src/main/java/com/post/action/ZrzxAction.java

@@ -0,0 +1,90 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Zrzx;
+import com.post.service.ZrzxServiceI;
+
+/**
+ * 专业
+ */
+@Action(value = "zrzxAction", results = {
+		@Result(name = "zrzxManager", location = "/busi/zrzx/zrzxManager.jsp"),
+		@Result(name = "zrzxAdd", location = "/busi/zrzx/zrzxAdd.jsp"),
+		@Result(name = "zrzxEdit", location = "/busi/zrzx/zrzxEdit.jsp") })
+public class ZrzxAction extends BaseAction implements ModelDriven<Zrzx> {
+
+	private Zrzx zrzx = new Zrzx();
+	private ZrzxServiceI zrzxService;
+
+	public ZrzxServiceI getZrzxService() {
+		return zrzxService;
+	}
+
+	@Autowired
+	public void setZrzxService(ZrzxServiceI zrzxService) {
+		this.zrzxService = zrzxService;
+	}
+
+	@Override
+	public Zrzx getModel() {
+		return zrzx;
+	}
+
+	public String zrzxManager() {
+		return "zrzxManager";
+	}
+
+	public String zrzxAdd() {
+		return "zrzxAdd";
+	}
+
+	public String zrzxEdit() {
+		return "zrzxEdit";
+	}
+
+	public void do_datagrid() {
+		super.writeJson(zrzxService.datagrid(zrzx));
+	}
+
+	public void add() {
+		Json j = new Json();
+		try {
+			zrzxService.add(zrzx);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			zrzxService.edit(zrzx);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		zrzxService.delete(zrzx);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_combobox() {
+		super.writeJson(zrzxService.combobox());
+	}
+
+}

+ 92 - 0
src/main/java/com/post/action/kjkmAction.java

@@ -0,0 +1,92 @@
+package com.post.action;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.ModelDriven;
+import com.post.pageModel.Json;
+import com.post.pageModel.Subject;
+import com.post.service.KjkmServiceI;
+
+/**
+ * 会计科目
+ */
+@Action(value = "kjkmAction", results = {
+		@Result(name = "kjkmManager", location = "/busi/kjkm/kjkmManager.jsp"),
+		@Result(name = "kjkmAdd", location = "/busi/kjkm/kjkmAdd.jsp"),
+		@Result(name = "kjkmEdit", location = "/busi/kjkm/kjkmEdit.jsp") })
+public class kjkmAction extends BaseAction implements ModelDriven<Subject> {
+
+	private Subject subject = new Subject();
+	private KjkmServiceI kjkmService;
+	
+
+	public KjkmServiceI getKjkmService() {
+		return kjkmService;
+	}
+
+	@Autowired
+	public void setKjkmService(KjkmServiceI kjkmService) {
+		this.kjkmService = kjkmService;
+	}
+
+	@Override
+	public Subject getModel() {
+		return subject;
+	}
+
+	public String kjkmManager() {
+		return "kjkmManager";
+	}
+
+	public String kjkmAdd() {
+		return "kjkmAdd";
+	}
+
+	public String kjkmEdit() {
+		return "kjkmEdit";
+	}
+	
+	public void do_datagrid() {
+		super.writeJson(kjkmService.datagrid(subject));
+	}
+	
+	public void add() {
+		Json j = new Json();
+		try {
+			kjkmService.add(subject);
+			j.setSuccess(true);
+			j.setMsg("添加成功!");
+		} catch (Exception e) {
+			j.setMsg("添加失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void edit() {
+		Json j = new Json();
+		try {
+			kjkmService.edit(subject);
+			j.setSuccess(true);
+			j.setMsg("编辑成功!");
+		} catch (Exception e) {
+			j.setMsg("编辑失败!");
+		}
+		super.writeJson(j);
+	}
+
+	public void delete() {
+		Json j = new Json();
+		kjkmService.delete(subject);
+		j.setSuccess(true);
+		j.setMsg("删除成功!");
+		super.writeJson(j);
+	}
+
+	public void do_treegrid(){
+		super.writeJson(kjkmService.treegrid(subject));
+	}
+
+}
+

+ 21 - 0
src/main/java/com/post/comparator/AuthComparator.java

@@ -0,0 +1,21 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.Tauth;
+
+/**
+ * Auth排序
+ * 
+ * @author 孙宇
+ * 
+ */
+public class AuthComparator implements Comparator<Tauth> {
+
+	public int compare(Tauth o1, Tauth o2) {
+		int i1 = o1.getCseq() != null ? o1.getCseq().intValue() : -1;
+		int i2 = o2.getCseq() != null ? o2.getCseq().intValue() : -1;
+		return i1 - i2;
+	}
+
+}

+ 16 - 0
src/main/java/com/post/comparator/DeptComparator.java

@@ -0,0 +1,16 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.Tdept;
+
+public class DeptComparator  implements Comparator<Tdept> {
+
+	@Override
+	public int compare(Tdept o1, Tdept o2) {
+		int i1 = o1.getCseq() != null ? o1.getCseq().intValue() : -1;
+		int i2 = o2.getCseq() != null ? o2.getCseq().intValue() : -1;
+		return i1 - i2;
+	}
+
+}

+ 16 - 0
src/main/java/com/post/comparator/KindComparator.java

@@ -0,0 +1,16 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.Tkind;
+
+public class KindComparator  implements Comparator<Tkind> {
+
+	@Override
+	public int compare(Tkind o1, Tkind o2) {
+		int i1 = o1.getCseq() != null ? o1.getCseq().intValue() : -1;
+		int i2 = o2.getCseq() != null ? o2.getCseq().intValue() : -1;
+		return i1 - i2;
+	}
+
+}

+ 21 - 0
src/main/java/com/post/comparator/MenuComparator.java

@@ -0,0 +1,21 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.Tmenu;
+
+/**
+ * 菜单排序
+ * 
+ * @author 孙宇
+ * 
+ */
+public class MenuComparator implements Comparator<Tmenu> {
+
+	public int compare(Tmenu o1, Tmenu o2) {
+		int i1 = o1.getCseq() != null ? o1.getCseq().intValue() : -1;
+		int i2 = o2.getCseq() != null ? o2.getCseq().intValue() : -1;
+		return i1 - i2;
+	}
+
+}

+ 18 - 0
src/main/java/com/post/comparator/NameComparator.java

@@ -0,0 +1,18 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+import java.util.Hashtable;
+
+public class NameComparator implements Comparator {
+	public int compare(Object a, Object b) {
+		Hashtable hashA = (Hashtable) a;
+		Hashtable hashB = (Hashtable) b;
+		if (((Boolean) hashA.get("is_dir")) && !((Boolean) hashB.get("is_dir"))) {
+			return -1;
+		} else if (!((Boolean) hashA.get("is_dir")) && ((Boolean) hashB.get("is_dir"))) {
+			return 1;
+		} else {
+			return ((String) hashA.get("filename")).compareTo((String) hashB.get("filename"));
+		}
+	}
+}

+ 16 - 0
src/main/java/com/post/comparator/RoleMenuComparator.java

@@ -0,0 +1,16 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.TroleTmenu;
+
+public class RoleMenuComparator implements Comparator<TroleTmenu> {
+
+	@Override
+	public int compare(TroleTmenu o1, TroleTmenu o2) {
+		int i1 = o1.getTmenu().getCseq() != null  ? o1.getTmenu().getCseq().intValue()	: -1;
+		int i2 = o2.getTmenu().getCseq() != null ? o2.getTmenu().getCseq().intValue()	: -1;
+		return i1-i2;
+	}
+
+}

+ 24 - 0
src/main/java/com/post/comparator/SizeComparator.java

@@ -0,0 +1,24 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+import java.util.Hashtable;
+
+public class SizeComparator implements Comparator {
+	public int compare(Object a, Object b) {
+		Hashtable hashA = (Hashtable) a;
+		Hashtable hashB = (Hashtable) b;
+		if (((Boolean) hashA.get("is_dir")) && !((Boolean) hashB.get("is_dir"))) {
+			return -1;
+		} else if (!((Boolean) hashA.get("is_dir")) && ((Boolean) hashB.get("is_dir"))) {
+			return 1;
+		} else {
+			if (((Long) hashA.get("filesize")) > ((Long) hashB.get("filesize"))) {
+				return 1;
+			} else if (((Long) hashA.get("filesize")) < ((Long) hashB.get("filesize"))) {
+				return -1;
+			} else {
+				return 0;
+			}
+		}
+	}
+}

+ 16 - 0
src/main/java/com/post/comparator/SubjectComparator.java

@@ -0,0 +1,16 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+
+import com.post.model.Tsubject;
+
+public class SubjectComparator  implements Comparator<Tsubject> {
+
+	@Override
+	public int compare(Tsubject o1, Tsubject o2) {
+		int i1 = o1.getCseq() != null ? o1.getCseq().intValue() : -1;
+		int i2 = o2.getCseq() != null ? o2.getCseq().intValue() : -1;
+		return i1 - i2;
+	}
+
+}

+ 18 - 0
src/main/java/com/post/comparator/TypeComparator.java

@@ -0,0 +1,18 @@
+package com.post.comparator;
+
+import java.util.Comparator;
+import java.util.Hashtable;
+
+public class TypeComparator implements Comparator {
+	public int compare(Object a, Object b) {
+		Hashtable hashA = (Hashtable) a;
+		Hashtable hashB = (Hashtable) b;
+		if (((Boolean) hashA.get("is_dir")) && !((Boolean) hashB.get("is_dir"))) {
+			return -1;
+		} else if (!((Boolean) hashA.get("is_dir")) && ((Boolean) hashB.get("is_dir"))) {
+			return 1;
+		} else {
+			return ((String) hashA.get("filetype")).compareTo((String) hashB.get("filetype"));
+		}
+	}
+}

+ 164 - 0
src/main/java/com/post/dao/BaseDaoI.java

@@ -0,0 +1,164 @@
+package com.post.dao;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+public interface BaseDaoI<T> {
+
+	public Serializable save(T o);
+
+	/**
+	 * 删除一个对象
+	 * 
+	 * @param o
+	 */
+	public void delete(T o);
+
+	/**
+	 * 更新一个对象
+	 * 
+	 * @param o
+	 */
+	public void update(T o);
+
+	/**
+	 * 保存或更新对象
+	 * 
+	 * @param o
+	 */
+	public void saveOrUpdate(T o);
+
+	/**
+	 * 查询
+	 * 
+	 * @param hql
+	 * @return
+	 */
+	public List<T> find(String hql);
+
+	/**
+	 * 查询集合
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return
+	 */
+	public List<T> find(String hql, Map<String, Object> params);
+
+	/**
+	 * 查询集合
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return
+	 */
+	public List<T> find(String hql, List<Object> param);
+
+	/**
+	 * 查询集合(带分页)
+	 * 
+	 * @param hql
+	 * @param param
+	 * @param page
+	 *            查询第几页
+	 * @param rows
+	 *            每页显示几条记录
+	 * @return
+	 */
+	public List<T> find(String hql, Map<String, Object> params, Integer page, Integer rows);
+
+	/**
+	 * 查询集合(带分页)
+	 * 
+	 * @param hql
+	 * @param param
+	 * @param page
+	 * @param rows
+	 * @return
+	 */
+	public List<T> find(String hql, List<Object> param, Integer page, Integer rows);
+
+	public List<T> find(String hql, Integer page, Integer rows);
+
+	/**
+	 * 获得一个对象
+	 * 
+	 * @param c
+	 *            对象类型
+	 * @param id
+	 * @return Object
+	 */
+	public T get(Class<T> c, Serializable id);
+
+	/**
+	 * 获得一个对象
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return Object
+	 */
+
+	public T get(String hql, List<Object> param);
+
+	/**
+	 * select count(*) from 类
+	 * 
+	 * @param hql
+	 * @return
+	 */
+
+	public T get(String hql, Map<String, Object> params);
+
+	public Long count(String hql);
+
+	/**
+	 * select count(*) from 类
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return
+	 */
+	public Long count(String hql, Map<String, Object> params);
+
+	/**
+	 * select count(*) from 类
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return
+	 */
+	public Long count(String hql, List<Object> param);
+
+	/**
+	 * 执行HQL语句
+	 * 
+	 * @param hql
+	 * @return 响应数目
+	 */
+	public Integer executeHql(String hql);
+
+	/**
+	 * 执行HQL语句
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return 响应数目
+	 */
+	public Integer executeHql(String hql, Map<String, Object> params);
+
+	/**
+	 * 执行HQL语句
+	 * 
+	 * @param hql
+	 * @param param
+	 * @return
+	 */
+	public Integer executeHql(String hql, List<Object> param);
+
+	public Double sum(String hql);
+
+	public Double sum(String hql, Map<String, Object> params);
+
+	public Object[] summ(String hql, Map<String, Object> params);
+}

+ 238 - 0
src/main/java/com/post/dao/impl/BaseDaoImpl.java

@@ -0,0 +1,238 @@
+package com.post.dao.impl;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.post.dao.BaseDaoI;
+
+@Repository("baseDao")
+public class BaseDaoImpl<T> implements BaseDaoI<T> {
+
+	private SessionFactory sessionFactory;
+
+	public SessionFactory getSessionFactory() {
+		return sessionFactory;
+	}
+
+	@Autowired
+	public void setSessionFactory(SessionFactory sessionFactory) {
+		this.sessionFactory = sessionFactory;
+	}
+
+	private Session getCurrentSession() {
+		return sessionFactory.getCurrentSession();
+	}
+
+	public Serializable save(T o) {
+		return this.getCurrentSession().save(o);
+	}
+
+	public void delete(T o) {
+		this.getCurrentSession().delete(o);
+	}
+
+	public void update(T o) {
+		this.getCurrentSession().update(o);
+	}
+
+	public void saveOrUpdate(T o) {
+		this.getCurrentSession().saveOrUpdate(o);
+	}
+
+	public List<T> find(String hql) {
+		return this.getCurrentSession().createQuery(hql).list();
+	}
+
+	public List<T> find(String hql, Map<String, Object> params) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		return q.list();
+	}
+
+	public List<T> find(String hql, List<Object> param) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (param != null && param.size() > 0) {
+			for (int i = 0; i < param.size(); i++) {
+				q.setParameter(i, param.get(i));
+			}
+		}
+		return q.list();
+	}
+
+	@Override
+	public List<T> find(String hql, Integer page, Integer rows) {
+		if (page == null || page < 1) {
+			page = 1;
+		}
+		if (rows == null || rows < 1) {
+			rows = 10;
+		}
+		Query q = this.getCurrentSession().createQuery(hql);
+		return q.setFirstResult((page - 1) * rows).setMaxResults(rows).list();
+		
+	}
+
+	public List<T> find(String hql, Map<String, Object> params, Integer page,
+			Integer rows) {
+		if (page == null || page < 1) {
+			page = 1;
+		}
+		if (rows == null || rows < 1) {
+			rows = 10;
+		}
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		return q.setFirstResult((page - 1) * rows).setMaxResults(rows).list();
+	}
+
+	public List<T> find(String hql, List<Object> param, Integer page,
+			Integer rows) {
+		if (page == null || page < 1) {
+			page = 1;
+		}
+		if (rows == null || rows < 1) {
+			rows = 10;
+		}
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (param != null && param.size() > 0) {
+			for (int i = 0; i < param.size(); i++) {
+				q.setParameter(i, param.get(i));
+			}
+		}
+		return q.setFirstResult((page - 1) * rows).setMaxResults(rows).list();
+	}
+
+	public T get(Class<T> c, Serializable id) {
+		return (T) this.getCurrentSession().get(c, id);
+	}
+
+	public T get(String hql, List<Object> param) {
+		List<T> l = this.find(hql, param);
+		if (l != null && l.size() > 0) {
+			return l.get(0);
+		} else {
+			return null;
+		}
+	}
+
+	public Long count(String hql) {
+		return (Long) this.getCurrentSession().createQuery(hql).uniqueResult();
+	}
+
+	public Long count(String hql, Map<String, Object> params) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		return (Long) q.uniqueResult();
+	}
+
+	public Long count(String hql, List<Object> param) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (param != null && param.size() > 0) {
+			for (int i = 0; i < param.size(); i++) {
+				q.setParameter(i, param.get(i));
+			}
+		}
+		return (Long) q.uniqueResult();
+	}
+
+	public Integer executeHql(String hql) {
+		return this.getCurrentSession().createQuery(hql).executeUpdate();
+	}
+
+	public Integer executeHql(String hql, Map<String, Object> params) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		return q.executeUpdate();
+	}
+
+	public Integer executeHql(String hql, List<Object> param) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (param != null && param.size() > 0) {
+			for (int i = 0; i < param.size(); i++) {
+				q.setParameter(i, param.get(i));
+			}
+		}
+		return q.executeUpdate();
+	}
+
+	public T get(String hql, Map<String, Object> params) {
+
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		List<T> l = q.list();
+		if (l != null && l.size() > 0) {
+			return l.get(0);
+		}
+		return null;
+	}
+
+	public Double sum(String hql) {
+		if (this.getCurrentSession().createQuery(hql).uniqueResult()!=null){
+			return (Double) this.getCurrentSession().createQuery(hql).uniqueResult();
+		}else
+			return 0.0;
+		
+	}
+	
+	public Double sum(String hql, Map<String, Object> params) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				q.setParameter(key, params.get(key));
+			}
+		}
+		if (q.uniqueResult()!=null){
+			return (Double) q.uniqueResult();
+		}else
+			return 0.0;
+		
+	}
+
+	@Override
+	public Object[] summ(String hql, Map<String, Object> params) {
+		Query q = this.getCurrentSession().createQuery(hql);
+		if (params != null && params.size() > 0) {
+			for (String key : params.keySet()) {
+				Object obj = params.get(key);
+				if (obj instanceof Collection<?>){
+					q.setParameterList(key, (Collection<?>)obj);
+				}else{
+					q.setParameter(key, params.get(key));
+				}
+			}
+		}
+		List<Object[]> l =q.list();
+		if (l != null && l.size() > 0) {
+			return l.get(0);
+		}
+		return null;
+	}
+}

+ 117 - 0
src/main/java/com/post/excelTools/ExcelBean.java

@@ -0,0 +1,117 @@
+/*
+ * Created on 2013-2-4
+ * ExcelInfo.java V1.0
+ *
+ * Copyright Notice =========================================================
+ * This file contains proprietary information of Eastcom Technologies Co. Ltd.
+ * Copying or reproduction without prior written approval is prohibited.
+ * Copyright (c) 2012 =======================================================
+ */
+package com.post.excelTools;
+
+import java.util.List;
+
+/**
+ * 导出Excel的信息
+ * Title: eed <br>
+ * Description: <br>
+ * Copyright: eastcom Copyright (C) 2009 <br>
+ * 
+ * @author <a href="mailto:邮箱">jiangxd</a><br>
+ * @e-mail: jiangxd@eastcom-sw.com<br>
+ * @version 2.0 <br>
+ * @creatdate 2013-2-4 下午05:44:28 <br>
+ * 
+ */
+@SuppressWarnings("unchecked")
+public class ExcelBean {
+	/**
+	 * excel文件名称
+	 */
+	private String title;
+	/**
+	 * 创建人
+	 */
+	private String creator;
+	/**
+	 * 数据集
+	 */
+	private List list;
+	/**
+	 * 表格头部(如是合并表头,则为父表头)
+	 */
+	private String[] hearders;
+	/**
+	 * 合并表头的子表头(非合并表头不需要设置)
+	 */
+	private String[][] children;
+	/**
+	 * Map或JavaBean数据集需指定英文字段顺序
+	 */
+	private String[] fields;
+	
+	public ExcelBean(){}
+	
+	public ExcelBean(String title, String creator, List list, String[] hearders) {
+		this.title = title;
+		this.creator = creator;
+		this.list = list;
+		this.hearders = hearders;
+	}
+	
+	public ExcelBean(String title, String creator, List list,
+			String[] hearders, String[] fields) {
+		this.title = title;
+		this.creator = creator;
+		this.list = list;
+		this.hearders = hearders;
+		this.fields = fields;
+	}
+	
+	public ExcelBean(String title, String creator, List list,
+			String[] hearders, String[][] children, String[] fields) {
+		this.title = title;
+		this.creator = creator;
+		this.list = list;
+		this.hearders = hearders;
+		this.children = children;
+		this.fields = fields;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public String getCreator() {
+		return creator;
+	}
+	public void setCreator(String creator) {
+		this.creator = creator;
+	}
+	public List getList() {
+		return list;
+	}
+	public void setList(List list) {
+		this.list = list;
+	}
+	public String[] getHearders() {
+		return hearders;
+	}
+	public void setHearders(String[] hearders) {
+		this.hearders = hearders;
+	}
+	public String[][] getChildren() {
+		return children;
+	}
+	public void setChildren(String[][] children) {
+		this.children = children;
+	}
+	public String[] getFields() {
+		return fields;
+	}
+	public void setFields(String[] fields) {
+		this.fields = fields;
+	}
+}

+ 529 - 0
src/main/java/com/post/excelTools/ExcelUtils.java

@@ -0,0 +1,529 @@
+/*
+ * 文件名:ExcelUtils.java
+ * 版权:
+ * 描述:
+ * 修改人:
+ * 修改时间:
+ * 修改内容:
+ */
+package com.post.excelTools;
+
+import java.beans.PropertyDescriptor;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.ZipOutputStream;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.beanutils.PropertyUtilsBean;
+import org.apache.commons.lang.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
+import org.apache.poi.hssf.usermodel.HSSFFont;
+import org.apache.poi.hssf.usermodel.HSSFPalette;
+import org.apache.poi.hssf.usermodel.HSSFRichTextString;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.hssf.util.HSSFColor;
+import org.apache.poi.hssf.util.Region;
+
+public class ExcelUtils {
+	
+	/**
+	 * JavaBean转Map
+	 * @param obj
+	 * @return
+	 */
+	public static Map<String, Object> beanToMap(Object obj) {  
+        Map<String, Object> params = new HashMap<String, Object>(0);  
+        try {  
+            PropertyUtilsBean propertyUtilsBean = new PropertyUtilsBean();  
+            PropertyDescriptor[] descriptors = propertyUtilsBean.getPropertyDescriptors(obj);  
+            for (int i = 0; i < descriptors.length; i++) {  
+                String name = descriptors[i].getName();  
+                if (!StringUtils.equals(name, "class")) {  
+                    params.put(name, propertyUtilsBean.getNestedProperty(obj, name));  
+                }  
+            }  
+        } catch (Exception e) {  
+            e.printStackTrace();  
+        }  
+        return params;  
+    }
+	
+	/**
+	 * 创建普通表头
+	 * @param list 表头名称列表
+	 * @return
+	 */
+	public static TableHeaderMetaData createTableHeader(List<String> list){
+		 TableHeaderMetaData headMeta = new TableHeaderMetaData();
+	        for(String title : list){
+	        	TableColumn tc = new TableColumn();
+		        tc.setDisplay(title);
+		        headMeta.addColumn(tc);
+	        }
+	        return headMeta;
+	}
+	
+	/**
+	 * 创建普通表头
+	 * @param titls 表头名称数组
+	 * @return
+	 */
+	public static TableHeaderMetaData createTableHeader(String[] titls){
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(String title : titls){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(title);
+			tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+	
+	/**
+	 * 创建普通表头
+	 * @param titls 表头名称数组
+	 * @param spanCount 需要行合并的列数。
+	 * 		由第一列数据开始到指定列依次从左到右进行合并操作。
+	 * 		如该值大于表头名称数组,则为全列合并
+	 * @return
+	 */
+	public static TableHeaderMetaData createTableHeader(String[] titls,int spanCount){
+		if(spanCount>titls.length)
+			spanCount = titls.length;
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		for(int i=0;i<titls.length;i++){
+			TableColumn tc = new TableColumn();
+			tc.setDisplay(titls[i]);
+			if(i<spanCount)
+				tc.setGrouped(true);
+			headMeta.addColumn(tc);
+		}
+		return headMeta;
+	}
+	
+	/**
+	 * 创建合并表头
+	 * @param parents 父表头数组
+	 * @param children 子表头数组
+	 * @return
+	 */
+	public static TableHeaderMetaData createTableHeader(String[] parents,String[][] children){
+		TableHeaderMetaData headMeta = new TableHeaderMetaData();
+		TableColumn parentColumn = null;
+		TableColumn sonColumn = null;
+		for (int i = 0; i < parents.length; i++) {
+			parentColumn = new TableColumn();
+			parentColumn.setDisplay(parents[i]);
+			if (children != null && children[i] != null) {
+				for (int j = 0; j < children[i].length; j++) {
+					sonColumn = new TableColumn();
+					sonColumn.setDisplay(children[i][j]);
+					parentColumn.addChild(sonColumn);
+				}
+			}
+			headMeta.addColumn(parentColumn);
+		}
+		return headMeta;
+	}
+	
+    /**
+     * 拼装数据
+     * 
+     * @param list 数据集
+     * @param headMeta 表头
+     * @param fields 对象或Map属性数组(注意:顺序要与表头标题顺序对应,如数据集为List<Object[]>,则该参数可以为null)
+     * @return TableData
+     */
+	@SuppressWarnings("unchecked")
+	public static TableData createTableData(List list,TableHeaderMetaData headMeta,String[] fields){
+
+        TableData td = new TableData(headMeta);
+        TableDataRow row = null;
+        if(list != null && list.size()>0){
+        	if(list.get(0).getClass().isArray()){//数组类型
+                for (Object obj : list){
+                	row = new TableDataRow(td);
+            		for(Object o : (Object[])obj){
+    					row.addCell(o);
+    				}
+                    td.addRow(row);
+                }
+        	}else{//JavaBean或Map类型
+                for (Object obj : list){
+                	row = new TableDataRow(td);
+                	Map<String, Object> map = (obj instanceof Map)?(Map<String, Object>)obj:beanToMap(obj);
+                    for(String key : fields){
+                        row.addCell(map.get(key));
+                    }
+                    td.addRow(row);
+                }
+        	}
+        }
+        return td;
+    }
+	
+	/**
+	 * 创建压缩输出流
+	 * @param response
+	 * @param zipName 压缩包名次
+	 * @return
+	 */
+	public static ZipOutputStream createZipStream(HttpServletResponse response, String zipName) {
+		response.reset();
+		response.setContentType("application/vnd.ms-excel"); // 不同类型的文件对应不同的MIME类型
+		try {
+			response.setHeader("Content-Disposition", "attachment;filename="
+					.concat(String.valueOf(URLEncoder.encode(zipName + ".zip", "UTF-8"))));
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		OutputStream os = null;
+		try {
+			os = response.getOutputStream();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return new ZipOutputStream(os); 
+	}
+	
+	public static void copySheetStyle(HSSFWorkbook destwb, HSSFSheet dest,
+			HSSFWorkbook srcwb, HSSFSheet src) {
+		if (src == null || dest == null)
+			return;
+
+		dest.setAlternativeExpression(src.getAlternateExpression());
+		dest.setAlternativeFormula(src.getAlternateFormula());
+		dest.setAutobreaks(src.getAutobreaks());
+		dest.setDialog(src.getDialog());
+		if (src.getColumnBreaks() != null) {
+			for (int col : src.getColumnBreaks()) {
+				dest.setColumnBreak((short) col);
+			}
+		}
+		dest.setDefaultColumnWidth(src.getDefaultColumnWidth());
+		dest.setDefaultRowHeight(src.getDefaultRowHeight());
+		dest.setDefaultRowHeightInPoints(src.getDefaultRowHeightInPoints());
+		dest.setDisplayGuts(src.getDisplayGuts());
+		dest.setFitToPage(src.getFitToPage());
+		dest.setHorizontallyCenter(src.getHorizontallyCenter());
+		dest.setDisplayFormulas(src.isDisplayFormulas());
+		dest.setDisplayGridlines(src.isDisplayGridlines());
+		dest.setDisplayRowColHeadings(src.isDisplayRowColHeadings());
+		dest.setGridsPrinted(src.isGridsPrinted());
+		dest.setPrintGridlines(src.isPrintGridlines());
+
+		for (int i = 0; i < src.getNumMergedRegions(); i++) {
+			Region r = src.getMergedRegionAt(i);
+			dest.addMergedRegion(r);
+		}
+
+		if (src.getRowBreaks() != null) {
+			for (int row : src.getRowBreaks()) {
+				dest.setRowBreak(row);
+			}
+		}
+		dest.setRowSumsBelow(src.getRowSumsBelow());
+		dest.setRowSumsRight(src.getRowSumsRight());
+
+		short maxcol = 0;
+		for (int i = 0; i <= src.getLastRowNum(); i++) {
+			HSSFRow row = src.getRow(i);
+			if (row != null) {
+				if (maxcol < row.getLastCellNum())
+					maxcol = row.getLastCellNum();
+			}
+		}
+		for (short col = 0; col <= maxcol; col++) {
+			if (src.getColumnWidth(col) != src.getDefaultColumnWidth())
+				dest.setColumnWidth(col, src.getColumnWidth(col));
+			dest.setColumnHidden(col, src.isColumnHidden(col));
+		}
+	}
+
+	public static String dumpCellStyle(HSSFCellStyle style) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(style.getHidden()).append(",");
+		sb.append(style.getLocked()).append(",");
+		sb.append(style.getWrapText()).append(",");
+		sb.append(style.getAlignment()).append(",");
+		sb.append(style.getBorderBottom()).append(",");
+		sb.append(style.getBorderLeft()).append(",");
+		sb.append(style.getBorderRight()).append(",");
+		sb.append(style.getBorderTop()).append(",");
+		sb.append(style.getBottomBorderColor()).append(",");
+		sb.append(style.getDataFormat()).append(",");
+		sb.append(style.getFillBackgroundColor()).append(",");
+		sb.append(style.getFillForegroundColor()).append(",");
+		sb.append(style.getFillPattern()).append(",");
+		sb.append(style.getIndention()).append(",");
+		sb.append(style.getLeftBorderColor()).append(",");
+		sb.append(style.getRightBorderColor()).append(",");
+		sb.append(style.getRotation()).append(",");
+		sb.append(style.getTopBorderColor()).append(",");
+		sb.append(style.getVerticalAlignment());
+
+		return sb.toString();
+	}
+
+	public static String dumpFont(HSSFFont font) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(font.getItalic()).append(",").append(font.getStrikeout())
+				.append(",").append(font.getBoldweight()).append(",").append(
+						font.getCharSet()).append(",").append(font.getColor())
+				.append(",").append(font.getFontHeight()).append(",").append(
+						font.getFontName()).append(",").append(
+						font.getTypeOffset()).append(",").append(
+						font.getUnderline());
+		return sb.toString();
+	}
+
+	public static void copyCellStyle(HSSFWorkbook destwb, HSSFCell dest,
+			HSSFWorkbook srcwb, HSSFCell src) {
+		if (src == null || dest == null)
+			return;
+
+		HSSFCellStyle nstyle = findStyle(src.getCellStyle(), srcwb, destwb);
+		if (nstyle == null) {
+			nstyle = destwb.createCellStyle();
+			copyCellStyle(destwb, nstyle, srcwb, src.getCellStyle());
+		}
+		dest.setCellStyle(nstyle);
+	}
+
+	private static boolean isSameColor(short a, short b, HSSFPalette apalette,
+			HSSFPalette bpalette) {
+		if (a == b)
+			return true;
+		HSSFColor acolor = apalette.getColor(a);
+		HSSFColor bcolor = bpalette.getColor(b);
+		if (acolor == null)
+			return true;
+		if (bcolor == null)
+			return false;
+		return acolor.getHexString().equals(bcolor.getHexString());
+	}
+
+	private static short findColor(short index, HSSFWorkbook srcwb,
+			HSSFWorkbook destwb) {
+		Integer id = new Integer(index);
+		if (HSSFColor.getIndexHash().containsKey(id))
+			return index;
+		if (index == HSSFColor.AUTOMATIC.index)
+			return index;
+		HSSFColor color = srcwb.getCustomPalette().getColor(index);
+		if (color == null) {
+			return index;
+		}
+
+		HSSFColor ncolor = destwb.getCustomPalette().findColor(
+				(byte) color.getTriplet()[0], (byte) color.getTriplet()[1],
+				(byte) color.getTriplet()[2]);
+		if (ncolor != null)
+			return ncolor.getIndex();
+		destwb.getCustomPalette().setColorAtIndex(index,
+				(byte) color.getTriplet()[0], (byte) color.getTriplet()[1],
+				(byte) color.getTriplet()[2]);
+		return index;
+	}
+
+	public static HSSFCellStyle findStyle(HSSFCellStyle style,
+			HSSFWorkbook srcwb, HSSFWorkbook destwb) {
+		HSSFPalette srcpalette = srcwb.getCustomPalette();
+		HSSFPalette destpalette = destwb.getCustomPalette();
+
+		for (short i = 0; i < destwb.getNumCellStyles(); i++) {
+			HSSFCellStyle old = destwb.getCellStyleAt(i);
+			if (old == null)
+				continue;
+
+			if (style.getAlignment() == old.getAlignment()
+					&& style.getBorderBottom() == old.getBorderBottom()
+					&& style.getBorderLeft() == old.getBorderLeft()
+					&& style.getBorderRight() == old.getBorderRight()
+					&& style.getBorderTop() == old.getBorderTop()
+					&& isSameColor(style.getBottomBorderColor(), old
+							.getBottomBorderColor(), srcpalette, destpalette)
+					&& style.getDataFormat() == old.getDataFormat()
+					&& isSameColor(style.getFillBackgroundColor(), old
+							.getFillBackgroundColor(), srcpalette, destpalette)
+					&& isSameColor(style.getFillForegroundColor(), old
+							.getFillForegroundColor(), srcpalette, destpalette)
+					&& style.getFillPattern() == old.getFillPattern()
+					&& style.getHidden() == old.getHidden()
+					&& style.getIndention() == old.getIndention()
+					&& isSameColor(style.getLeftBorderColor(), old
+							.getLeftBorderColor(), srcpalette, destpalette)
+					&& style.getLocked() == old.getLocked()
+					&& isSameColor(style.getRightBorderColor(), old
+							.getRightBorderColor(), srcpalette, destpalette)
+					&& style.getRotation() == old.getRotation()
+					&& isSameColor(style.getTopBorderColor(), old
+							.getTopBorderColor(), srcpalette, destpalette)
+					&& style.getVerticalAlignment() == old
+							.getVerticalAlignment()
+					&& style.getWrapText() == old.getWrapText()) {
+
+				HSSFFont oldfont = destwb.getFontAt(old.getFontIndex());
+				HSSFFont font = srcwb.getFontAt(style.getFontIndex());
+				if (oldfont.getBoldweight() == font.getBoldweight()
+						&& oldfont.getItalic() == font.getItalic()
+						&& oldfont.getStrikeout() == font.getStrikeout()
+						&& oldfont.getCharSet() == font.getCharSet()
+						&& isSameColor(oldfont.getColor(), font.getColor(),
+								srcpalette, destpalette)
+						&& oldfont.getFontHeight() == font.getFontHeight()
+						&& oldfont.getFontName().equals(font.getFontName())
+						&& oldfont.getTypeOffset() == font.getTypeOffset()
+						&& oldfont.getUnderline() == font.getUnderline()) {
+					return old;
+				}
+			}
+		}
+		return null;
+	}
+
+	public static void copyCellStyle(HSSFWorkbook destwb, HSSFCellStyle dest,
+			HSSFWorkbook srcwb, HSSFCellStyle src) {
+		if (src == null || dest == null)
+			return;
+		dest.setAlignment(src.getAlignment());
+		dest.setBorderBottom(src.getBorderBottom());
+		dest.setBorderLeft(src.getBorderLeft());
+		dest.setBorderRight(src.getBorderRight());
+		dest.setBorderTop(src.getBorderTop());
+		dest.setBottomBorderColor(findColor(src.getBottomBorderColor(), srcwb,
+				destwb));
+		dest.setDataFormat(destwb.createDataFormat().getFormat(
+				srcwb.createDataFormat().getFormat(src.getDataFormat())));
+		dest.setFillPattern(src.getFillPattern());
+		dest.setFillForegroundColor(findColor(src.getFillForegroundColor(),
+				srcwb, destwb));
+		dest.setFillBackgroundColor(findColor(src.getFillBackgroundColor(),
+				srcwb, destwb));
+		dest.setHidden(src.getHidden());
+		dest.setIndention(src.getIndention());
+		dest.setLeftBorderColor(findColor(src.getLeftBorderColor(), srcwb,
+				destwb));
+		dest.setLocked(src.getLocked());
+		dest.setRightBorderColor(findColor(src.getRightBorderColor(), srcwb,
+				destwb));
+		dest.setRotation(src.getRotation());
+		dest
+				.setTopBorderColor(findColor(src.getTopBorderColor(), srcwb,
+						destwb));
+		dest.setVerticalAlignment(src.getVerticalAlignment());
+		dest.setWrapText(src.getWrapText());
+		HSSFFont f = srcwb.getFontAt(src.getFontIndex());
+		HSSFFont nf = findFont(f, srcwb, destwb);
+		if (nf == null) {
+			nf = destwb.createFont();
+			nf.setBoldweight(f.getBoldweight());
+			nf.setCharSet(f.getCharSet());
+			nf.setColor(findColor(f.getColor(), srcwb, destwb));
+			nf.setFontHeight(f.getFontHeight());
+			nf.setFontHeightInPoints(f.getFontHeightInPoints());
+			nf.setFontName(f.getFontName());
+			nf.setItalic(f.getItalic());
+			nf.setStrikeout(f.getStrikeout());
+			nf.setTypeOffset(f.getTypeOffset());
+			nf.setUnderline(f.getUnderline());
+		}
+		dest.setFont(nf);
+	}
+
+	private static HSSFFont findFont(HSSFFont font, HSSFWorkbook src,
+			HSSFWorkbook dest) {
+		for (short i = 0; i < dest.getNumberOfFonts(); i++) {
+			HSSFFont oldfont = dest.getFontAt(i);
+			if (font.getBoldweight() == oldfont.getBoldweight()
+					&& font.getItalic() == oldfont.getItalic()
+					&& font.getStrikeout() == oldfont.getStrikeout()
+					&& font.getCharSet() == oldfont.getCharSet()
+					&& font.getColor() == oldfont.getColor()
+					&& font.getFontHeight() == oldfont.getFontHeight()
+					&& font.getFontName().equals(oldfont.getFontName())
+					&& font.getTypeOffset() == oldfont.getTypeOffset()
+					&& font.getUnderline() == oldfont.getUnderline()) {
+				return oldfont;
+			}
+		}
+		return null;
+	}
+
+	public static void copySheet(HSSFWorkbook destwb, HSSFSheet dest,
+			HSSFWorkbook srcwb, HSSFSheet src) {
+		if (src == null || dest == null)
+			return;
+
+		copySheetStyle(destwb, dest, srcwb, src);
+
+		for (int i = 0; i <= src.getLastRowNum(); i++) {
+			HSSFRow row = src.getRow(i);
+			copyRow(destwb, dest.createRow(i), srcwb, row);
+		}
+	}
+
+	public static void copyRow(HSSFWorkbook destwb, HSSFRow dest,
+			HSSFWorkbook srcwb, HSSFRow src) {
+		if (src == null || dest == null)
+			return;
+		for (short i = 0; i <= src.getLastCellNum(); i++) {
+			if (src.getCell(i) != null) {
+				HSSFCell cell = dest.createCell(i);
+				copyCell(destwb, cell, srcwb, src.getCell(i));
+			}
+		}
+
+	}
+
+	public static void copyCell(HSSFWorkbook destwb, HSSFCell dest,
+			HSSFWorkbook srcwb, HSSFCell src) {
+		if (src == null) {
+			dest.setCellType(HSSFCell.CELL_TYPE_BLANK);
+			return;
+		}
+
+		if (src.getCellComment() != null)
+			dest.setCellComment(src.getCellComment());
+		if (src.getCellStyle() != null) {
+			HSSFCellStyle nstyle = findStyle(src.getCellStyle(), srcwb, destwb);
+			if (nstyle == null) {
+				nstyle = destwb.createCellStyle();
+				copyCellStyle(destwb, nstyle, srcwb, src.getCellStyle());
+			}
+			dest.setCellStyle(nstyle);
+		}
+		dest.setCellType(src.getCellType());
+
+		switch (src.getCellType()) {
+		case HSSFCell.CELL_TYPE_BLANK:
+
+			break;
+		case HSSFCell.CELL_TYPE_BOOLEAN:
+			dest.setCellValue(src.getBooleanCellValue());
+			break;
+		case HSSFCell.CELL_TYPE_FORMULA:
+			dest.setCellFormula(src.getCellFormula());
+			break;
+		case HSSFCell.CELL_TYPE_ERROR:
+			dest.setCellErrorValue(src.getErrorCellValue());
+			break;
+		case HSSFCell.CELL_TYPE_NUMERIC:
+			dest.setCellValue(src.getNumericCellValue());
+			break;
+		default:
+			dest.setCellValue(new HSSFRichTextString(src
+					.getRichStringCellValue().getString()));
+			break;
+		}
+	}
+}

+ 61 - 0
src/main/java/com/post/excelTools/FormulaProcessor.java

@@ -0,0 +1,61 @@
+package com.post.excelTools;
+
+import java.util.HashSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import bsh.Interpreter;
+
+
+public class FormulaProcessor {
+	private static FormulaProcessor self = null;
+	
+	private Pattern pattern = Pattern.compile("\\$(\\d+)");
+	private FormulaProcessor(){
+		
+	}
+	
+	public static FormulaProcessor getInstance(){
+		if (self == null)
+			self = new FormulaProcessor();
+		return self;	
+	}
+	
+	public void fillValue(TableDataRow row){
+		HashSet<Integer> computed = new HashSet<Integer>();
+		for (TableDataCell cell:row.getCells()){			
+			TableColumn thc = row.getTable().getTableHeader().getColumnAt(cell.getColumnIndex());
+			int type = thc.getColumnType();
+			if (type == TableColumn.COLUMN_TYPE_FORMULA && thc.getAggregateRule() != null){
+				String f = convertFormula(thc.getAggregateRule());
+				try{
+					Interpreter process = new Interpreter();
+					process.getNameSpace().importCommands("com.eastcom.kaas.web.report.bean");					
+					process.set("row", row);
+					process.set("computed", computed);
+					
+					Object ret = process.eval(f);
+					double v = (Double)ret;
+					cell.setValue(v);
+					computed.add(cell.getColumnIndex());
+				} catch (Exception e){
+					e.printStackTrace();
+					cell.setValue(0);
+					cell.setValue("-");
+					computed.add(cell.getColumnIndex());
+				}
+			}
+		}
+	}
+	
+	private String convertFormula(String formula){
+		Matcher m = pattern.matcher(formula);
+		StringBuffer sb = new StringBuffer();
+		while(m.find()){
+			m.appendReplacement(sb, "getValue(row, " + m.group(1) + ")");
+		}
+		m.appendTail(sb);
+		
+		return sb.toString();
+	}
+}

+ 732 - 0
src/main/java/com/post/excelTools/JsGridReportBase.java

@@ -0,0 +1,732 @@
+/*
+ * 文件名:JsGridReportBase.java
+ * 版权:
+ * 描述:
+ * 修改人:
+ * 修改时间:
+ * 修改内容:
+ */
+package com.post.excelTools;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.zip.ZipOutputStream;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
+import org.apache.poi.hssf.usermodel.HSSFRichTextString;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.springframework.core.io.ClassPathResource;
+
+public class JsGridReportBase {
+	public SimpleDateFormat timeFormat = new SimpleDateFormat(
+			"yyyy-MM-dd");
+
+	private HttpServletResponse response;
+	private HttpServletRequest request;
+
+	private HttpSession session;
+
+	private ServletOutputStream out;
+
+	private InputStream downloadFile;
+
+	/**
+	 * 大数据量导出静态变量
+	 */
+	public static int EXCEL_MAX_CNT = 100000; //每个excel文件多少条数据
+	public static int SHEET_MAX_CNT = 20000; //每个sheet多少条数据
+	
+	
+	public JsGridReportBase() {
+	}
+
+	public JsGridReportBase(HttpServletRequest request,
+			HttpServletResponse response) throws Exception {
+		this.response = response;
+		this.request = request;
+		session = request.getSession();
+		init(this.session);
+	}
+
+	private void init(HttpSession session) throws Exception {
+		out = response.getOutputStream();
+	}
+
+	/**
+	 * 向浏览器输出JSON数据
+	 * 
+	 * @param
+	 * @return void
+	 */
+	public void outDataToBrowser(TableData tableData) {
+		StringBuffer outData = new StringBuffer();
+
+		// 向前台输出数据
+		outData.append("{pageInfo: {totalRowNum: " + tableData.getTotalRows()
+				+ "},");
+		outData.append("data: [");
+		boolean isFirst = true;
+
+		TableHeaderMetaData headerMetaData = tableData.getTableHeader();
+		List<TableDataRow> dataRows = tableData.getRows();
+		try {
+			for (TableDataRow dataRow : dataRows) {
+				List<TableDataCell> dataCells = dataRow.getCells();
+				int size = dataCells.size();
+				if (!isFirst) {
+					outData.append(",{");
+					for (int i = 0; i < size; i++) {
+						outData.append(headerMetaData.getColumnAt(i).getId()
+								+ ": '" + dataCells.get(i).getValue() + "',");
+					}
+					int index = outData.lastIndexOf(",");
+					outData.deleteCharAt(index);
+					outData.append("}");
+				} else {
+					outData.append("{");
+					for (int i = 0; i < size; i++) {
+						outData.append(headerMetaData.getColumnAt(i).getId()
+								+ ": '" + dataCells.get(i).getValue() + "',");
+					}
+					int index = outData.lastIndexOf(",");
+					outData.deleteCharAt(index);
+					outData.append("}");
+					isFirst = false;
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		outData.append("]");
+		outData.append("}");
+
+		try {
+			out.print(outData.toString());
+			out.flush();
+			out.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 
+	 * @param
+	 * @return void
+	 */
+	private void stopGrouping(HSSFSheet sheet, HashMap<Integer, String> word,
+			HashMap<Integer, Integer> counter, int i, int size, int rownum,
+			HSSFCellStyle style) {
+		String w = word.get(i);
+		if (w != null) {
+			int len = counter.get(i);
+			CellRangeAddress address = new CellRangeAddress(rownum - len,
+					rownum - 1, i, i);
+			sheet.addMergedRegion(address);
+			fillMergedRegion(sheet, address, style);
+			word.remove(i);
+			counter.remove(i);
+		}
+		if (i + 1 < size) {
+			stopGrouping(sheet, word, counter, i + 1, size, rownum, style);
+		}
+	}
+
+	/**
+	 * 
+	 * @param
+	 * @return void
+	 */
+	private void generateColumn(HSSFSheet sheet, TableColumn tc, int maxlevel,
+			int rownum, int colnum, HSSFCellStyle headerstyle) {
+		HSSFRow row = sheet.getRow(rownum);
+		if (row == null)
+			row = sheet.createRow(rownum);
+		row.setHeightInPoints(30);
+		
+		HSSFCell cell = row.createCell(colnum);
+		cell.setCellValue(tc.getDisplay());
+
+		if (headerstyle != null)
+			cell.setCellStyle(headerstyle);
+		if (tc.isComplex()) {
+			CellRangeAddress address = new CellRangeAddress(rownum, rownum,
+					colnum, colnum + tc.getLength() - 1);
+			sheet.addMergedRegion(address);
+			fillMergedRegion(sheet, address, headerstyle);
+
+			int cn = colnum;
+			for (int i = 0; i < tc.getChildren().size(); i++) {
+				if (i != 0) {
+					cn = cn + tc.getChildren().get(i - 1).getLength();
+				}
+				generateColumn(sheet, tc.getChildren().get(i), maxlevel,
+						rownum + 1, cn, headerstyle);
+			}
+		} else {
+			CellRangeAddress address = new CellRangeAddress(rownum, rownum
+					+ maxlevel - tc.level, colnum, colnum);
+			sheet.addMergedRegion(address);
+			fillMergedRegion(sheet, address, headerstyle);
+		}
+		sheet.autoSizeColumn(colnum, true);
+	}
+
+	/**
+	 * 
+	 * @param
+	 * @return void
+	 */
+	private void fillMergedRegion(HSSFSheet sheet, CellRangeAddress address,
+			HSSFCellStyle style) {
+		for (int i = address.getFirstRow(); i <= address.getLastRow(); i++) {
+			HSSFRow row = sheet.getRow(i);
+			if (row == null)
+				row = sheet.createRow(i);
+			for (int j = address.getFirstColumn(); j <= address.getLastColumn(); j++) {
+				HSSFCell cell = row.getCell(j);
+				if (cell == null) {
+					cell = row.createCell(j);
+					if (style != null)
+						cell.setCellStyle(style);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * 写入工作表
+	 * @param wb Excel工作簿
+	 * @param title Sheet工作表名称
+	 * @param styles 表头样式
+	 * @param creator 创建人
+	 * @param tableData 表格数据
+	 * @throws Exception
+	 */
+	public HSSFWorkbook writeSheet(HSSFWorkbook wb, String title, HashMap<String, HSSFCellStyle> styles, String creator,int[] columnwidths, TableData tableData) throws Exception {
+
+		TableHeaderMetaData headerMetaData = tableData.getTableHeader();// 获得HTML的表头元素
+		
+		SimpleDateFormat formater = new SimpleDateFormat("yyyy年MM月dd日 ");
+		String create_time = formater.format(new Date());
+		
+		HSSFSheet sheet = wb.createSheet(title);// 在Excel工作簿中建一工作表
+		sheet.setDisplayGridlines(false);// 设置表标题是否有表格边框
+		sheet.setDefaultRowHeightInPoints(20);
+
+		//创建标题
+		HSSFRow row = sheet.createRow(0);// 创建新行
+		row.setHeightInPoints(40);
+		HSSFCell cell = row.createCell(0);// 创建新列
+		int rownum = 0;
+		cell.setCellValue(new HSSFRichTextString(title));
+		HSSFCellStyle style = styles.get("TITLE");//设置标题样式
+		if (style != null)
+			cell.setCellStyle(style);
+		sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, headerMetaData
+				.getColumnCount() - 1));//合并标题行:起始行号,终止行号, 起始列号,终止列号
+		
+		//创建副标题
+		row = sheet.createRow(1);
+		cell = row.createCell(0);
+		cell.setCellValue(new HSSFRichTextString("创建人:"));
+		style = styles.get("SUB_TITLE");
+		if (style != null)
+			cell.setCellStyle(style);
+
+		cell = row.createCell(1);
+		cell.setCellValue(new HSSFRichTextString(creator));
+		style = styles.get("SUB_TITLE2");
+		if (style != null)
+			cell.setCellStyle(style);
+
+		cell = row.createCell(2);
+		cell.setCellValue(new HSSFRichTextString("创建时间:"));
+		style = styles.get("SUB_TITLE");
+		if (style != null)
+			cell.setCellStyle(style);
+
+		cell = row.createCell(3);
+		style = styles.get("SUB_TITLE2");
+		cell.setCellValue(new HSSFRichTextString(create_time));
+		if (style != null)
+			cell.setCellStyle(style);
+
+		rownum = 1;// 如果rownum = 1,则去掉创建人、创建时间等副标题;如果rownum = 0, 则把标题也去掉
+
+		HSSFCellStyle headerstyle = styles.get("TABLE_HEADER");
+
+		int colnum = 0;
+		for (int i = 0; i < headerMetaData.getOriginColumns().size(); i++) {
+			TableColumn tc = headerMetaData.getOriginColumns().get(i);
+			if (i != 0) {
+				colnum += headerMetaData.getOriginColumns().get(i - 1)
+						.getLength();
+			}
+			generateColumn(sheet, tc, headerMetaData.maxlevel, rownum, colnum,
+					headerstyle);
+		}
+		rownum += headerMetaData.maxlevel;
+
+		List<TableDataRow> dataRows = tableData.getRows();
+
+		HashMap<Integer, Integer> counter = new HashMap<Integer, Integer>();
+		HashMap<Integer, String> word = new HashMap<Integer, String>();
+		int index = 0;
+		for (TableDataRow dataRow : dataRows) {
+			row = sheet.createRow(rownum);
+			row.setHeightInPoints(20);
+			List<TableDataCell> dataCells = dataRow.getCells();
+			int size = headerMetaData.getColumns().size();
+			index = -1;
+			for (int i = 0; i < size; i++) {
+				TableColumn tc = headerMetaData.getColumns().get(i);
+				if (!tc.isVisible())
+					continue;
+				index++;
+
+				String value = dataCells.get(i).getValue();
+				if (tc.isGrouped()) {
+					String w = word.get(index);
+					if (w == null) {
+						word.put(index, value);
+						counter.put(index, 1);
+						createCell(row, tc, dataCells, i, index, styles);
+					} else {
+						if (w.equals(value)) {
+							counter.put(index, counter.get(index) + 1);
+						} else {
+							stopGrouping(sheet, word, counter, index, size,
+									rownum, styles.get("STRING"));
+
+							word.put(index, value);
+							counter.put(index, 1);
+							createCell(row, tc, dataCells, i, index, styles);
+						}
+					}
+				} else {
+					createCell(row, tc, dataCells, i, index, styles);
+				}
+			}
+			rownum++;
+		}
+
+		stopGrouping(sheet, word, counter, 0, index, rownum, styles
+				.get("STRING"));
+		// 设置前两列根据数据自动列宽
+		for (int c = 0; c < headerMetaData.getColumns().size(); c++) {
+			sheet.setColumnWidth(c, 256*columnwidths[c]);
+		}
+		sheet.setGridsPrinted(true);
+		
+		return wb;
+	}
+	
+	/**
+	 * 写入工作表
+	 * @param wb Excel工作簿
+	 * @param title Sheet工作表名称
+	 * @param styles 表头样式
+	 * @param creator 创建人
+	 * @param tableData 表格数据
+	 * @throws Exception
+	 */
+	public HSSFWorkbook writeSheet(HSSFWorkbook wb, HashMap<String, HSSFCellStyle> styles, String creator,int[] columnwidths, List<TableData> tableDataLst) throws Exception {
+		
+		SimpleDateFormat formater = new SimpleDateFormat("yyyy年MM月dd日 ");
+		String create_time = formater.format(new Date());
+		
+		int cnt = 1;
+		for(TableData tableData : tableDataLst){
+			String sheetTitle = tableData.getSheetTitle();
+			sheetTitle = sheetTitle==null||sheetTitle.equals("")?"sheet"+cnt:sheetTitle;
+			cnt++;
+	
+			TableHeaderMetaData headerMetaData = tableData.getTableHeader();// 获得HTML的表头元素
+			HSSFSheet sheet = wb.createSheet(sheetTitle);// 在Excel工作簿中建一工作表
+			sheet.setDisplayGridlines(false);// 设置表标题是否有表格边框
+			sheet.setDefaultRowHeightInPoints(20);
+			wb.cloneSheet(0);
+			
+			//创建标题
+			HSSFRow row = sheet.createRow(0);// 创建新行
+			row.setHeightInPoints(40);
+			HSSFCell cell = row.createCell(0);// 创建新列
+			int rownum = 0;
+			cell.setCellValue(new HSSFRichTextString(sheetTitle));
+			HSSFCellStyle style = styles.get("TITLE");//设置标题样式
+			if (style != null)
+				cell.setCellStyle(style);
+			sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, headerMetaData
+					.getColumnCount() - 1));//合并标题行:起始行号,终止行号, 起始列号,终止列号
+			
+			//创建副标题
+			row = sheet.createRow(1);
+			cell = row.createCell(0);
+			cell.setCellValue(new HSSFRichTextString("创建人:"));
+			style = styles.get("SUB_TITLE");
+			if (style != null)
+				cell.setCellStyle(style);
+			
+			cell = row.createCell(1);
+			cell.setCellValue(new HSSFRichTextString(creator));
+			style = styles.get("SUB_TITLE2");
+			if (style != null)
+				cell.setCellStyle(style);
+			
+			cell = row.createCell(2);
+			cell.setCellValue(new HSSFRichTextString("创建时间:"));
+			style = styles.get("SUB_TITLE");
+			if (style != null)
+				cell.setCellStyle(style);
+			
+			cell = row.createCell(3);
+			style = styles.get("SUB_TITLE2");
+			cell.setCellValue(new HSSFRichTextString(create_time));
+			if (style != null)
+				cell.setCellStyle(style);
+			
+			rownum = 1;// 如果rownum = 1,则去掉创建人、创建时间等副标题;如果rownum = 0, 则把标题也去掉
+			
+			HSSFCellStyle headerstyle = styles.get("TABLE_HEADER");
+			
+			int colnum = 0;
+			for (int i = 0; i < headerMetaData.getOriginColumns().size(); i++) {
+				TableColumn tc = headerMetaData.getOriginColumns().get(i);
+				if (i != 0) {
+					colnum += headerMetaData.getOriginColumns().get(i - 1).getLength();
+				}
+				generateColumn(sheet, tc, headerMetaData.maxlevel, rownum, colnum, headerstyle);
+			}
+			rownum += headerMetaData.maxlevel;
+			
+			List<TableDataRow> dataRows = tableData.getRows();
+			
+			int index = 0;
+			for (TableDataRow dataRow : dataRows) {
+				row = sheet.createRow(rownum);
+				row.setHeightInPoints(20);
+				List<TableDataCell> dataCells = dataRow.getCells();
+				int size = headerMetaData.getColumns().size();
+				index = -1;
+				for (int i = 0; i < size; i++) {
+					TableColumn tc = headerMetaData.getColumns().get(i);
+					if (!tc.isVisible())
+						continue;
+					index++;
+					
+					createCell(row, tc, dataCells, i, index, styles);
+				}
+				rownum++;
+			}
+			// 设置前两列根据数据自动列宽
+			for (int c = 0; c < headerMetaData.getColumns().size(); c++) {
+				sheet.setColumnWidth(c, 256*columnwidths[c]);
+			}
+			sheet.setGridsPrinted(true);
+		}
+		
+		return wb;
+	}
+
+	/**
+	 * 导出Excel(单工作表)
+	 * 
+	 * @param title
+	 *            文件名
+	 * @param creator
+	 *            创建人
+	 * @param tableData
+	 *            表格数据
+	 * @return void <style name="dataset"> case SYSROWNUM%2==0?#row0:#row1;
+	 *         fontsize:9px; </style> <style name="row0"> import(parent);
+	 *         bgcolor:#FFFFFF; </style> <style name="row1"> import(parent);
+	 *         bgcolor:#CAEAFE; </style>
+	 */
+	public void exportToExcel(String title, String creator,int[] columnwidths, TableData tableData)
+			throws Exception {
+
+		HSSFWorkbook wb = new HSSFWorkbook();// 创建新的Excel 工作簿
+		
+		HashMap<String, HSSFCellStyle> styles = initStyles(wb);// 根据模板文件,初始化表头样式
+		
+		wb = writeSheet(wb,title,styles,creator,columnwidths,tableData);//写入工作表
+
+		String sFileName = title + ".xls";
+		String agent = (String)request.getHeader("USER-AGENT");   
+        if(agent != null && agent.indexOf("MSIE") == -1) {// FF    
+            String enableFileName = "=?UTF-8?B?" + (new String(Base64.encodeBase64(sFileName.getBytes("UTF-8")))) + "?=";  
+            response.setHeader("Content-Disposition", "attachment; filename=" + enableFileName);  
+        } else { // IE    
+            String enableFileName = new String(sFileName.getBytes("utf-8"), "ISO-8859-1");  
+            response.setHeader("Content-Disposition", "attachment; filename=" + enableFileName);  
+        }
+		response.setHeader("Connection", "close");
+		response.setHeader("Content-Type", "application/vnd.ms-excel");
+
+		wb.write(response.getOutputStream());
+	}
+	
+	/**
+	 * 导出Excel(多工作表)
+	 * 
+	 * @param title
+	 *            文件名
+	 * @param creator
+	 *            创建人
+	 * @param tableDataLst
+	 *            各工作格数据(注意:每个tableData要设置sheet名称,否则按默认呈现)
+	 * @return void <style name="dataset"> case SYSROWNUM%2==0?#row0:#row1;
+	 *         fontsize:9px; </style> <style name="row0"> import(parent);
+	 *         bgcolor:#FFFFFF; </style> <style name="row1"> import(parent);
+	 *         bgcolor:#CAEAFE; </style>
+	 */
+	public void exportToExcel(String title, String creator,int[] columnwidths, List<TableData> tableDataLst)
+		throws Exception {
+		
+		HSSFWorkbook wb = new HSSFWorkbook();// 创建新的Excel 工作簿
+		HashMap<String, HSSFCellStyle> styles = initStyles(wb);// 初始化表头样式
+
+		int i = 1;
+		for(TableData tableData : tableDataLst){
+			String sheetTitle = tableData.getSheetTitle();
+			sheetTitle = sheetTitle==null||sheetTitle.equals("")?"sheet"+i:sheetTitle;
+			wb = writeSheet(wb,tableData.getSheetTitle(),styles,creator,columnwidths,tableData);//写入工作表
+			i++;
+		}
+		
+		String sFileName = title + ".xls";
+		String agent = (String)request.getHeader("USER-AGENT");   
+	        if(agent != null && agent.indexOf("MSIE") == -1) {// FF    
+	            String enableFileName = "=?UTF-8?B?" + (new String(Base64.encodeBase64(sFileName.getBytes("UTF-8")))) + "?=";  
+	            response.setHeader("Content-Disposition", "attachment; filename=" + enableFileName);  
+	        } else { // IE    
+	            String enableFileName = new String(sFileName.getBytes("utf-8"), "ISO-8859-1");  
+	            response.setHeader("Content-Disposition", "attachment; filename=" + enableFileName);  
+	        }
+		//response.setHeader("Content-Disposition", "attachment;filename=".concat(String.valueOf(URLEncoder.encode(sFileName, "UTF-8"))));
+		response.setHeader("Connection", "close");
+		response.setHeader("Content-Type", "application/vnd.ms-excel");
+		
+		wb.write(response.getOutputStream());
+	}
+	
+	/**
+	 * 大数据量ZIP包导出Excel(多文件、多工作表)
+	 * 
+	 * @param title
+	 *            Excel文件名
+	 * @param creator
+	 *            创建人
+	 * @param list
+	 *            全量数据集
+	 * @param zout
+	 *            zip压缩输出流
+	 * @return void <style name="dataset"> case SYSROWNUM%2==0?#row0:#row1;
+	 *         fontsize:9px; </style> <style name="row0"> import(parent);
+	 *         bgcolor:#FFFFFF; </style> <style name="row1"> import(parent);
+	 *         bgcolor:#CAEAFE; </style>
+	 */
+	@SuppressWarnings("unchecked")
+	public void exportToExcel(ZipOutputStream zout, ExcelBean bean)throws Exception {
+		
+	}
+
+	/**
+	 * 创建单元格(带隔行背景色)
+	 * 
+	 * @param
+	 * @return void
+	 */
+	private void createCell(HSSFRow row, TableColumn tc,
+			List<TableDataCell> data, int i, int index,
+			HashMap<String, HSSFCellStyle> styles) {
+		TableDataCell dc = data.get(i);
+		HSSFCell cell = row.createCell(index);
+		switch (tc.getColumnType()) {
+		case TableColumn.COLUMN_TYPE_INTEGER:
+			cell.setCellValue(dc.getIntValue());
+			HSSFCellStyle style = styles.get("INT");
+			if (row.getRowNum() % 2 != 0)
+				style = styles.get("INT_C");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		case TableColumn.COLUMN_TYPE_FLOAT_2:
+			cell.setCellValue(dc.getDoubleValue());
+			style = styles.get("D2");
+			if (row.getRowNum() % 2 != 0)
+				style = styles.get("D2_C");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		case TableColumn.COLUMN_TYPE_FLOAT_3:
+			cell.setCellValue(dc.getDoubleValue());
+			style = styles.get("D3");
+			if (row.getRowNum() % 2 != 0)
+				style = styles.get("D3_C");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		case TableColumn.COLUMN_TYPE_RED_BG:
+			cell.setCellValue(dc.getValue());
+			style = styles.get("RED_BG");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		case TableColumn.COLUMN_TYPE_YELLOW_BG:
+			cell.setCellValue(dc.getValue());
+			style = styles.get("YELLOW_BG");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		case TableColumn.COLUMN_TYPE_GREEN_BG:
+			cell.setCellValue(dc.getValue());
+			style = styles.get("GREEN_BG");
+			if (style != null)
+				cell.setCellStyle(style);
+			break;
+		default:
+			if (dc.getValue().equalsIgnoreCase("&nbsp;"))
+				cell.setCellValue("");
+			else
+				cell.setCellValue(dc.getValue());
+			style = styles.get("STRING");
+			if (row.getRowNum() % 2 != 0)
+				style = styles.get("STRING_C");
+			if (style != null)
+				cell.setCellStyle(style);
+		}
+	}
+
+	/**
+	 * 根据模板初始化样式
+	 * 		注意:module.xls模板文件跟该类同一路径
+	 * @param wb
+	 * @return
+	 */
+	private HashMap<String, HSSFCellStyle> initStyles(HSSFWorkbook wb) {
+		HashMap<String, HSSFCellStyle> ret = new HashMap<String, HSSFCellStyle>();
+		try {
+			ClassPathResource res = new ClassPathResource("module.xls", this.getClass());//注意:module.xls模板文件跟该类同一路径
+			InputStream is = res.getInputStream();
+			POIFSFileSystem fs = new POIFSFileSystem(is);
+			
+			HSSFWorkbook src = new HSSFWorkbook(fs);
+			HSSFSheet sheet = src.getSheetAt(0);
+
+			buildStyle(wb, src, sheet, 0, ret, "TITLE");//标题样式
+			buildStyle(wb, src, sheet, 1, ret, "SUB_TITLE");//副标题样式
+			buildStyle(wb, src, sheet, 2, ret, "SUB_TITLE2");//副标题2样式
+
+			buildStyle(wb, src, sheet, 4, ret, "TABLE_HEADER");//表头样式
+			buildStyle(wb, src, sheet, 5, ret, "STRING");//字符串单元格样式
+			buildStyle(wb, src, sheet, 6, ret, "INT");//整数单元格样式
+			buildStyle(wb, src, sheet, 7, ret, "D2");//2位小数单元格样式
+			buildStyle(wb, src, sheet, 8, ret, "D3");//3位小数单元格样式
+
+			buildStyle(wb, src, sheet, 10, ret, "STRING_C");//字符串单元格样式(带背景色)
+			buildStyle(wb, src, sheet, 11, ret, "INT_C");//整数单元格样式(带背景色)
+			buildStyle(wb, src, sheet, 12, ret, "D2_C");//2位小数单元格样式(带背景色)
+			buildStyle(wb, src, sheet, 13, ret, "D3_C");//3位小数单元格样式(带背景色)
+
+			buildStyle(wb, src, sheet, 15, ret, "RED_BG");//红色单元格背景
+			buildStyle(wb, src, sheet, 16, ret, "YELLOW_BG");//黄色单元格背景
+			buildStyle(wb, src, sheet, 17, ret, "GREEN_BG");//绿色单元格背景
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return ret;
+	}
+
+	/**
+	 * 
+	 * @param
+	 * @return void
+	 */
+	private void buildStyle(HSSFWorkbook wb, HSSFWorkbook src, HSSFSheet sheet,
+			int index, HashMap<String, HSSFCellStyle> ret, String key) {
+		HSSFRow row = sheet.getRow(index);
+		HSSFCell cell = row.getCell(1);
+		HSSFCellStyle nstyle = wb.createCellStyle();
+		ExcelUtils.copyCellStyle(wb, nstyle, src, cell.getCellStyle());
+		ret.put(key, nstyle);
+	}
+
+	/**
+	 * 工具方法,将一个字符串转换为UTF-8编码
+	 * 
+	 * @param string
+	 *            需要转换的字符串
+	 * @return String 转换后的UTF-8字符串
+	 */
+	protected String getUTF8String(String string) {
+		if (string == null) {
+			return null;
+		} else {
+			try {
+				String str = new String(string.getBytes("ISO8859-1"), "UTF-8");
+				return str;
+			} catch (UnsupportedEncodingException e) {
+				e.printStackTrace();
+				return string;
+			}
+		}
+	}
+
+	/**
+	 * 工具方法,将一个字符串转换为GBK编码
+	 * 
+	 * @param string
+	 *            需要转换的字符串
+	 * @return String 转换后的GBK字符串
+	 */
+	protected String getGBKString(String string) {
+		if (string == null) {
+			return null;
+		} else {
+			try {
+				String str = new String(string.getBytes("ISO8859-1"), "GBK");
+				return str;
+			} catch (UnsupportedEncodingException e) {
+				e.printStackTrace();
+				return string;
+			}
+		}
+	}
+
+	/**
+	 * 单元格值为空处理
+	 * 
+	 * @param value
+	 *            单元格值
+	 * @return String 如果单元格值为空,则返回"&nbsp;",否则返回原值
+	 */
+	public String fieldRender(String value) {
+		if (value == null) {
+			return "&nbsp;";
+		} else {
+			return value;
+		}
+	}
+	
+
+}

+ 266 - 0
src/main/java/com/post/excelTools/TableColumn.java

@@ -0,0 +1,266 @@
+/*
+ * 文件名:TableColumn.java
+ * 版权:
+ * 描述:
+ * 修改人:
+ * 修改时间:
+ * 修改内容:
+ */
+package com.post.excelTools;
+
+import java.util.LinkedList;
+import java.util.List;
+
+public class TableColumn {
+	/**
+	 * 字符串型
+	 */
+	public static final int COLUMN_TYPE_STRING = 0;
+
+	/**
+	 * 浮点型,保留2位小数
+	 */
+	public static final int COLUMN_TYPE_FLOAT_2 = 1;
+
+	/**
+	 * 浮点型,保留3位小数
+	 */
+	public static final int COLUMN_TYPE_FLOAT_3 = 2;
+	/**
+	 * 整形
+	 */
+	public static final int COLUMN_TYPE_INTEGER = 3;
+	/**
+	 * 公式字段
+	 */
+	public static final int COLUMN_TYPE_FORMULA = 4;
+
+	/**
+	 * 红色背景
+	 */
+	public static final int COLUMN_TYPE_RED_BG = 10;
+
+	/**
+	 * 黄色背景
+	 */
+	public static final int COLUMN_TYPE_YELLOW_BG = 11;
+
+	/**
+	 * 绿色背景
+	 */
+	public static final int COLUMN_TYPE_GREEN_BG = 12;
+
+	/**
+	 * 列id
+	 */
+	private String id;
+
+	/**
+	 * 列显示字符
+	 */
+	private String display;
+
+	/**
+	 * 列对应数据库字段
+	 */
+	private String dbField;
+
+	/**
+	 * 列数据类型,参考静态变量COLUMN_TYPE_* 默认为{@link #COLUMN_TYPE_STRING}
+	 */
+	private int columnType = COLUMN_TYPE_STRING;
+
+	/**
+	 * 是否合并相同行, 默认false
+	 */
+	private boolean grouped = false;
+
+	/**
+	 * 是否显示小计,只在该列为grouped情况下生效, 默认false
+	 */
+	private boolean displaySummary = false;
+
+	/**
+	 * 小计的聚集方法,包括:sum、avg、max
+	 */
+	private String aggregateRule;
+
+	/**
+	 * 是否显示该列, 默认true
+	 */
+	private boolean isVisible = true;
+
+	/**
+	 * 标识该列是否为复合表头, 默认false
+	 */
+	private boolean isComplex = false;
+
+	/**
+	 * 列描述
+	 */
+	private String common;
+
+	/**
+	 * 列宽度,主要用于前台显示,默认100长度单位
+	 */
+	private int width = 100;
+
+	/**
+	 * 列宽度(百分比形式),主要用于前台显示
+	 */
+	private int percentWidth;
+
+	/**
+	 * 列的宽度类型,分为百分比宽度和实际宽度,分别以 P 和 A 表示,默认为P
+	 */
+	private String widthType = "P";
+
+	protected int level;
+
+	protected TableColumn parent = null;
+
+	/**
+	 * 复合表头,拥有子列
+	 */
+	protected List<TableColumn> children = new LinkedList<TableColumn>();
+
+	public void addChild(TableColumn column) {
+		children.add(column);
+		column.parent = this;
+		if (column.isVisible())
+			isComplex = true;
+	}
+
+	public List<TableColumn> getChildren() {
+		LinkedList<TableColumn> ret = new LinkedList<TableColumn>();
+		for (TableColumn c : children) {
+			if (c.isVisible())
+				ret.add(c);
+		}
+		return ret;
+	}
+
+	public boolean isComplex() {
+		return isComplex;
+	}
+
+	public int getLength() {
+		int len = 0;
+		if (isComplex()) {
+			for (TableColumn col : getChildren()) {
+				len += col.getLength();
+			}
+		} else {
+			len = 1;
+		}
+		return len;
+	}
+
+	public String getDisplay() {
+		return display;
+	}
+
+	public void setDisplay(String display) {
+		this.display = display;
+	}
+
+	public String getDbField() {
+		return dbField;
+	}
+
+	public void setDbField(String dbField) {
+		this.dbField = dbField;
+	}
+
+	public int getColumnType() {
+		return columnType;
+	}
+
+	public String getColumnStringType(int columnType) {
+		String stringType = "string";
+		if (columnType == this.COLUMN_TYPE_INTEGER) {
+			stringType = "int";
+		} else if (columnType == this.COLUMN_TYPE_FLOAT_2) {
+			stringType = "float";
+		} else if (columnType == this.COLUMN_TYPE_FLOAT_3) {
+			stringType = "float";
+		}
+		return stringType;
+	}
+
+	public void setColumnType(int columnType) {
+		this.columnType = columnType;
+	}
+
+	public boolean isGrouped() {
+		return grouped;
+	}
+
+	public void setGrouped(boolean grouped) {
+		this.grouped = grouped;
+	}
+
+	public boolean isDisplaySummary() {
+		return displaySummary;
+	}
+
+	public void setDisplaySummary(boolean displaySummary) {
+		this.displaySummary = displaySummary;
+	}
+
+	public boolean isVisible() {
+		return isVisible;
+	}
+
+	public void setVisible(boolean isVisible) {
+		this.isVisible = isVisible;
+	}
+
+	public String getAggregateRule() {
+		return aggregateRule;
+	}
+
+	public void setAggregateRule(String aggregateRule) {
+		this.aggregateRule = aggregateRule;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getCommon() {
+		return common;
+	}
+
+	public void setCommon(String common) {
+		this.common = common;
+	}
+
+	public int getWidth() {
+		return width;
+	}
+
+	public void setWidth(int width) {
+		this.width = width;
+	}
+
+	public int getPercentWidth() {
+		return percentWidth;
+	}
+
+	public void setPercentWidth(int percentWidth) {
+		this.percentWidth = percentWidth;
+	}
+
+	public String getWidthType() {
+		return widthType;
+	}
+
+	public void setWidthType(String widthType) {
+		this.widthType = widthType;
+	}
+}

+ 323 - 0
src/main/java/com/post/excelTools/TableData.java

@@ -0,0 +1,323 @@
+/*
+ * 文件名:TableData.java
+ * 版权:
+ * 描述:
+ * 修改人:
+ * 修改时间:
+ * 修改内容:
+ */
+package com.post.excelTools;
+
+import java.text.DecimalFormat;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 
+ * 表格数据对象
+ * Title:  Excel导出工具<br>
+ * Description: 封装了单个Sheet里除了表格标题及副标题等信息外的对象,包括表格表头对象、数据行对象集合及其操作方法等<br>
+ * Copyright: eastcom Copyright (C) 2009 <br>
+ * 
+ * @author <a href="mailto:邮箱">jiangxd</a><br>
+ * @e-mail: jiangxd@eastcom-sw.com<br>
+ * @version 2.0 <br>
+ * @creatdate 2012-11-7 下午03:37:50 <br>
+ *
+ */
+public class TableData {
+	
+	private static DecimalFormat format = new DecimalFormat("0.##");
+	
+	/**
+	 * 字符串型
+	 */
+	public static final int STYLE_TYPE_STRING = 0;
+
+	/**
+	 * 浮点型,保留2位小数
+	 */
+	public static final int STYLE_TYPE_FLOAT_2 = 1;
+
+	/**
+	 * 浮点型,保留3位小数
+	 */
+	public static final int STYLE_TYPE_FLOAT_3 = 2;
+
+	/**
+	 * 整形
+	 */
+	public static final int STYLE_TYPE_INTEGER = 3;
+
+	/**
+	 * 红色背景
+	 */
+	public static final int STYLE_TYPE_RED_BG = 10;
+
+	/**
+	 * 黄色背景
+	 */
+	public static final int STYLE_TYPE_YELLOW_BG = 11;
+
+	/**
+	 * 绿色背景
+	 */
+	public static final int STYLE_TYPE_GREEN_BG = 12;
+
+	/**
+	 * sheet名称
+	 */
+	private String sheetTitle;
+	
+	/**
+	 * 列表头对象
+	 */
+	private TableHeaderMetaData header;
+
+	/**
+	 * 行对象集合
+	 */
+	private LinkedList<TableDataRow> rows;
+
+	/**
+	 * 总行数
+	 */
+	private int totalRows;
+	
+	public TableData(){}
+
+	public TableData(TableHeaderMetaData header) {
+		this.header = header;
+		rows = new LinkedList<TableDataRow>();
+	}
+
+	/**
+	 * 小计
+	 */
+	public void compute(){
+		for (int i = 0; i < header.getColumnCount(); i++){
+			TableColumn tc = header.getColumnAt(i);
+			if (tc.isVisible() && tc.isGrouped() && tc.isDisplaySummary()){
+				buildSummary(i);
+			}
+		}
+	}
+	
+	class SummaryData{
+		String key;
+		int index;
+		int count;
+		TableDataRow row;
+		
+		@Override
+		public String toString() {
+			StringBuffer sb = new StringBuffer();
+			sb.append(key).append("\t").append(index).append("\t").append(count)
+				.append("\t");
+			for (TableDataCell cell:row.getCells()){
+				sb.append(cell.getValue()).append("\t");
+			}
+			return sb.toString();
+		}		
+	}
+	
+	/**
+	 * 新建小计行
+	 * @param key 小计描述关键字(通常是需要小计的分组值)
+	 * @param index
+	 * @return
+	 */
+	private TableDataRow buildNewRow(String key, int index){
+		TableDataRow nrow = new TableDataRow(this);
+		for (int i = 0; i < index; i++){
+			nrow.addCell(""); //添加空单元格
+		}
+		nrow.addCell("小计");
+		for (int i = index+1; i < header.getColumnCount(); i++){
+			TableColumn thc = header.getColumnAt(i);
+			if (thc.getAggregateRule() != null){
+				nrow.addCell(0);
+			} else {
+				nrow.addCell("");
+			}
+		}
+		return nrow;
+	}
+	
+	private void buildSummary(int index){		
+		LinkedList<SummaryData> lst = new LinkedList<SummaryData>();
+		String okey = null; SummaryData sd = null;
+		for (int j = 0; j < rows.size(); j++){
+			TableDataRow row = rows.get(j);
+			String key = row.getCellAt(index).getValue();
+			
+			if (okey == null){
+				okey = key;				
+				sd = new SummaryData();
+				sd.key = key;
+				sd.count = 0;
+				sd.row = buildNewRow(key, index);
+			}
+			
+			if (okey!=null && !okey.equals(key)){
+				for (int i = index; i < header.getColumnCount(); i++){
+					TableColumn thc = header.getColumnAt(i);
+					if (thc.getAggregateRule() != null){		
+						String value = sd.row.getCellAt(i).getValue();
+						if (thc.getAggregateRule().equalsIgnoreCase("avg")){
+							if (sd.count > 0){
+								sd.row.getCellAt(i).setValue("平均:"+format.format(Double.parseDouble(value)/sd.count));
+							} else {
+								sd.row.getCellAt(i).setValue("平均:"+0);
+							}
+						}else if (thc.getAggregateRule().equalsIgnoreCase("max")){
+							sd.row.getCellAt(i).setValue("最大值:"+value);
+						}else if (thc.getAggregateRule().equalsIgnoreCase("min")){
+							sd.row.getCellAt(i).setValue("最小值:"+value);
+						}else if (thc.getAggregateRule().equalsIgnoreCase("sum")){
+							sd.row.getCellAt(i).setValue(value);
+						}else if (thc.getAggregateRule().equalsIgnoreCase("count")){
+							sd.row.getCellAt(i).setValue("共"+value+"行");
+						}
+					}
+				}
+				sd.index = j;
+				
+				FormulaProcessor.getInstance().fillValue(sd.row);
+				lst.add(sd);
+				
+				okey = key;				
+				sd = new SummaryData();
+				sd.key = key;
+				sd.count = 0;
+				sd.row = buildNewRow(key, index);
+			}
+			sd.count++;
+			for (int i = index+1; i < header.getColumnCount(); i++){
+				TableColumn thc = header.getColumnAt(i);
+				if (thc.getColumnType() != TableColumn.COLUMN_TYPE_FORMULA && thc.getAggregateRule() != null){					
+					Double value = Double.parseDouble(sd.row.getCellAt(i).getValue());
+					Double cellValue = null;
+					try {
+						cellValue = Double.valueOf(row.getCellAt(i).getValue());
+					} catch (NumberFormatException e) {
+						cellValue = null;
+					}
+					if(cellValue == null)
+						continue;
+					if (thc.getAggregateRule().equalsIgnoreCase("max")){
+						if (value < cellValue){
+							value = cellValue;
+						}
+					} else if (thc.getAggregateRule().equalsIgnoreCase("min")){
+						if (value > cellValue){
+							value = cellValue;
+						}
+					} else if (thc.getAggregateRule().equalsIgnoreCase("count")){
+						value++;
+					} else if (thc.getAggregateRule().equalsIgnoreCase("sum")){
+						value += cellValue;
+					} else if (thc.getAggregateRule().equalsIgnoreCase("avg")){
+						value += cellValue;						
+					}
+					sd.row.getCellAt(i).setValue(format.format(value));
+				}
+			}
+		}		
+		
+		if (sd != null){
+			for (int i = index; i < header.getColumnCount(); i++){
+				TableColumn thc = header.getColumnAt(i);
+				if (thc.getAggregateRule() != null){	
+					String value = sd.row.getCellAt(i).getValue();
+					if (thc.getAggregateRule().equalsIgnoreCase("avg")){
+						if (sd.count > 0){
+							sd.row.getCellAt(i).setValue("平均:"+format.format(Double.parseDouble(value)/sd.count));
+						} else {
+							sd.row.getCellAt(i).setValue("平均:"+0);
+						}
+					}else if (thc.getAggregateRule().equalsIgnoreCase("max")){
+						sd.row.getCellAt(i).setValue("最大值:"+value);
+					}else if (thc.getAggregateRule().equalsIgnoreCase("min")){
+						sd.row.getCellAt(i).setValue("最小值:"+value);
+					}else if (thc.getAggregateRule().equalsIgnoreCase("sum")){
+						sd.row.getCellAt(i).setValue(value);
+					}else if (thc.getAggregateRule().equalsIgnoreCase("count")){
+						sd.row.getCellAt(i).setValue("共"+value+"行");
+					}
+				}
+			}
+			FormulaProcessor.getInstance().fillValue(sd.row);
+			lst.add(sd);
+			sd.index = rows.size();
+		}
+		for (int i = 0; i < lst.size(); i++){
+			SummaryData sda = lst.get(i);
+			rows.add(sda.index+i, sda.row);
+		}
+	}
+	
+	//GETTER和SETTER方法
+	/**
+	 * 获取列表头对象 
+	 * 
+	 * @return
+	 */
+	public TableHeaderMetaData getTableHeader() {
+		return header;
+	}
+
+	/**
+	 * 添加行对象
+	 * @param row 行对象
+	 */
+	public void addRow(TableDataRow row) {
+		rows.add(row);
+	}
+
+	public List<TableDataRow> getRows() {
+		return rows;
+	}
+
+	/**
+	 * 根据行号获取行对象
+	 * @param index 行号
+	 * @return
+	 */
+	public TableDataRow getRowAt(int index) {
+		return rows.get(index);
+	}
+
+	/**
+	 * 获取数据行数
+	 * @return
+	 */
+	public int getRowCount() {
+		return rows.size();
+	}
+
+	public int getTotalRows() {
+		return totalRows;
+	}
+
+	public void setTotalRows(int totalRows) {
+		this.totalRows = totalRows;
+	}
+
+	public void setHeader(TableHeaderMetaData header) {
+		this.header = header;
+	}
+
+	public void setRows(LinkedList<TableDataRow> rows) {
+		this.rows = rows;
+	}
+
+	public String getSheetTitle() {
+		return sheetTitle;
+	}
+
+	public void setSheetTitle(String sheetTitle) {
+		this.sheetTitle = sheetTitle;
+	}
+
+}

+ 92 - 0
src/main/java/com/post/excelTools/TableDataCell.java

@@ -0,0 +1,92 @@
+/*
+ * 文件名:TableDataCell.java
+ * 版权:
+ * 描述:
+ * 修改人:
+ * 修改时间:
+ * 修改内容:
+ */
+package com.post.excelTools;
+
+import java.text.DecimalFormat;
+
+public class TableDataCell {
+	private String value;
+
+	private int intValue;
+
+	private double doubleValue;
+
+	private TableDataRow row;
+
+	private int columnIndex;
+
+	private static DecimalFormat format2 = new DecimalFormat("0.##");
+
+	private static DecimalFormat format3 = new DecimalFormat("0.###");
+
+	private int cellStyle = TableData.STYLE_TYPE_STRING;
+
+	public TableDataCell(TableDataRow row) {
+		this(-1, row);
+	}
+
+	public TableDataCell(int index, TableDataRow row) {
+		this.row = row;
+		if (index == -1) {
+			index = row.getCells().size();
+		} else {
+			this.columnIndex = index;
+		}
+		value = "";
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	public void setValue(int value) {
+		this.value = String.valueOf(value);
+		this.intValue = value;
+	}
+
+	public void setValue(double value) {
+		int type = row.getTable().getTableHeader().getColumnAt(columnIndex)
+				.getColumnType();
+		if (type == TableColumn.COLUMN_TYPE_FLOAT_2) {
+			this.value = format2.format(value);
+		} else if (type == TableColumn.COLUMN_TYPE_FLOAT_3) {
+			this.value = format3.format(value);
+		}
+		this.doubleValue = value;
+		this.value = format2.format(value);
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public TableDataRow getRow() {
+		return row;
+	}
+
+	public int getColumnIndex() {
+		return columnIndex;
+	}
+
+	public int getIntValue() {
+		return intValue;
+	}
+
+	public double getDoubleValue() {
+		return doubleValue;
+	}
+
+	public void setCellStyle(int cellStyle) {
+		this.cellStyle = cellStyle;
+	}
+
+	public int getCellStyle() {
+		return cellStyle;
+	}
+}

+ 115 - 0
src/main/java/com/post/excelTools/TableDataRow.java

@@ -0,0 +1,115 @@
+package com.post.excelTools;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 
+ * 数据行对象
+ * Title:  Excel导出工具<br>
+ * Description: 封装了数据导出到excel中的行对象,包括行中列数据对象的操作方法等<br>
+ * Copyright: eastcom Copyright (C) 2009 <br>
+ * 
+ * @author <a href="mailto:邮箱">jiangxd</a><br>
+ * @e-mail: jiangxd@eastcom-sw.com<br>
+ * @version 2.0 <br>
+ * @creatdate 2012-11-7 下午03:32:20 <br>
+ *
+ */
+public class TableDataRow {
+	/**
+	 * 列数据对象集合
+	 */
+	private LinkedList<TableDataCell> cells;
+
+	/**
+	 * 对应的表格数据对象(一对多关系)
+	 */
+	private TableData table;
+
+	/**
+	 * 行样式
+	 */
+	private int rowStyle = TableColumn.COLUMN_TYPE_STRING;
+
+	public void addCell(TableDataCell cell) {
+		cells.add(cell);
+	}
+
+	public void addCell(String value) {
+		TableDataCell cell = new TableDataCell(this);
+		cell.setValue(value);
+		cell.setCellStyle(rowStyle);
+		addCell(cell);
+	}
+
+	public void addCell(Integer value) {
+		TableDataCell cell = new TableDataCell(this);
+		cell.setValue(value);
+		cell.setCellStyle(rowStyle);
+		addCell(cell);
+	}
+
+	public void addCell(Double value) {
+		TableDataCell cell = new TableDataCell(this);
+		cell.setValue(value);
+		cell.setCellStyle(rowStyle);
+		addCell(cell);
+	}
+
+	public void addCell(Object value) {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		if (value instanceof String) {
+			addCell((String) value);
+		} else if (value instanceof Integer) {
+			addCell((Integer) value);
+		} else if (value instanceof Double) {
+			addCell((Double) value);
+		} else if (value instanceof BigDecimal) {
+			addCell(value.toString());
+		} else if (value instanceof Long) {
+			addCell(value.toString());
+		} else if(value instanceof Date){
+			addCell(sdf.format(value));
+		} else if(value instanceof Timestamp){
+			addCell(sdf.format(value));
+		} else if(value == null){
+			addCell("");
+		} else
+			addCell(value + "");
+	}
+
+	/**
+	 * 根据列序号获取列数据对象
+	 * @param index
+	 * @return
+	 */
+	public TableDataCell getCellAt(int index) {
+		return cells.get(index);
+	}
+
+	public List<TableDataCell> getCells() {
+		return cells;
+	}
+
+	public TableData getTable() {
+		return table;
+	}
+
+	public TableDataRow(TableData table) {
+		cells = new LinkedList<TableDataCell>();
+		this.table = table;
+	}
+
+	public void setRowStyle(int rowStyle) {
+		this.rowStyle = rowStyle;
+	}
+
+	public int getRowStyle() {
+		return rowStyle;
+	}
+}

+ 161 - 0
src/main/java/com/post/excelTools/TableHeaderMetaData.java

@@ -0,0 +1,161 @@
+package com.post.excelTools;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 
+ * Title:  <br>
+ * Description: 表头对象,用于创建excel表头,支持多层表头<br>
+ * Copyright: eastcom Copyright (C) 2009 <br>
+ * 
+ * @author <a href="mailto:邮箱">jiangxd</a><br>
+ * @e-mail: jiangxd@eastcom-sw.com<br>
+ * @version 2.0 <br>
+ * @creatdate 2012-11-7 下午03:21:39 <br>
+ *
+ */
+public class TableHeaderMetaData {
+	/**
+	 * 表头对象集合
+	 */
+	private LinkedList<TableColumn> columns;
+
+	/**
+	 * 复合表头叶子层表头对象集合
+	 */
+	private LinkedList<TableColumn> leafs;
+
+	private String common;
+
+	/**
+	 * 复合表头最大深度
+	 */
+	public int maxlevel = 0;
+
+	public TableHeaderMetaData() {
+		columns = new LinkedList<TableColumn>();
+		leafs = new LinkedList<TableColumn>();
+	}
+
+	/**
+	 * 添加列表头
+	 * @param col 列表头对象
+	 */
+	public void addColumn(TableColumn col) {
+		setLevel(col, 1);
+		columns.add(col);
+		addLeafColumn(col);
+	}
+
+	/**
+	 * 刷新表头
+	 */
+	public void refresh() {
+		maxlevel = 1;
+		for (TableColumn col : columns) {
+			if (col.isVisible()) {
+				col.level = 1;
+				int level = refreshChildren(col);
+				if (level > maxlevel)
+					maxlevel = level;
+			}
+		}
+	}
+
+	/**
+	 * 刷新子表头并返回子表头深度
+	 * @param parent 父表头对象
+	 * @return 深度
+	 */
+	private int refreshChildren(TableColumn parent) {
+		if (parent.children.size() != 0) {
+			int max = parent.level;
+			for (TableColumn col : parent.children) {
+				if (col.isVisible()) {
+					col.parent = parent;
+					col.level = parent.level + 1;
+					int level = refreshChildren(col);
+					if (level > max)
+						max = level;
+				}
+			}
+			return max;
+		} else {
+			return parent.level;
+		}
+	}
+
+	/**
+	 * 设置表头对象深度
+	 * @param col 表头对象
+	 * @param level 深度
+	 */
+	private void setLevel(TableColumn col, int level) {
+		col.level = level;
+		if (col.isVisible() && level > maxlevel)
+			maxlevel = level;
+	}
+
+	/**
+	 * 添加叶子列表头
+	 * @param col 列表头对象
+	 */
+	private void addLeafColumn(TableColumn col) {
+		if (col.parent != null)
+			setLevel(col, col.parent.level + 1);
+		if (col.isComplex()) {
+			for (TableColumn c : col.getChildren()) {
+				addLeafColumn(c);
+			}
+		} else {
+			leafs.add(col);
+		}
+	}
+
+	/**
+	 * 获取列表头集合
+	 * @return
+	 */
+	public List<TableColumn> getColumns() {
+		return leafs;
+	}
+
+	/**
+	 * 获取原始列表头集合(不包含隐藏列)
+	 * @return
+	 */
+	public List<TableColumn> getOriginColumns() {
+		LinkedList<TableColumn> ret = new LinkedList<TableColumn>();
+		for (TableColumn c : columns) {
+			if (c.isVisible())
+				ret.add(c);
+		}
+		return ret;
+	}
+
+	/**
+	 * 根据序号获取表头对象
+	 * @param index 序号
+	 * @return
+	 */
+	public TableColumn getColumnAt(int index) {
+		return leafs.get(index);
+	}
+
+	/**
+	 * 获取列数
+	 * @return
+	 */
+	public int getColumnCount() {
+		return leafs.size();
+	}
+
+	public String getCommon() {
+		return common;
+	}
+
+	public void setCommon(String common) {
+		this.common = common;
+	}
+}

BIN
src/main/java/com/post/excelTools/module.xls


BIN
src/main/java/com/post/excelTools/module1.xls


+ 196 - 0
src/main/java/com/post/excelUtil/DateUtil.java

@@ -0,0 +1,196 @@
+package com.post.excelUtil;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+ 
+public class DateUtil {
+     
+    //得到当前的时间
+    public static Date getDate() {
+        Calendar canlendar = Calendar.getInstance();
+        return canlendar.getTime();
+    }
+     
+    //提到指定的millis得到时间
+    public static Date getDate(long millis) {
+        Calendar canlendar = Calendar.getInstance();
+        canlendar.clear();
+        canlendar.setTimeInMillis(millis);
+        return canlendar.getTime();
+    }
+ 
+    public static long getMillis() {
+        return Calendar.getInstance().getTimeInMillis();
+    }
+ 
+    //得到指定日期的字符串(yyyy-MM-dd HH:mm:ss.SSS)
+    public static String getDateFormate(Date date, String formate) {
+        try {
+            SimpleDateFormat simpleDateFormate = new SimpleDateFormat(formate);
+            return simpleDateFormate.format(date);
+        } catch (Exception e) {
+        }
+        return "";
+    }
+ 
+    //根据日期得到YYYY-MM-DD HH:MM:SS.SSS格式字符串
+    public static String get4yMdHmsS(Date date) {
+        return DateUtil.getDateFormate(date, "yyyy-MM-dd HH:mm:ss.SSS");
+    }
+ 
+    //根据日期得到YYYY-MM-DD HH:MM:SS格式字符串
+    public static String get4yMdHms(Date date) {
+        return DateUtil.getDateFormate(date, "yyyy-MM-dd HH:mm:ss");
+    }
+ 
+    //根据日期得到YYYY-MM-DD HH:MM格式字符串
+    public static String get4yMdHm(Date date) {
+        return DateUtil.getDateFormate(date, "yyyy-MM-dd HH:mm");
+    }
+ 
+    //根据日期得到YYYY-MM-DD格式字符串
+    public static String get4yMd(Date date) {
+        return DateUtil.getDateFormate(date, "yyyy-MM-dd");
+    }
+     
+    //把指定字符(yyyy-MM-dd HH:mm:ss.SSS)串转成Date
+    public static Date parse4yMdHmsS(String sDate) {
+        return DateUtil.parseDate(sDate, "yyyy-MM-dd HH:mm:ss.SSS");
+    }
+ 
+    //把指定字符(yyyy-MM-dd HH:mm:ss)串转成Date
+    public static Date parse4yMdHms(String sDate) {
+        return DateUtil.parseDate(sDate, "yyyy-MM-dd HH:mm:ss");
+    }
+ 
+    //把指定字符(yyyy-MM-dd HH:mm)串转成Date
+    public static Date parse4yMdHm(String sDate) {
+        return DateUtil.parseDate(sDate, "yyyy-MM-dd HH:mm");
+    }
+ 
+    //把指定字符(yyyy-MM-dd)串转成Date
+    public static Date parse4yMd(String sDate) {
+        return DateUtil.parseDate(sDate, "yyyy-MM-dd");
+    }
+ 
+    //根据指定格式,把字符串转成日期
+    public static Date parseDate(String sDate, String formate) {
+        SimpleDateFormat simpleDateFormate = new SimpleDateFormat(formate);
+        try {
+            return simpleDateFormate.parse(sDate);
+        } catch (ParseException e) {
+            return null;
+        }
+    }
+ 
+    //两个长整型的时间相差(时间的毫秒数),可以得到指定的毫秒数,秒数,分钟数,天数
+    public static double getDifTwoTime(Date minuendTime, Date subtrahendTime, String tdatestr) {
+        if (minuendTime == null || subtrahendTime != null) {
+            return DateUtil.getDifTwoTime(minuendTime.getTime(), subtrahendTime.getTime(), tdatestr);
+        }
+        return 0;
+    }
+ 
+    //两个长整型的时间相差(时间的毫秒数),可以得到指定的毫秒数,秒数,分钟数,天数
+    public static double getDifTwoTime(long minuendTime, long subtrahendTime, String tdatestr) {
+        if (tdatestr == null || tdatestr.equals("")) {
+            tdatestr = "MS";
+        }
+        double temp = 1;
+        /** 毫秒数 */
+        if ("MS".equalsIgnoreCase(tdatestr)) {
+            temp = 1;
+        }
+        /** 得到秒 */
+        if ("S".equalsIgnoreCase(tdatestr)) {
+            temp = 1000;
+        }
+        /** 得到分 */
+        if ("M".equalsIgnoreCase(tdatestr)) {
+            temp = 1000 * 60;
+        }
+        /** 得到小时 */
+        if ("H".equalsIgnoreCase(tdatestr)) {
+            temp = 1000 * 60 * 60;
+        }
+        /** 得到天 */
+        if ("D".equalsIgnoreCase(tdatestr)) {
+            temp = 1000 * 60 * 60 * 24;
+        }
+        return (minuendTime - subtrahendTime) / temp;
+    }
+ 
+    //从日期中得到指定部分(YYYY/MM/DD/HH/SS/SSS)数字
+    public static int getPartOfTime(Date date, String part) {
+        Calendar canlendar = Calendar.getInstance();
+        canlendar.clear();
+        canlendar.setTime(date);
+        if (part.equalsIgnoreCase("Y")) {//得到年
+            return canlendar.get(Calendar.YEAR);
+        }
+        if (part.equalsIgnoreCase("M")) {//得到月
+            return canlendar.get(Calendar.MONTH) + 1;
+        }
+        if (part.equalsIgnoreCase("D")) {//得到日
+            return canlendar.get(Calendar.DAY_OF_MONTH);
+        }
+        if (part.equalsIgnoreCase("H")) {//得到时
+            return canlendar.get(Calendar.HOUR_OF_DAY);
+        }
+        if (part.equalsIgnoreCase("M")) {//得到分
+            return canlendar.get(Calendar.MINUTE);
+        }
+        if (part.equalsIgnoreCase("S")) {//得到秒
+            return canlendar.get(Calendar.SECOND);
+        }
+        if (part.equalsIgnoreCase("MS")) {//得到毫秒
+            return canlendar.get(Calendar.MILLISECOND);
+        }
+        return -1;
+    }
+
+	 //从日期得到本年第一天日期
+    public static Date getFirstDateOfCurYear(Date date){
+    	Calendar canlendar = Calendar.getInstance();
+        canlendar.clear();
+        canlendar.setTime(date);
+        canlendar.set(canlendar.DAY_OF_YEAR,1);
+        return canlendar.getTime();
+    }
+    
+    //从日期得到上月最后一天日期
+    public static Date getLastDateOfUpMonth(Date date){
+    	Calendar canlendar = Calendar.getInstance();
+        canlendar.clear();
+        canlendar.setTime(date);
+        canlendar.set(canlendar.DAY_OF_MONTH, 1);
+       	canlendar.add(canlendar.DAY_OF_YEAR, -1);
+        return canlendar.getTime();
+    }
+    //从xxxx年xx月得到本月第一天
+    public static Date getFirst4y2M(String s){
+    	String y = s.substring(0, 4);
+    	String m = s.substring(5, 7);
+    	return DateUtil.parse4yMd(y+"-"+m+"-"+"01");
+    }
+    //从2014年01月得到本月最后一天
+    public static Date getLast4y2M(String s){
+    	Calendar canlendar = Calendar.getInstance();
+    	canlendar.setTime(DateUtil.getFirst4y2M(s));
+    	canlendar.add(canlendar.MONTH, 1);
+    	canlendar.add(canlendar.DAY_OF_YEAR, -1);
+    	return canlendar.getTime();
+    }
+  //从xxxx年xx月得到本年第一天
+    public static Date getYearFirst4y2M(String s){
+    	String y = s.substring(0, 4);
+    	return DateUtil.parse4yMd(y+"-"+"01"+"-"+"01");
+    }
+  //从xxxx年xx月得到本年最后一天
+    public static Date getYearLast4y2M(String s){
+    	String y = s.substring(0, 4);
+    	return DateUtil.parse4yMd(y+"-"+"12"+"-"+"31");
+    }
+}

+ 202 - 0
src/main/java/com/post/excelUtil/ExcelUtils.java

@@ -0,0 +1,202 @@
+package com.post.excelUtil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+public class ExcelUtils {
+
+	/** 总行数 */
+	private int totalRows = 0;
+
+	/** 总列数 */
+	private int totalCells = 0;
+
+	/**
+	 * <ul>
+	 * <li>Description:[根据文件名读取excel文件]</li>
+	 * <ul>
+	 * 
+	 * @param fileName
+	 * @return
+	 * @throws Exception
+	 */
+	public List<ArrayList<String>> read(String fileName) {
+		List<ArrayList<String>> dataLst = new ArrayList<ArrayList<String>>();
+
+		/** 检查文件名是否为空或者是否是Excel格式的文件 */
+		if (fileName == null || !fileName.matches("^.+\\.(?i)((xls)|(xlsx))$")) {
+			return dataLst;
+		}
+
+		boolean isExcel2003 = true;
+		/** 对文件的合法性进行验证 */
+		if (fileName.matches("^.+\\.(?i)(xlsx)$")) {
+			isExcel2003 = false;
+		}
+
+		/** 检查文件是否存在 */
+		File file = new File(fileName);
+		if (file == null || !file.exists()) {
+			return dataLst;
+		}
+
+		try {
+			/** 调用本类提供的根据流读取的方法 */
+			dataLst = read(new FileInputStream(file), isExcel2003);
+		} catch (Exception ex) {
+			ex.printStackTrace();
+		}
+
+		/** 返回最后读取的结果 */
+		return dataLst;
+	}
+
+	/**
+	 * <ul>
+	 * <li>Description:[根据流读取Excel文件]</li>
+	 * <li>Midified by [modifier] [modified time]</li>
+	 * <ul>
+	 * 
+	 * @param inputStream
+	 * @param isExcel2003
+	 * @return
+	 */
+	public List<ArrayList<String>> read(InputStream inputStream,
+			boolean isExcel2003) {
+		List<ArrayList<String>> dataLst = null;
+		try {
+			/** 根据版本选择创建Workbook的方式 */
+			Workbook wb = isExcel2003 ? new HSSFWorkbook(inputStream)
+					: new XSSFWorkbook(inputStream);
+			dataLst = read(wb);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return dataLst;
+	}
+
+	/**
+	 * <ul>
+	 * <li>Description:[得到总行数]</li>
+	 * <li>Created by [Huyvanpull] [Jan 20, 2010]</li>
+	 * <li>Midified by [modifier] [modified time]</li>
+	 * <ul>
+	 * 
+	 * @return
+	 */
+	public int getTotalRows() {
+		return totalRows;
+	}
+
+	/**
+	 * <ul>
+	 * <li>Description:[得到总列数]</li>
+	 * <li>Created by [Huyvanpull] [Jan 20, 2010]</li>
+	 * <li>Midified by [modifier] [modified time]</li>
+	 * <ul>
+	 * 
+	 * @return
+	 */
+	public int getTotalCells() {
+		return totalCells;
+	}
+
+	/**
+	 * <ul>
+	 * <li>Description:[读取数据]</li>
+	 * <li>Created by [Huyvanpull] [Jan 20, 2010]</li>
+	 * <li>Midified by [modifier] [modified time]</li>
+	 * <ul>
+	 * 
+	 * @param wb
+	 * @return
+	 */
+	private List<ArrayList<String>> read(Workbook wb) {
+		List<ArrayList<String>> dataLst = new ArrayList<ArrayList<String>>();
+
+		/** 得到第一个shell */
+		Sheet sheet = wb.getSheetAt(0);
+		this.totalRows = sheet.getPhysicalNumberOfRows();
+		if (this.totalRows >= 1 && sheet.getRow(0) != null) {
+			this.totalCells = sheet.getRow(0).getPhysicalNumberOfCells();
+		}
+
+		/** 循环Excel的行 */
+		for (int r = 1; r < this.totalRows; r++) {
+			Row row = sheet.getRow(r);
+			if (row == null) {
+				continue;
+			}
+
+			ArrayList<String> rowLst = new ArrayList<String>();
+			/** 循环Excel的列 */
+			for (short c = 0; c < this.getTotalCells(); c++) {
+				Cell cell = row.getCell(c);
+				String cellValue = "";
+				if (cell == null) {
+					rowLst.add(cellValue);
+					continue;
+				}
+
+				/** 处理数字型的,自动去零 */
+				if (Cell.CELL_TYPE_NUMERIC == cell.getCellType()) {
+					/** 在excel里,日期也是数字,在此要进行判断 */
+					if (HSSFDateUtil.isCellDateFormatted(cell)) {
+						cellValue = DateUtil
+								.get4yMdHms(cell.getDateCellValue());
+					} else {
+						cellValue = getRightStr(cell.getNumericCellValue() + "");
+					}
+				}
+				/** 处理字符串型 */
+				else if (Cell.CELL_TYPE_STRING == cell.getCellType()) {
+					cellValue = cell.getStringCellValue();
+				}
+				/** 处理布尔型 */
+				else if (Cell.CELL_TYPE_BOOLEAN == cell.getCellType()) {
+					cellValue = cell.getBooleanCellValue() + "";
+				}
+				/** 其它的,非以上几种数据类型 */
+				else {
+					cellValue = cell.toString() + "";
+				}
+
+				rowLst.add(cellValue);
+			}
+			dataLst.add(rowLst);
+		}
+		return dataLst;
+	}
+
+	/**
+	 * <ul>
+	 * <li>Description:[正确地处理整数后自动加零的情况]</li>
+	 * <li>Created by [Huyvanpull] [Jan 20, 2010]</li>
+	 * <li>Midified by [modifier] [modified time]</li>
+	 * <ul>
+	 * 
+	 * @param sNum
+	 * @return
+	 */
+	private String getRightStr(String sNum) {
+		DecimalFormat decimalFormat = new DecimalFormat("#.000000");
+		String resultStr = decimalFormat.format(new Double(sNum));
+		if (resultStr.matches("^[-+]?\\d+\\.[0]+$")) {
+			resultStr = resultStr.substring(0, resultStr.indexOf("."));
+		}
+		return resultStr;
+	}
+}

+ 37 - 0
src/main/java/com/post/interceptor/AuthInterceptor.java

@@ -0,0 +1,37 @@
+package com.post.interceptor;
+
+import org.apache.struts2.ServletActionContext;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
+import com.post.pageModel.SessionInfo;
+import com.post.util.RequestUtil;
+import com.post.util.ResourceUtil;
+
+public class AuthInterceptor extends MethodFilterInterceptor {
+
+	protected String doIntercept(ActionInvocation actionInvocation) throws Exception {
+		ActionContext actionContext = actionInvocation.getInvocationContext();
+		SessionInfo sessionInfo = (SessionInfo) ServletActionContext.getRequest().getSession().getAttribute(ResourceUtil.getSessionInfoName());
+		if (sessionInfo.getLoginName().equals("admin")) {// admin用户不需要验证权限
+			return actionInvocation.invoke();
+		}
+		String requestPath = RequestUtil.getRequestPath(ServletActionContext.getRequest());
+		String authUrls = sessionInfo.getAuthUrls();
+		boolean b = false;
+		for (String url : authUrls.split(",")) {
+			if (requestPath.equals(url)) {
+				b = true;
+				break;
+			}
+		}
+		if (b) {
+			return actionInvocation.invoke();
+		}
+		ServletActionContext.getRequest().setCharacterEncoding("utf-8");
+		ServletActionContext.getRequest().setAttribute("msg", "您没有访问此功能的权限!权限路径为[" + requestPath + "]请联系管理员给你赋予相应权限。");
+		return "noAuth";
+	}
+
+}

+ 19 - 0
src/main/java/com/post/interceptor/EncodingInterceptor.java

@@ -0,0 +1,19 @@
+package com.post.interceptor;
+
+import org.apache.struts2.ServletActionContext;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+
+public class EncodingInterceptor extends AbstractInterceptor {
+
+
+	public String intercept(ActionInvocation actionInvocation) throws Exception {
+		ActionContext actionContext = actionInvocation.getInvocationContext();
+		ServletActionContext.getResponse().setCharacterEncoding("utf-8");
+		ServletActionContext.getRequest().setCharacterEncoding("utf-8");
+		return actionInvocation.invoke();
+	}
+
+}

+ 42 - 0
src/main/java/com/post/interceptor/SessionFilter.java

@@ -0,0 +1,42 @@
+package com.post.interceptor;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.springframework.http.client.support.HttpAccessor;
+
+public class SessionFilter implements Filter {
+
+	@Override
+	public void destroy() {
+
+	}
+
+	@Override
+	public void doFilter(ServletRequest request, ServletResponse response,
+			FilterChain chain) throws IOException, ServletException {
+		HttpServletRequest req=(HttpServletRequest) request;
+		HttpServletResponse res=(HttpServletResponse)response;
+		HttpSession session=req.getSession();
+		if (session==null || session.getAttribute("sessionInfo")==null){
+			res.sendRedirect(req.getContextPath());
+			return;
+		}
+		chain.doFilter(request, response);
+	}
+
+	@Override
+	public void init(FilterConfig arg0) throws ServletException {
+
+	}
+
+}

+ 23 - 0
src/main/java/com/post/interceptor/SessionInterceptor.java

@@ -0,0 +1,23 @@
+package com.post.interceptor;
+
+import org.apache.struts2.ServletActionContext;
+
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
+import com.post.pageModel.SessionInfo;
+import com.post.util.ResourceUtil;
+
+public class SessionInterceptor extends MethodFilterInterceptor {
+
+	protected String doIntercept(ActionInvocation actionInvocation)	throws Exception {
+		SessionInfo sessionInfo = (SessionInfo) ServletActionContext.getRequest().getSession().getAttribute(ResourceUtil.getSessionInfoName());
+		if (sessionInfo == null) {
+			ServletActionContext.getRequest().setCharacterEncoding("utf-8");
+			//ServletActionContext.getResponse().sendRedirect(ServletActionContext.getRequest().getContextPath());
+			ServletActionContext.getRequest().setAttribute("msg","您还没有登录或登录已超时,请重新登录!");
+			return "noSession";
+		}
+		return actionInvocation.invoke();
+	}
+
+}

+ 43 - 0
src/main/java/com/post/listener/OgnlSecurityListener.java

@@ -0,0 +1,43 @@
+package com.post.listener;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.http.HttpSessionAttributeListener;
+import javax.servlet.http.HttpSessionBindingEvent;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+import ognl.OgnlRuntime;
+
+
+public class OgnlSecurityListener implements ServletContextListener, HttpSessionListener, HttpSessionAttributeListener {
+
+	public void attributeAdded(HttpSessionBindingEvent arg0) {
+
+	}
+
+	public void attributeRemoved(HttpSessionBindingEvent arg0) {
+
+	}
+
+	public void attributeReplaced(HttpSessionBindingEvent arg0) {
+
+	}
+
+	public void sessionCreated(HttpSessionEvent arg0) {
+
+	}
+
+	public void sessionDestroyed(HttpSessionEvent arg0) {
+
+	}
+
+	public void contextDestroyed(ServletContextEvent arg0) {
+
+	}
+
+	public void contextInitialized(ServletContextEvent sce) {
+		OgnlRuntime.setSecurityManager(null);
+	}
+
+}

+ 106 - 0
src/main/java/com/post/model/Tannounce.java

@@ -0,0 +1,106 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * Tannounce entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tannounce", catalog = "cwfx")
+public class Tannounce implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tuser tuser;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private String ctitle;
+	private String ccontent;
+
+	// Constructors
+
+	/** default constructor */
+	public Tannounce() {
+	}
+
+	/** minimal constructor */
+	public Tannounce(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tannounce(String cid, Tuser tuser, Timestamp ccreatedate, Timestamp cmodifydate, String ctitle, String ccontent) {
+		this.cid = cid;
+		this.tuser = tuser;
+		this.ccreatedate = ccreatedate;
+		this.cmodifydate = cmodifydate;
+		this.ctitle = ctitle;
+		this.ccontent = ccontent;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "USERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+	@Column(name = "CCREATEDATE", length = 19)
+	public Timestamp getCcreatedate() {
+		return this.ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	@Column(name = "CMODIFYDATE", length = 19)
+	public Timestamp getCmodifydate() {
+		return this.cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	@Column(name = "CTITLE", length = 200)
+	public String getCtitle() {
+		return this.ctitle;
+	}
+
+	public void setCtitle(String ctitle) {
+		this.ctitle = ctitle;
+	}
+
+	@Column(name = "CCONTENT", length = 65535)
+	public String getCcontent() {
+		return this.ccontent;
+	}
+
+	public void setCcontent(String ccontent) {
+		this.ccontent = ccontent;
+	}
+
+}

+ 133 - 0
src/main/java/com/post/model/Tauth.java

@@ -0,0 +1,133 @@
+package com.post.model;
+
+import java.math.BigDecimal;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tauth entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tauth", catalog = "cwfx")
+public class Tauth implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tauth tauth;
+	private String cdesc;
+	private String cname;
+	private BigDecimal cseq;
+	private String curl;
+	private Set<TroleTauth> troleTauths = new HashSet<TroleTauth>(0);
+	private Set<Tauth> tauths = new HashSet<Tauth>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tauth() {
+	}
+
+	/** minimal constructor */
+	public Tauth(String cid, String cname) {
+		this.cid = cid;
+		this.cname = cname;
+	}
+
+	/** full constructor */
+	public Tauth(String cid, Tauth tauth, String cdesc, String cname, BigDecimal cseq, String curl, Set<TroleTauth> troleTauths, Set<Tauth> tauths) {
+		this.cid = cid;
+		this.tauth = tauth;
+		this.cdesc = cdesc;
+		this.cname = cname;
+		this.cseq = cseq;
+		this.curl = curl;
+		this.troleTauths = troleTauths;
+		this.tauths = tauths;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CPID")
+	public Tauth getTauth() {
+		return this.tauth;
+	}
+
+	public void setTauth(Tauth tauth) {
+		this.tauth = tauth;
+	}
+
+	@Column(name = "CDESC", length = 200)
+	public String getCdesc() {
+		return this.cdesc;
+	}
+
+	public void setCdesc(String cdesc) {
+		this.cdesc = cdesc;
+	}
+
+	@Column(name = "CNAME", nullable = false, length = 100)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@Column(name = "CSEQ", precision = 22, scale = 0)
+	public BigDecimal getCseq() {
+		return this.cseq;
+	}
+
+	public void setCseq(BigDecimal cseq) {
+		this.cseq = cseq;
+	}
+
+	@Column(name = "CURL", length = 5000)
+	public String getCurl() {
+		return this.curl;
+	}
+
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tauth")
+	public Set<TroleTauth> getTroleTauths() {
+		return this.troleTauths;
+	}
+
+	public void setTroleTauths(Set<TroleTauth> troleTauths) {
+		this.troleTauths = troleTauths;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tauth")
+	public Set<Tauth> getTauths() {
+		return this.tauths;
+	}
+
+	public void setTauths(Set<Tauth> tauths) {
+		this.tauths = tauths;
+	}
+
+}

+ 318 - 0
src/main/java/com/post/model/Tbudget.java

@@ -0,0 +1,318 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * Tbudget entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tbudget", catalog = "cwfx")
+public class Tbudget implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tproject tproject;
+	private Tfile tfile;
+	private Tzrzx tzrzx;
+	private Tuser tuser;
+	private Tdept tdept;
+	private Double cyjywls;
+	private Double cyjfy;
+	private Double cyjlr;
+	private Date cyjqssj;
+	private Date csjqssj;
+	private Double csjfy;
+	private Double cfycy;
+	private Double cyt;
+	private Double cytcy;
+	private Double csj;
+	private Double ctotal;
+	private Integer cstate;
+	private Date cdate;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private String cauditfilename;
+	private String cauditfilepath;
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tbudget() {
+	}
+
+	/** minimal constructor */
+	public Tbudget(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tbudget(String cid, Tproject tproject, Tfile tfile, Tzrzx tzrzx, Tuser tuser, Tdept tdept, Double cyjywls, Double cyjfy, Double cyjlr, Date cyjqssj, Date csjqssj, Double csjfy, Double cfycy, Double cyt, Double cytcy, Double csj, Double ctotal, Integer cstate, Date cdate, Timestamp ccreatedate, Timestamp cmodifydate, String cauditfilename, String cauditfilepath, Set<Tcost> tcosts) {
+		this.cid = cid;
+		this.tproject = tproject;
+		this.tfile = tfile;
+		this.tzrzx = tzrzx;
+		this.tuser = tuser;
+		this.tdept = tdept;
+		this.cyjywls = cyjywls;
+		this.cyjfy = cyjfy;
+		this.cyjlr = cyjlr;
+		this.cyjqssj = cyjqssj;
+		this.csjqssj = csjqssj;
+		this.csjfy = csjfy;
+		this.cfycy = cfycy;
+		this.cyt = cyt;
+		this.cytcy = cytcy;
+		this.csj = csj;
+		this.ctotal = ctotal;
+		this.cstate = cstate;
+		this.cdate = cdate;
+		this.ccreatedate = ccreatedate;
+		this.cmodifydate = cmodifydate;
+		this.cauditfilename = cauditfilename;
+		this.cauditfilepath = cauditfilepath;
+		this.tcosts = tcosts;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CPROJECTID")
+	public Tproject getTproject() {
+		return this.tproject;
+	}
+
+	public void setTproject(Tproject tproject) {
+		this.tproject = tproject;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CFILEID")
+	public Tfile getTfile() {
+		return this.tfile;
+	}
+
+	public void setTfile(Tfile tfile) {
+		this.tfile = tfile;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CZRZXID")
+	public Tzrzx getTzrzx() {
+		return this.tzrzx;
+	}
+
+	public void setTzrzx(Tzrzx tzrzx) {
+		this.tzrzx = tzrzx;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CUSERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CDEPTID")
+	public Tdept getTdept() {
+		return this.tdept;
+	}
+
+	public void setTdept(Tdept tdept) {
+		this.tdept = tdept;
+	}
+
+	@Column(name = "CYJYWLS", precision = 16)
+	public Double getCyjywls() {
+		return this.cyjywls;
+	}
+
+	public void setCyjywls(Double cyjywls) {
+		this.cyjywls = cyjywls;
+	}
+
+	@Column(name = "CYJFY", precision = 16)
+	public Double getCyjfy() {
+		return this.cyjfy;
+	}
+
+	public void setCyjfy(Double cyjfy) {
+		this.cyjfy = cyjfy;
+	}
+
+	@Column(name = "CYJLR", precision = 16)
+	public Double getCyjlr() {
+		return this.cyjlr;
+	}
+
+	public void setCyjlr(Double cyjlr) {
+		this.cyjlr = cyjlr;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CYJQSSJ", length = 10)
+	public Date getCyjqssj() {
+		return this.cyjqssj;
+	}
+
+	public void setCyjqssj(Date cyjqssj) {
+		this.cyjqssj = cyjqssj;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CSJQSSJ", length = 10)
+	public Date getCsjqssj() {
+		return this.csjqssj;
+	}
+
+	public void setCsjqssj(Date csjqssj) {
+		this.csjqssj = csjqssj;
+	}
+
+	@Column(name = "CSJFY", precision = 16)
+	public Double getCsjfy() {
+		return this.csjfy;
+	}
+
+	public void setCsjfy(Double csjfy) {
+		this.csjfy = csjfy;
+	}
+
+	@Column(name = "CFYCY", precision = 16)
+	public Double getCfycy() {
+		return this.cfycy;
+	}
+
+	public void setCfycy(Double cfycy) {
+		this.cfycy = cfycy;
+	}
+
+	@Column(name = "CYT", precision = 16)
+	public Double getCyt() {
+		return this.cyt;
+	}
+
+	public void setCyt(Double cyt) {
+		this.cyt = cyt;
+	}
+
+	@Column(name = "CYTCY", precision = 16)
+	public Double getCytcy() {
+		return this.cytcy;
+	}
+
+	public void setCytcy(Double cytcy) {
+		this.cytcy = cytcy;
+	}
+
+	@Column(name = "CSJ", precision = 16)
+	public Double getCsj() {
+		return this.csj;
+	}
+
+	public void setCsj(Double csj) {
+		this.csj = csj;
+	}
+
+	@Column(name = "CTOTAL", precision = 16)
+	public Double getCtotal() {
+		return this.ctotal;
+	}
+
+	public void setCtotal(Double ctotal) {
+		this.ctotal = ctotal;
+	}
+
+	@Column(name = "CSTATE")
+	public Integer getCstate() {
+		return this.cstate;
+	}
+
+	public void setCstate(Integer cstate) {
+		this.cstate = cstate;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CDATE", length = 10)
+	public Date getCdate() {
+		return this.cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	@Column(name = "CCREATEDATE", length = 19)
+	public Timestamp getCcreatedate() {
+		return this.ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	@Column(name = "CMODIFYDATE", length = 19)
+	public Timestamp getCmodifydate() {
+		return this.cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	@Column(name = "CAUDITFILENAME", length = 200)
+	public String getCauditfilename() {
+		return this.cauditfilename;
+	}
+
+	public void setCauditfilename(String cauditfilename) {
+		this.cauditfilename = cauditfilename;
+	}
+
+	@Column(name = "CAUDITFILEPATH", length = 200)
+	public String getCauditfilepath() {
+		return this.cauditfilepath;
+	}
+
+	public void setCauditfilepath(String cauditfilepath) {
+		this.cauditfilepath = cauditfilepath;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbudget")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+}

+ 319 - 0
src/main/java/com/post/model/Tcost.java

@@ -0,0 +1,319 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * Tcost entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tcost", catalog = "cwfx")
+public class Tcost implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tdept tdept;
+	private Tsubject tsubject;
+	private Tbudget tbudget;
+	private Tuser tuser;
+	private Tkind tkind;
+	private Tzrzx tzrzx;
+	private Tshangpin tshangpin;
+	private Tproject tproject;
+	private String cbh;
+	private Date cdate;
+	private String clzfs;
+	private String cshiyou;
+	private Double camount;
+	private Double csj;
+	private String cxz;
+	private String cpzh;
+	private String crzsx;
+	private Integer cprogress;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private Integer ciszd;
+	private String cfx;
+	private Set<Tkmlz> tkmlzs = new HashSet<Tkmlz>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tcost() {
+	}
+
+	/** minimal constructor */
+	public Tcost(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tcost(String cid, Tdept tdept, Tsubject tsubject, Tbudget tbudget, Tuser tuser, Tkind tkind, Tzrzx tzrzx, Tshangpin tshangpin, Tproject tproject, String cbh, Date cdate, String clzfs, String cshiyou, Double camount, Double csj, String cxz, String cpzh, String crzsx, Integer cprogress, Timestamp ccreatedate, Timestamp cmodifydate, Integer ciszd, String cfx, Set<Tkmlz> tkmlzs) {
+		this.cid = cid;
+		this.tdept = tdept;
+		this.tsubject = tsubject;
+		this.tbudget = tbudget;
+		this.tuser = tuser;
+		this.tkind = tkind;
+		this.tzrzx = tzrzx;
+		this.tshangpin = tshangpin;
+		this.tproject = tproject;
+		this.cbh = cbh;
+		this.cdate = cdate;
+		this.clzfs = clzfs;
+		this.cshiyou = cshiyou;
+		this.camount = camount;
+		this.csj = csj;
+		this.cxz = cxz;
+		this.cpzh = cpzh;
+		this.crzsx = crzsx;
+		this.cprogress = cprogress;
+		this.ccreatedate = ccreatedate;
+		this.cmodifydate = cmodifydate;
+		this.ciszd = ciszd;
+		this.cfx = cfx;
+		this.tkmlzs = tkmlzs;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CDEPTMENT")
+	public Tdept getTdept() {
+		return this.tdept;
+	}
+
+	public void setTdept(Tdept tdept) {
+		this.tdept = tdept;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CKJKM")
+	public Tsubject getTsubject() {
+		return this.tsubject;
+	}
+
+	public void setTsubject(Tsubject tsubject) {
+		this.tsubject = tsubject;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CGSYS")
+	public Tbudget getTbudget() {
+		return this.tbudget;
+	}
+
+	public void setTbudget(Tbudget tbudget) {
+		this.tbudget = tbudget;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CUSERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CGUILEI")
+	public Tkind getTkind() {
+		return this.tkind;
+	}
+
+	public void setTkind(Tkind tkind) {
+		this.tkind = tkind;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CZRZX")
+	public Tzrzx getTzrzx() {
+		return this.tzrzx;
+	}
+
+	public void setTzrzx(Tzrzx tzrzx) {
+		this.tzrzx = tzrzx;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CSHANGPIN")
+	public Tshangpin getTshangpin() {
+		return this.tshangpin;
+	}
+
+	public void setTshangpin(Tshangpin tshangpin) {
+		this.tshangpin = tshangpin;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CPROJECT")
+	public Tproject getTproject() {
+		return this.tproject;
+	}
+
+	public void setTproject(Tproject tproject) {
+		this.tproject = tproject;
+	}
+
+	@Column(name = "CBH", length = 20)
+	public String getCbh() {
+		return this.cbh;
+	}
+
+	public void setCbh(String cbh) {
+		this.cbh = cbh;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CDATE", length = 10)
+	public Date getCdate() {
+		return this.cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	@Column(name = "CLZFS", length = 20)
+	public String getClzfs() {
+		return this.clzfs;
+	}
+
+	public void setClzfs(String clzfs) {
+		this.clzfs = clzfs;
+	}
+
+	@Column(name = "CSHIYOU", length = 65535)
+	public String getCshiyou() {
+		return this.cshiyou;
+	}
+
+	public void setCshiyou(String cshiyou) {
+		this.cshiyou = cshiyou;
+	}
+
+	@Column(name = "CAMOUNT", precision = 10)
+	public Double getCamount() {
+		return this.camount;
+	}
+
+	public void setCamount(Double camount) {
+		this.camount = camount;
+	}
+
+	@Column(name = "CSJ", precision = 10)
+	public Double getCsj() {
+		return this.csj;
+	}
+
+	public void setCsj(Double csj) {
+		this.csj = csj;
+	}
+
+	@Column(name = "CXZ", length = 8)
+	public String getCxz() {
+		return this.cxz;
+	}
+
+	public void setCxz(String cxz) {
+		this.cxz = cxz;
+	}
+
+	@Column(name = "CPZH", length = 30)
+	public String getCpzh() {
+		return this.cpzh;
+	}
+
+	public void setCpzh(String cpzh) {
+		this.cpzh = cpzh;
+	}
+
+	@Column(name = "CRZSX", length = 4)
+	public String getCrzsx() {
+		return this.crzsx;
+	}
+
+	public void setCrzsx(String crzsx) {
+		this.crzsx = crzsx;
+	}
+
+	@Column(name = "CPROGRESS")
+	public Integer getCprogress() {
+		return this.cprogress;
+	}
+
+	public void setCprogress(Integer cprogress) {
+		this.cprogress = cprogress;
+	}
+
+	@Column(name = "CCREATEDATE", length = 19)
+	public Timestamp getCcreatedate() {
+		return this.ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	@Column(name = "CMODIFYDATE", length = 19)
+	public Timestamp getCmodifydate() {
+		return this.cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	@Column(name = "CISZD")
+	public Integer getCiszd() {
+		return this.ciszd;
+	}
+
+	public void setCiszd(Integer ciszd) {
+		this.ciszd = ciszd;
+	}
+
+	@Column(name = "CFX", length = 10)
+	public String getCfx() {
+		return this.cfx;
+	}
+
+	public void setCfx(String cfx) {
+		this.cfx = cfx;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tcost")
+	public Set<Tkmlz> getTkmlzs() {
+		return this.tkmlzs;
+	}
+
+	public void setTkmlzs(Set<Tkmlz> tkmlzs) {
+		this.tkmlzs = tkmlzs;
+	}
+
+}

+ 166 - 0
src/main/java/com/post/model/Tdept.java

@@ -0,0 +1,166 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tdept entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tdept", catalog = "cwfx")
+public class Tdept implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tdept tdept;
+	private String cdeptName;
+	private Integer cseq;
+	private Timestamp ccreateDatetime;
+	private Timestamp cmodifyDatetime;
+	private Set<Tdept> tdepts = new HashSet<Tdept>(0);
+	private Set<Tbudget> tbudgets = new HashSet<Tbudget>(0);
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+	private Set<Tuser> tusers = new HashSet<Tuser>(0);
+	private Set<Tfile> tfiles = new HashSet<Tfile>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tdept() {
+	}
+
+	/** minimal constructor */
+	public Tdept(String cid, String cdeptName) {
+		this.cid = cid;
+		this.cdeptName = cdeptName;
+	}
+
+	/** full constructor */
+	public Tdept(String cid, Tdept tdept, String cdeptName, Integer cseq, Timestamp ccreateDatetime, Timestamp cmodifyDatetime, Set<Tdept> tdepts, Set<Tbudget> tbudgets, Set<Tcost> tcosts, Set<Tuser> tusers, Set<Tfile> tfiles) {
+		this.cid = cid;
+		this.tdept = tdept;
+		this.cdeptName = cdeptName;
+		this.cseq = cseq;
+		this.ccreateDatetime = ccreateDatetime;
+		this.cmodifyDatetime = cmodifyDatetime;
+		this.tdepts = tdepts;
+		this.tbudgets = tbudgets;
+		this.tcosts = tcosts;
+		this.tusers = tusers;
+		this.tfiles = tfiles;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "Cid", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "Pid")
+	public Tdept getTdept() {
+		return this.tdept;
+	}
+
+	public void setTdept(Tdept tdept) {
+		this.tdept = tdept;
+	}
+
+	@Column(name = "CdeptName", nullable = false, length = 40)
+	public String getCdeptName() {
+		return this.cdeptName;
+	}
+
+	public void setCdeptName(String cdeptName) {
+		this.cdeptName = cdeptName;
+	}
+
+	@Column(name = "Cseq")
+	public Integer getCseq() {
+		return this.cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	@Column(name = "CcreateDatetime", length = 19)
+	public Timestamp getCcreateDatetime() {
+		return this.ccreateDatetime;
+	}
+
+	public void setCcreateDatetime(Timestamp ccreateDatetime) {
+		this.ccreateDatetime = ccreateDatetime;
+	}
+
+	@Column(name = "CmodifyDatetime", length = 19)
+	public Timestamp getCmodifyDatetime() {
+		return this.cmodifyDatetime;
+	}
+
+	public void setCmodifyDatetime(Timestamp cmodifyDatetime) {
+		this.cmodifyDatetime = cmodifyDatetime;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
+	public Set<Tdept> getTdepts() {
+		return this.tdepts;
+	}
+
+	public void setTdepts(Set<Tdept> tdepts) {
+		this.tdepts = tdepts;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
+	public Set<Tbudget> getTbudgets() {
+		return this.tbudgets;
+	}
+
+	public void setTbudgets(Set<Tbudget> tbudgets) {
+		this.tbudgets = tbudgets;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
+	public Set<Tuser> getTusers() {
+		return this.tusers;
+	}
+
+	public void setTusers(Set<Tuser> tusers) {
+		this.tusers = tusers;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
+	public Set<Tfile> getTfiles() {
+		return this.tfiles;
+	}
+
+	public void setTfiles(Set<Tfile> tfiles) {
+		this.tfiles = tfiles;
+	}
+
+}

+ 106 - 0
src/main/java/com/post/model/Tdownload.java

@@ -0,0 +1,106 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * Tdownload entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tdownload", catalog = "cwfx")
+public class Tdownload implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tuser tuser;
+	private String cfilename;
+	private String cfilepath;
+	private Timestamp cuploaddate;
+	private Integer ccount;
+
+	// Constructors
+
+	/** default constructor */
+	public Tdownload() {
+	}
+
+	/** minimal constructor */
+	public Tdownload(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tdownload(String cid, Tuser tuser, String cfilename, String cfilepath, Timestamp cuploaddate, Integer ccount) {
+		this.cid = cid;
+		this.tuser = tuser;
+		this.cfilename = cfilename;
+		this.cfilepath = cfilepath;
+		this.cuploaddate = cuploaddate;
+		this.ccount = ccount;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CUSERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+	@Column(name = "CFILENAME", length = 200)
+	public String getCfilename() {
+		return this.cfilename;
+	}
+
+	public void setCfilename(String cfilename) {
+		this.cfilename = cfilename;
+	}
+
+	@Column(name = "CFILEPATH", length = 250)
+	public String getCfilepath() {
+		return this.cfilepath;
+	}
+
+	public void setCfilepath(String cfilepath) {
+		this.cfilepath = cfilepath;
+	}
+
+	@Column(name = "CUPLOADDATE", length = 19)
+	public Timestamp getCuploaddate() {
+		return this.cuploaddate;
+	}
+
+	public void setCuploaddate(Timestamp cuploaddate) {
+		this.cuploaddate = cuploaddate;
+	}
+
+	@Column(name = "CCOUNT")
+	public Integer getCcount() {
+		return this.ccount;
+	}
+
+	public void setCcount(Integer ccount) {
+		this.ccount = ccount;
+	}
+
+}

+ 182 - 0
src/main/java/com/post/model/Tfile.java

@@ -0,0 +1,182 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * Tfile entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tfile", catalog = "cwfx")
+public class Tfile implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tdept tdept;
+	private String cfilenumber;
+	private String cname;
+	private Timestamp ccreatedate;
+	private Date cdate;
+	private Timestamp cmodifydate;
+	private Date cstartdate;
+	private Date cenddate;
+	private Integer cpass;
+	private String cfilepath;
+	private Set<Tbudget> tbudgets = new HashSet<Tbudget>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tfile() {
+	}
+
+	/** minimal constructor */
+	public Tfile(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tfile(String cid, Tdept tdept, String cfilenumber, String cname, Timestamp ccreatedate, Date cdate, Timestamp cmodifydate, Date cstartdate, Date cenddate, Integer cpass, String cfilepath, Set<Tbudget> tbudgets) {
+		this.cid = cid;
+		this.tdept = tdept;
+		this.cfilenumber = cfilenumber;
+		this.cname = cname;
+		this.ccreatedate = ccreatedate;
+		this.cdate = cdate;
+		this.cmodifydate = cmodifydate;
+		this.cstartdate = cstartdate;
+		this.cenddate = cenddate;
+		this.cpass = cpass;
+		this.cfilepath = cfilepath;
+		this.tbudgets = tbudgets;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CDEPTID")
+	public Tdept getTdept() {
+		return this.tdept;
+	}
+
+	public void setTdept(Tdept tdept) {
+		this.tdept = tdept;
+	}
+
+	@Column(name = "CFILENUMBER", length = 30)
+	public String getCfilenumber() {
+		return this.cfilenumber;
+	}
+
+	public void setCfilenumber(String cfilenumber) {
+		this.cfilenumber = cfilenumber;
+	}
+
+	@Column(name = "CNAME", length = 60)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@Column(name = "CCREATEDATE", length = 19)
+	public Timestamp getCcreatedate() {
+		return this.ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CDATE", length = 10)
+	public Date getCdate() {
+		return this.cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	@Column(name = "CMODIFYDATE", length = 19)
+	public Timestamp getCmodifydate() {
+		return this.cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CSTARTDATE", length = 10)
+	public Date getCstartdate() {
+		return this.cstartdate;
+	}
+
+	public void setCstartdate(Date cstartdate) {
+		this.cstartdate = cstartdate;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CENDDATE", length = 10)
+	public Date getCenddate() {
+		return this.cenddate;
+	}
+
+	public void setCenddate(Date cenddate) {
+		this.cenddate = cenddate;
+	}
+
+	@Column(name = "CPASS")
+	public Integer getCpass() {
+		return this.cpass;
+	}
+
+	public void setCpass(Integer cpass) {
+		this.cpass = cpass;
+	}
+
+	@Column(name = "CFILEPATH", length = 240)
+	public String getCfilepath() {
+		return this.cfilepath;
+	}
+
+	public void setCfilepath(String cfilepath) {
+		this.cfilepath = cfilepath;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tfile")
+	public Set<Tbudget> getTbudgets() {
+		return this.tbudgets;
+	}
+
+	public void setTbudgets(Set<Tbudget> tbudgets) {
+		this.tbudgets = tbudgets;
+	}
+
+}

+ 109 - 0
src/main/java/com/post/model/Tkind.java

@@ -0,0 +1,109 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tkind entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tkind", catalog = "cwfx")
+public class Tkind implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tkind tkind;
+	private String cname;
+	private Integer cseq;
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+	private Set<Tkind> tkinds = new HashSet<Tkind>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tkind() {
+	}
+
+	/** minimal constructor */
+	public Tkind(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tkind(String cid, Tkind tkind, String cname, Integer cseq, Set<Tcost> tcosts, Set<Tkind> tkinds) {
+		this.cid = cid;
+		this.tkind = tkind;
+		this.cname = cname;
+		this.cseq = cseq;
+		this.tcosts = tcosts;
+		this.tkinds = tkinds;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "PID")
+	public Tkind getTkind() {
+		return this.tkind;
+	}
+
+	public void setTkind(Tkind tkind) {
+		this.tkind = tkind;
+	}
+
+	@Column(name = "CNAME", length = 30)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@Column(name = "CSEQ")
+	public Integer getCseq() {
+		return this.cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
+	public Set<Tkind> getTkinds() {
+		return this.tkinds;
+	}
+
+	public void setTkinds(Set<Tkind> tkinds) {
+		this.tkinds = tkinds;
+	}
+
+}

+ 110 - 0
src/main/java/com/post/model/Tkmlz.java

@@ -0,0 +1,110 @@
+package com.post.model;
+
+import java.util.Date;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * Tkmlz entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tkmlz", catalog = "cwfx")
+public class Tkmlz implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tsubject tsubject;
+	private Tcost tcost;
+	private Double camount;
+	private Date cdate;
+	private String cpzh;
+
+	// Constructors
+
+	/** default constructor */
+	public Tkmlz() {
+	}
+
+	/** minimal constructor */
+	public Tkmlz(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tkmlz(String cid, Tsubject tsubject, Tcost tcost, Double camount, Date cdate, String cpzh) {
+		this.cid = cid;
+		this.tsubject = tsubject;
+		this.tcost = tcost;
+		this.camount = camount;
+		this.cdate = cdate;
+		this.cpzh = cpzh;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CKJKM")
+	public Tsubject getTsubject() {
+		return this.tsubject;
+	}
+
+	public void setTsubject(Tsubject tsubject) {
+		this.tsubject = tsubject;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CCOST")
+	public Tcost getTcost() {
+		return this.tcost;
+	}
+
+	public void setTcost(Tcost tcost) {
+		this.tcost = tcost;
+	}
+
+	@Column(name = "CAMOUNT", precision = 12)
+	public Double getCamount() {
+		return this.camount;
+	}
+
+	public void setCamount(Double camount) {
+		this.camount = camount;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CDATE", length = 10)
+	public Date getCdate() {
+		return this.cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	@Column(name = "CPZH", length = 20)
+	public String getCpzh() {
+		return this.cpzh;
+	}
+
+	public void setCpzh(String cpzh) {
+		this.cpzh = cpzh;
+	}
+
+}

+ 106 - 0
src/main/java/com/post/model/Tlink.java

@@ -0,0 +1,106 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * Tlink entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tlink", catalog = "cwfx")
+public class Tlink implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tuser tuser;
+	private String ctitle;
+	private String curl;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+
+	// Constructors
+
+	/** default constructor */
+	public Tlink() {
+	}
+
+	/** minimal constructor */
+	public Tlink(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tlink(String cid, Tuser tuser, String ctitle, String curl, Timestamp ccreatedate, Timestamp cmodifydate) {
+		this.cid = cid;
+		this.tuser = tuser;
+		this.ctitle = ctitle;
+		this.curl = curl;
+		this.ccreatedate = ccreatedate;
+		this.cmodifydate = cmodifydate;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CUSERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+	@Column(name = "CTITLE", length = 150)
+	public String getCtitle() {
+		return this.ctitle;
+	}
+
+	public void setCtitle(String ctitle) {
+		this.ctitle = ctitle;
+	}
+
+	@Column(name = "CURL", length = 200)
+	public String getCurl() {
+		return this.curl;
+	}
+
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+
+	@Column(name = "CCREATEDATE", length = 19)
+	public Timestamp getCcreatedate() {
+		return this.ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	@Column(name = "CMODIFYDATE", length = 19)
+	public Timestamp getCmodifydate() {
+		return this.cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+}

+ 133 - 0
src/main/java/com/post/model/Tmenu.java

@@ -0,0 +1,133 @@
+package com.post.model;
+
+import java.math.BigDecimal;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tmenu entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tmenu", catalog = "cwfx")
+public class Tmenu implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tmenu tmenu;
+	private String ciconcls;
+	private String cname;
+	private BigDecimal cseq;
+	private String curl;
+	private Set<TroleTmenu> troleTmenus = new HashSet<TroleTmenu>(0);
+	private Set<Tmenu> tmenus = new HashSet<Tmenu>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tmenu() {
+	}
+
+	/** minimal constructor */
+	public Tmenu(String cid, String cname) {
+		this.cid = cid;
+		this.cname = cname;
+	}
+
+	/** full constructor */
+	public Tmenu(String cid, Tmenu tmenu, String ciconcls, String cname, BigDecimal cseq, String curl, Set<TroleTmenu> troleTmenus, Set<Tmenu> tmenus) {
+		this.cid = cid;
+		this.tmenu = tmenu;
+		this.ciconcls = ciconcls;
+		this.cname = cname;
+		this.cseq = cseq;
+		this.curl = curl;
+		this.troleTmenus = troleTmenus;
+		this.tmenus = tmenus;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CPID")
+	public Tmenu getTmenu() {
+		return this.tmenu;
+	}
+
+	public void setTmenu(Tmenu tmenu) {
+		this.tmenu = tmenu;
+	}
+
+	@Column(name = "CICONCLS", length = 100)
+	public String getCiconcls() {
+		return this.ciconcls;
+	}
+
+	public void setCiconcls(String ciconcls) {
+		this.ciconcls = ciconcls;
+	}
+
+	@Column(name = "CNAME", nullable = false, length = 100)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@Column(name = "CSEQ", precision = 22, scale = 0)
+	public BigDecimal getCseq() {
+		return this.cseq;
+	}
+
+	public void setCseq(BigDecimal cseq) {
+		this.cseq = cseq;
+	}
+
+	@Column(name = "CURL", length = 200)
+	public String getCurl() {
+		return this.curl;
+	}
+
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmenu")
+	public Set<TroleTmenu> getTroleTmenus() {
+		return this.troleTmenus;
+	}
+
+	public void setTroleTmenus(Set<TroleTmenu> troleTmenus) {
+		this.troleTmenus = troleTmenus;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmenu")
+	public Set<Tmenu> getTmenus() {
+		return this.tmenus;
+	}
+
+	public void setTmenus(Set<Tmenu> tmenus) {
+		this.tmenus = tmenus;
+	}
+
+}

+ 84 - 0
src/main/java/com/post/model/Tproject.java

@@ -0,0 +1,84 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tproject entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tproject", catalog = "cwfx")
+public class Tproject implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private String cname;
+	private Set<Tbudget> tbudgets = new HashSet<Tbudget>(0);
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tproject() {
+	}
+
+	/** minimal constructor */
+	public Tproject(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tproject(String cid, String cname, Set<Tbudget> tbudgets, Set<Tcost> tcosts) {
+		this.cid = cid;
+		this.cname = cname;
+		this.tbudgets = tbudgets;
+		this.tcosts = tcosts;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@Column(name = "CNAME", length = 100)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tproject")
+	public Set<Tbudget> getTbudgets() {
+		return this.tbudgets;
+	}
+
+	public void setTbudgets(Set<Tbudget> tbudgets) {
+		this.tbudgets = tbudgets;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tproject")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+}

+ 107 - 0
src/main/java/com/post/model/Trole.java

@@ -0,0 +1,107 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Trole entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "trole", catalog = "cwfx")
+public class Trole implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private String cdesc;
+	private String cname;
+	private Set<TroleTauth> troleTauths = new HashSet<TroleTauth>(0);
+	private Set<TroleTmenu> troleTmenus = new HashSet<TroleTmenu>(0);
+	private Set<TuserTrole> tuserTroles = new HashSet<TuserTrole>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Trole() {
+	}
+
+	/** minimal constructor */
+	public Trole(String cid, String cname) {
+		this.cid = cid;
+		this.cname = cname;
+	}
+
+	/** full constructor */
+	public Trole(String cid, String cdesc, String cname, Set<TroleTauth> troleTauths, Set<TroleTmenu> troleTmenus, Set<TuserTrole> tuserTroles) {
+		this.cid = cid;
+		this.cdesc = cdesc;
+		this.cname = cname;
+		this.troleTauths = troleTauths;
+		this.troleTmenus = troleTmenus;
+		this.tuserTroles = tuserTroles;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@Column(name = "CDESC", length = 200)
+	public String getCdesc() {
+		return this.cdesc;
+	}
+
+	public void setCdesc(String cdesc) {
+		this.cdesc = cdesc;
+	}
+
+	@Column(name = "CNAME", nullable = false, length = 100)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "trole")
+	public Set<TroleTauth> getTroleTauths() {
+		return this.troleTauths;
+	}
+
+	public void setTroleTauths(Set<TroleTauth> troleTauths) {
+		this.troleTauths = troleTauths;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "trole")
+	public Set<TroleTmenu> getTroleTmenus() {
+		return this.troleTmenus;
+	}
+
+	public void setTroleTmenus(Set<TroleTmenu> troleTmenus) {
+		this.troleTmenus = troleTmenus;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "trole")
+	public Set<TuserTrole> getTuserTroles() {
+		return this.tuserTroles;
+	}
+
+	public void setTuserTroles(Set<TuserTrole> tuserTroles) {
+		this.tuserTroles = tuserTroles;
+	}
+
+}

+ 73 - 0
src/main/java/com/post/model/TroleTauth.java

@@ -0,0 +1,73 @@
+package com.post.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * TroleTauth entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "trole_tauth", catalog = "cwfx")
+public class TroleTauth implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tauth tauth;
+	private Trole trole;
+
+	// Constructors
+
+	/** default constructor */
+	public TroleTauth() {
+	}
+
+	/** minimal constructor */
+	public TroleTauth(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public TroleTauth(String cid, Tauth tauth, Trole trole) {
+		this.cid = cid;
+		this.tauth = tauth;
+		this.trole = trole;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CAUTHID")
+	public Tauth getTauth() {
+		return this.tauth;
+	}
+
+	public void setTauth(Tauth tauth) {
+		this.tauth = tauth;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CROLEID")
+	public Trole getTrole() {
+		return this.trole;
+	}
+
+	public void setTrole(Trole trole) {
+		this.trole = trole;
+	}
+
+}

+ 73 - 0
src/main/java/com/post/model/TroleTmenu.java

@@ -0,0 +1,73 @@
+package com.post.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * TroleTmenu entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "trole_tmenu", catalog = "cwfx")
+public class TroleTmenu implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tmenu tmenu;
+	private Trole trole;
+
+	// Constructors
+
+	/** default constructor */
+	public TroleTmenu() {
+	}
+
+	/** minimal constructor */
+	public TroleTmenu(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public TroleTmenu(String cid, Tmenu tmenu, Trole trole) {
+		this.cid = cid;
+		this.tmenu = tmenu;
+		this.trole = trole;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CMENUID")
+	public Tmenu getTmenu() {
+		return this.tmenu;
+	}
+
+	public void setTmenu(Tmenu tmenu) {
+		this.tmenu = tmenu;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CROLEID")
+	public Trole getTrole() {
+		return this.trole;
+	}
+
+	public void setTrole(Trole trole) {
+		this.trole = trole;
+	}
+
+}

+ 73 - 0
src/main/java/com/post/model/Tshangpin.java

@@ -0,0 +1,73 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tshangpin entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tshangpin", catalog = "cwfx")
+public class Tshangpin implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private String cname;
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tshangpin() {
+	}
+
+	/** minimal constructor */
+	public Tshangpin(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tshangpin(String cid, String cname, Set<Tcost> tcosts) {
+		this.cid = cid;
+		this.cname = cname;
+		this.tcosts = tcosts;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@Column(name = "CNAME", length = 50)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tshangpin")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+}

+ 120 - 0
src/main/java/com/post/model/Tsubject.java

@@ -0,0 +1,120 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tsubject entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tsubject", catalog = "cwfx")
+public class Tsubject implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tsubject tsubject;
+	private String cname;
+	private Integer cseq;
+	private Set<Tkmlz> tkmlzs = new HashSet<Tkmlz>(0);
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+	private Set<Tsubject> tsubjects = new HashSet<Tsubject>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tsubject() {
+	}
+
+	/** minimal constructor */
+	public Tsubject(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tsubject(String cid, Tsubject tsubject, String cname, Integer cseq, Set<Tkmlz> tkmlzs, Set<Tcost> tcosts, Set<Tsubject> tsubjects) {
+		this.cid = cid;
+		this.tsubject = tsubject;
+		this.cname = cname;
+		this.cseq = cseq;
+		this.tkmlzs = tkmlzs;
+		this.tcosts = tcosts;
+		this.tsubjects = tsubjects;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CPID")
+	public Tsubject getTsubject() {
+		return this.tsubject;
+	}
+
+	public void setTsubject(Tsubject tsubject) {
+		this.tsubject = tsubject;
+	}
+
+	@Column(name = "CNAME", length = 50)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@Column(name = "CSEQ")
+	public Integer getCseq() {
+		return this.cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tsubject")
+	public Set<Tkmlz> getTkmlzs() {
+		return this.tkmlzs;
+	}
+
+	public void setTkmlzs(Set<Tkmlz> tkmlzs) {
+		this.tkmlzs = tkmlzs;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tsubject")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tsubject")
+	public Set<Tsubject> getTsubjects() {
+		return this.tsubjects;
+	}
+
+	public void setTsubjects(Set<Tsubject> tsubjects) {
+		this.tsubjects = tsubjects;
+	}
+
+}

+ 202 - 0
src/main/java/com/post/model/Tuser.java

@@ -0,0 +1,202 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+
+/**
+ * Tuser entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tuser", catalog = "cwfx", uniqueConstraints = @UniqueConstraint(columnNames = "CUSERNAME"))
+public class Tuser implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Tdept tdept;
+	private Timestamp ccreatedatetime;
+	private Timestamp cmodifydatetime;
+	private String cusername;
+	private String cpassword;
+	private Integer crole;
+	private Timestamp clastlogin;
+	private Set<Tlink> tlinks = new HashSet<Tlink>(0);
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+	private Set<Tdownload> tdownloads = new HashSet<Tdownload>(0);
+	private Set<TuserTrole> tuserTroles = new HashSet<TuserTrole>(0);
+	private Set<Tannounce> tannounces = new HashSet<Tannounce>(0);
+	private Set<Tbudget> tbudgets = new HashSet<Tbudget>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tuser() {
+	}
+
+	/** minimal constructor */
+	public Tuser(String cid, Tdept tdept, String cusername, String cpassword) {
+		this.cid = cid;
+		this.tdept = tdept;
+		this.cusername = cusername;
+		this.cpassword = cpassword;
+	}
+
+	/** full constructor */
+	public Tuser(String cid, Tdept tdept, Timestamp ccreatedatetime, Timestamp cmodifydatetime, String cusername, String cpassword, Integer crole, Timestamp clastlogin, Set<Tlink> tlinks, Set<Tcost> tcosts, Set<Tdownload> tdownloads, Set<TuserTrole> tuserTroles, Set<Tannounce> tannounces, Set<Tbudget> tbudgets) {
+		this.cid = cid;
+		this.tdept = tdept;
+		this.ccreatedatetime = ccreatedatetime;
+		this.cmodifydatetime = cmodifydatetime;
+		this.cusername = cusername;
+		this.cpassword = cpassword;
+		this.crole = crole;
+		this.clastlogin = clastlogin;
+		this.tlinks = tlinks;
+		this.tcosts = tcosts;
+		this.tdownloads = tdownloads;
+		this.tuserTroles = tuserTroles;
+		this.tannounces = tannounces;
+		this.tbudgets = tbudgets;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CDEPARTMENT", nullable = false)
+	public Tdept getTdept() {
+		return this.tdept;
+	}
+
+	public void setTdept(Tdept tdept) {
+		this.tdept = tdept;
+	}
+
+	@Column(name = "CCREATEDATETIME", length = 19)
+	public Timestamp getCcreatedatetime() {
+		return this.ccreatedatetime;
+	}
+
+	public void setCcreatedatetime(Timestamp ccreatedatetime) {
+		this.ccreatedatetime = ccreatedatetime;
+	}
+
+	@Column(name = "CMODIFYDATETIME", length = 19)
+	public Timestamp getCmodifydatetime() {
+		return this.cmodifydatetime;
+	}
+
+	public void setCmodifydatetime(Timestamp cmodifydatetime) {
+		this.cmodifydatetime = cmodifydatetime;
+	}
+
+	@Column(name = "CUSERNAME", unique = true, nullable = false, length = 36)
+	public String getCusername() {
+		return this.cusername;
+	}
+
+	public void setCusername(String cusername) {
+		this.cusername = cusername;
+	}
+
+	@Column(name = "CPASSWORD", nullable = false, length = 40)
+	public String getCpassword() {
+		return this.cpassword;
+	}
+
+	public void setCpassword(String cpassword) {
+		this.cpassword = cpassword;
+	}
+
+	@Column(name = "CROLE")
+	public Integer getCrole() {
+		return this.crole;
+	}
+
+	public void setCrole(Integer crole) {
+		this.crole = crole;
+	}
+
+	@Column(name = "CLASTLOGIN", length = 19)
+	public Timestamp getClastlogin() {
+		return this.clastlogin;
+	}
+
+	public void setClastlogin(Timestamp clastlogin) {
+		this.clastlogin = clastlogin;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<Tlink> getTlinks() {
+		return this.tlinks;
+	}
+
+	public void setTlinks(Set<Tlink> tlinks) {
+		this.tlinks = tlinks;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<Tdownload> getTdownloads() {
+		return this.tdownloads;
+	}
+
+	public void setTdownloads(Set<Tdownload> tdownloads) {
+		this.tdownloads = tdownloads;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<TuserTrole> getTuserTroles() {
+		return this.tuserTroles;
+	}
+
+	public void setTuserTroles(Set<TuserTrole> tuserTroles) {
+		this.tuserTroles = tuserTroles;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<Tannounce> getTannounces() {
+		return this.tannounces;
+	}
+
+	public void setTannounces(Set<Tannounce> tannounces) {
+		this.tannounces = tannounces;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tuser")
+	public Set<Tbudget> getTbudgets() {
+		return this.tbudgets;
+	}
+
+	public void setTbudgets(Set<Tbudget> tbudgets) {
+		this.tbudgets = tbudgets;
+	}
+
+}

+ 73 - 0
src/main/java/com/post/model/TuserTrole.java

@@ -0,0 +1,73 @@
+package com.post.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * TuserTrole entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tuser_trole", catalog = "cwfx")
+public class TuserTrole implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Trole trole;
+	private Tuser tuser;
+
+	// Constructors
+
+	/** default constructor */
+	public TuserTrole() {
+	}
+
+	/** minimal constructor */
+	public TuserTrole(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public TuserTrole(String cid, Trole trole, Tuser tuser) {
+		this.cid = cid;
+		this.trole = trole;
+		this.tuser = tuser;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CROLEID")
+	public Trole getTrole() {
+		return this.trole;
+	}
+
+	public void setTrole(Trole trole) {
+		this.trole = trole;
+	}
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "CUSERID")
+	public Tuser getTuser() {
+		return this.tuser;
+	}
+
+	public void setTuser(Tuser tuser) {
+		this.tuser = tuser;
+	}
+
+}

+ 206 - 0
src/main/java/com/post/model/Tzdywys.java

@@ -0,0 +1,206 @@
+package com.post.model;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * Tzdywys entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tzdywys", catalog = "cwfx")
+public class Tzdywys implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private Date cmakedate;
+	private String cfilenumber;
+	private String cfilename;
+	private String ccontent;
+	private String ccycle;
+	private String czhuanye;
+	private String cproject;
+	private Double cywls;
+	private Double ccost;
+	private Double cprofit;
+	private Date cplandate;
+	private Timestamp ccreatedatetime;
+	private Timestamp cmodifydatetime;
+	private String ccreateuser;
+
+	// Constructors
+
+	/** default constructor */
+	public Tzdywys() {
+	}
+
+	/** minimal constructor */
+	public Tzdywys(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tzdywys(String cid, Date cmakedate, String cfilenumber, String cfilename, String ccontent, String ccycle, String czhuanye, String cproject, Double cywls, Double ccost, Double cprofit, Date cplandate, Timestamp ccreatedatetime, Timestamp cmodifydatetime, String ccreateuser) {
+		this.cid = cid;
+		this.cmakedate = cmakedate;
+		this.cfilenumber = cfilenumber;
+		this.cfilename = cfilename;
+		this.ccontent = ccontent;
+		this.ccycle = ccycle;
+		this.czhuanye = czhuanye;
+		this.cproject = cproject;
+		this.cywls = cywls;
+		this.ccost = ccost;
+		this.cprofit = cprofit;
+		this.cplandate = cplandate;
+		this.ccreatedatetime = ccreatedatetime;
+		this.cmodifydatetime = cmodifydatetime;
+		this.ccreateuser = ccreateuser;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CMAKEDATE", length = 10)
+	public Date getCmakedate() {
+		return this.cmakedate;
+	}
+
+	public void setCmakedate(Date cmakedate) {
+		this.cmakedate = cmakedate;
+	}
+
+	@Column(name = "CFILENUMBER", length = 30)
+	public String getCfilenumber() {
+		return this.cfilenumber;
+	}
+
+	public void setCfilenumber(String cfilenumber) {
+		this.cfilenumber = cfilenumber;
+	}
+
+	@Column(name = "CFILENAME", length = 100)
+	public String getCfilename() {
+		return this.cfilename;
+	}
+
+	public void setCfilename(String cfilename) {
+		this.cfilename = cfilename;
+	}
+
+	@Column(name = "CCONTENT", length = 65535)
+	public String getCcontent() {
+		return this.ccontent;
+	}
+
+	public void setCcontent(String ccontent) {
+		this.ccontent = ccontent;
+	}
+
+	@Column(name = "CCYCLE", length = 16)
+	public String getCcycle() {
+		return this.ccycle;
+	}
+
+	public void setCcycle(String ccycle) {
+		this.ccycle = ccycle;
+	}
+
+	@Column(name = "CZHUANYE", length = 36)
+	public String getCzhuanye() {
+		return this.czhuanye;
+	}
+
+	public void setCzhuanye(String czhuanye) {
+		this.czhuanye = czhuanye;
+	}
+
+	@Column(name = "CPROJECT", length = 36)
+	public String getCproject() {
+		return this.cproject;
+	}
+
+	public void setCproject(String cproject) {
+		this.cproject = cproject;
+	}
+
+	@Column(name = "CYWLS", precision = 10)
+	public Double getCywls() {
+		return this.cywls;
+	}
+
+	public void setCywls(Double cywls) {
+		this.cywls = cywls;
+	}
+
+	@Column(name = "CCOST", precision = 10)
+	public Double getCcost() {
+		return this.ccost;
+	}
+
+	public void setCcost(Double ccost) {
+		this.ccost = ccost;
+	}
+
+	@Column(name = "CPROFIT", precision = 10)
+	public Double getCprofit() {
+		return this.cprofit;
+	}
+
+	public void setCprofit(Double cprofit) {
+		this.cprofit = cprofit;
+	}
+
+	@Temporal(TemporalType.DATE)
+	@Column(name = "CPLANDATE", length = 10)
+	public Date getCplandate() {
+		return this.cplandate;
+	}
+
+	public void setCplandate(Date cplandate) {
+		this.cplandate = cplandate;
+	}
+
+	@Column(name = "CCREATEDATETIME", length = 19)
+	public Timestamp getCcreatedatetime() {
+		return this.ccreatedatetime;
+	}
+
+	public void setCcreatedatetime(Timestamp ccreatedatetime) {
+		this.ccreatedatetime = ccreatedatetime;
+	}
+
+	@Column(name = "CMODIFYDATETIME", length = 19)
+	public Timestamp getCmodifydatetime() {
+		return this.cmodifydatetime;
+	}
+
+	public void setCmodifydatetime(Timestamp cmodifydatetime) {
+		this.cmodifydatetime = cmodifydatetime;
+	}
+
+	@Column(name = "CCREATEUSER", length = 36)
+	public String getCcreateuser() {
+		return this.ccreateuser;
+	}
+
+	public void setCcreateuser(String ccreateuser) {
+		this.ccreateuser = ccreateuser;
+	}
+
+}

+ 84 - 0
src/main/java/com/post/model/Tzrzx.java

@@ -0,0 +1,84 @@
+package com.post.model;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * Tzrzx entity. @author MyEclipse Persistence Tools
+ */
+@Entity
+@Table(name = "tzrzx", catalog = "cwfx")
+public class Tzrzx implements java.io.Serializable {
+
+	// Fields
+
+	private String cid;
+	private String cname;
+	private Set<Tbudget> tbudgets = new HashSet<Tbudget>(0);
+	private Set<Tcost> tcosts = new HashSet<Tcost>(0);
+
+	// Constructors
+
+	/** default constructor */
+	public Tzrzx() {
+	}
+
+	/** minimal constructor */
+	public Tzrzx(String cid) {
+		this.cid = cid;
+	}
+
+	/** full constructor */
+	public Tzrzx(String cid, String cname, Set<Tbudget> tbudgets, Set<Tcost> tcosts) {
+		this.cid = cid;
+		this.cname = cname;
+		this.tbudgets = tbudgets;
+		this.tcosts = tcosts;
+	}
+
+	// Property accessors
+	@Id
+	@Column(name = "CID", unique = true, nullable = false, length = 36)
+	public String getCid() {
+		return this.cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	@Column(name = "CNAME", length = 36)
+	public String getCname() {
+		return this.cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tzrzx")
+	public Set<Tbudget> getTbudgets() {
+		return this.tbudgets;
+	}
+
+	public void setTbudgets(Set<Tbudget> tbudgets) {
+		this.tbudgets = tbudgets;
+	}
+
+	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tzrzx")
+	public Set<Tcost> getTcosts() {
+		return this.tcosts;
+	}
+
+	public void setTcosts(Set<Tcost> tcosts) {
+		this.tcosts = tcosts;
+	}
+
+}

+ 53 - 0
src/main/java/com/post/pageModel/Analysis.java

@@ -0,0 +1,53 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.List;
+
+public class Analysis implements Serializable {
+
+	private String cid;
+	private String deptName;
+	private String fileNumber;
+	private Double counter;
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getDeptName() {
+		return deptName;
+	}
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+	public String getFileNumber() {
+		return fileNumber;
+	}
+	public void setFileNumber(String fileNumber) {
+		this.fileNumber = fileNumber;
+	}
+	public Double getCounter() {
+		return counter;
+	}
+	public void setCounter(Double counter) {
+		this.counter = counter;
+	}
+	public Analysis(String cid, String deptName, String fileNumber,
+			Double counter) {
+		super();
+		this.cid = cid;
+		this.deptName = deptName;
+		this.fileNumber = fileNumber;
+		this.counter = counter;
+	}
+	
+	public Analysis() {
+		super();
+	}
+	
+	
+	
+}

+ 96 - 0
src/main/java/com/post/pageModel/Announce.java

@@ -0,0 +1,96 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+import com.post.model.Tuser;
+
+public class Announce implements Serializable {
+
+	private String cid;
+	private String userId;
+	private String userName;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private String ctitle;
+	private String ccontent;
+	private String ids;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getUserId() {
+		return userId;
+	}
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public Timestamp getCcreatedate() {
+		return ccreatedate;
+	}
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+	public Timestamp getCmodifydate() {
+		return cmodifydate;
+	}
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+	public String getCtitle() {
+		return ctitle;
+	}
+	public void setCtitle(String ctitle) {
+		this.ctitle = ctitle;
+	}
+	public String getCcontent() {
+		return ccontent;
+	}
+	public void setCcontent(String ccontent) {
+		this.ccontent = ccontent;
+	}
+	public String getIds() {
+		return ids;
+	}
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+	public int getPage() {
+		return page;
+	}
+	public void setPage(int page) {
+		this.page = page;
+	}
+	public int getRows() {
+		return rows;
+	}
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+	public String getSort() {
+		return sort;
+	}
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+	public String getOrder() {
+		return order;
+	}
+	public void setOrder(String order) {
+		this.order = order;
+	}
+	
+	
+}

+ 119 - 0
src/main/java/com/post/pageModel/Auth.java

@@ -0,0 +1,119 @@
+package com.post.pageModel;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.post.model.Tauth;
+
+public class Auth implements java.io.Serializable {
+	
+	private String cid;
+	private Tauth tauth;
+	private String cdesc;
+	private String cname;
+	private BigDecimal cseq;
+	private String curl;
+	private String id;
+	private String pid;
+	private String pname;
+	private String state = "open";
+	private List<Auth> children;
+	public String getText() {
+		return text;
+	}
+
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	private String text;
+
+	public List<Auth> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Auth> children) {
+		this.children = children;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public Tauth getTauth() {
+		return tauth;
+	}
+
+	public void setTauth(Tauth tauth) {
+		this.tauth = tauth;
+	}
+
+	public String getCdesc() {
+		return cdesc;
+	}
+
+	public void setCdesc(String cdesc) {
+		this.cdesc = cdesc;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public BigDecimal getCseq() {
+		return cseq;
+	}
+
+	public void setCseq(BigDecimal cseq) {
+		this.cseq = cseq;
+	}
+
+	public String getCurl() {
+		return curl;
+	}
+
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getPname() {
+		return pname;
+	}
+
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+}

+ 376 - 0
src/main/java/com/post/pageModel/Budget.java

@@ -0,0 +1,376 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+
+public class Budget implements Serializable {
+
+	private String cid;
+	private String ids;
+	private Double cyjywls;
+	private Double cyjfy;
+	private Double cyjlr;
+	private Date cyjqssj;
+	private Date csjqssj;
+	private Double csjfy;
+	private Double cfycy;
+	private Double cyt;
+	private Double cytcy;
+	private Double csj;
+	private Double ctotal;
+	private Integer cstate;
+	private Date cdate;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	private String deptId;
+	private String deptName;
+	private String userId;
+	private String userName;
+	private String zrzxId;
+	private String zrzxName;
+	private String projectId;
+	private String projectName;
+	private String fileId;
+	private String fileName;
+	private String fileNumber;
+	private String filePath;
+	private Date fileDate;
+	private Date startdate;
+	private Date enddate;
+	private Date createStartDate;
+	private Date createEndDate;
+	private String cauditfilename;
+	private String cauditfilepath;
+	
+	
+	
+	
+	
+	
+
+	public String getCauditfilename() {
+		return cauditfilename;
+	}
+
+	public void setCauditfilename(String cauditfilename) {
+		this.cauditfilename = cauditfilename;
+	}
+
+	public String getCauditfilepath() {
+		return cauditfilepath;
+	}
+
+	public void setCauditfilepath(String cauditfilepath) {
+		this.cauditfilepath = cauditfilepath;
+	}
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+
+	public Date getFileDate() {
+		return fileDate;
+	}
+
+	public void setFileDate(Date fileDate) {
+		this.fileDate = fileDate;
+	}
+
+	public Date getCreateStartDate() {
+		return createStartDate;
+	}
+
+	public void setCreateStartDate(Date createStartDate) {
+		this.createStartDate = createStartDate;
+	}
+
+	public Date getCreateEndDate() {
+		return createEndDate;
+	}
+
+	public void setCreateEndDate(Date createEndDate) {
+		this.createEndDate = createEndDate;
+	}
+
+	public Date getStartdate() {
+		return startdate;
+	}
+
+	public void setStartdate(Date startdate) {
+		this.startdate = startdate;
+	}
+
+	public Date getEnddate() {
+		return enddate;
+	}
+
+	public void setEnddate(Date enddate) {
+		this.enddate = enddate;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public Double getCyjywls() {
+		return cyjywls;
+	}
+
+	public void setCyjywls(Double cyjywls) {
+		this.cyjywls = cyjywls;
+	}
+
+	public Double getCyjfy() {
+		return cyjfy;
+	}
+
+	public void setCyjfy(Double cyjfy) {
+		this.cyjfy = cyjfy;
+	}
+
+	public Double getCyjlr() {
+		return cyjlr;
+	}
+
+	public void setCyjlr(Double cyjlr) {
+		this.cyjlr = cyjlr;
+	}
+
+	public Date getCyjqssj() {
+		return cyjqssj;
+	}
+
+	public void setCyjqssj(Date cyjqssj) {
+		this.cyjqssj = cyjqssj;
+	}
+
+	public Date getCsjqssj() {
+		return csjqssj;
+	}
+
+	public void setCsjqssj(Date csjqssj) {
+		this.csjqssj = csjqssj;
+	}
+
+	public Double getCsjfy() {
+		return csjfy;
+	}
+
+	public void setCsjfy(Double csjfy) {
+		this.csjfy = csjfy;
+	}
+
+	public Double getCfycy() {
+		return cfycy;
+	}
+
+	public void setCfycy(Double cfycy) {
+		this.cfycy = cfycy;
+	}
+
+	public Double getCyt() {
+		return cyt;
+	}
+
+	public void setCyt(Double cyt) {
+		this.cyt = cyt;
+	}
+
+	public Double getCytcy() {
+		return cytcy;
+	}
+
+	public void setCytcy(Double cytcy) {
+		this.cytcy = cytcy;
+	}
+
+	public Double getCsj() {
+		return csj;
+	}
+
+	public void setCsj(Double csj) {
+		this.csj = csj;
+	}
+
+	public Double getCtotal() {
+		return ctotal;
+	}
+
+	public void setCtotal(Double ctotal) {
+		this.ctotal = ctotal;
+	}
+
+	public Integer getCstate() {
+		return cstate;
+	}
+
+	public void setCstate(Integer cstate) {
+		this.cstate = cstate;
+	}
+
+	public Date getCdate() {
+		return cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	public Timestamp getCcreatedate() {
+		return ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	public Timestamp getCmodifydate() {
+		return cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getDeptId() {
+		return deptId;
+	}
+
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+
+	public String getDeptName() {
+		return deptName;
+	}
+
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+
+	public String getUserId() {
+		return userId;
+	}
+
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	public String getZrzxId() {
+		return zrzxId;
+	}
+
+	public void setZrzxId(String zrzxId) {
+		this.zrzxId = zrzxId;
+	}
+
+	public String getZrzxName() {
+		return zrzxName;
+	}
+
+	public void setZrzxName(String zrzxName) {
+		this.zrzxName = zrzxName;
+	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+	public String getFileNumber() {
+		return fileNumber;
+	}
+
+	public void setFileNumber(String fileNumber) {
+		this.fileNumber = fileNumber;
+	}
+
+}

+ 411 - 0
src/main/java/com/post/pageModel/Cost.java

@@ -0,0 +1,411 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+
+public class Cost implements Serializable {
+
+	private String cid;
+	private String ids;
+	private String cbh;
+	private String clzfs;
+	private String cshiyou;
+	private Double camount;
+	private Double csj;
+	private String cxz;
+	private String crzsx;
+	private String cpzh;
+	private Date cdate;
+	private int cprogress;
+	private Integer ciszd;
+	private String cfx;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	private String deptId;
+	private String deptName;
+	private String subjectId;
+	private String subjectName;
+	private String userId;
+	private String userName;
+	private String kindId;
+	private String kindName;
+	private String zrzxId;
+	private String zrzxName;
+	private String shangpinId;
+	private String shangpinName;
+	private String projectId;
+	private String projectName;
+	private String budgetId;
+	private String fileId;
+	private String fileName;
+	private String fileNumber;
+	private String filePath;
+	private String cmonth;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private Date startdate;
+	private Date enddate;
+	private Date createStartDate;
+	private Date createEndDate;
+	
+	
+	
+	
+	
+	public String getShangpinId() {
+		return shangpinId;
+	}
+
+	public void setShangpinId(String shangpinId) {
+		this.shangpinId = shangpinId;
+	}
+
+	public String getShangpinName() {
+		return shangpinName;
+	}
+
+	public void setShangpinName(String shangpinName) {
+		this.shangpinName = shangpinName;
+	}
+
+	public String getCmonth() {
+		return cmonth;
+	}
+
+	public void setCmonth(String cmonth) {
+		this.cmonth = cmonth;
+	}
+
+	public String getCbh() {
+		return cbh;
+	}
+
+	public void setCbh(String cbh) {
+		this.cbh = cbh;
+	}
+
+	public String getCfx() {
+		return cfx;
+	}
+
+	public void setCfx(String cfx) {
+		this.cfx = cfx;
+	}
+
+	public Integer getCiszd() {
+		return ciszd;
+	}
+
+	public void setCiszd(Integer ciszd) {
+		this.ciszd = ciszd;
+	}
+
+	public int getCprogress() {
+		return cprogress;
+	}
+
+	public void setCprogress(int cprogress) {
+		this.cprogress = cprogress;
+	}
+
+	public String getCpzh() {
+		return cpzh;
+	}
+
+	public void setCpzh(String cpzh) {
+		this.cpzh = cpzh;
+	}
+
+	public Date getCdate() {
+		return cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	public String getBudgetId() {
+		return budgetId;
+	}
+
+	public void setBudgetId(String budgetId) {
+		this.budgetId = budgetId;
+	}
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+
+	public Double getCsj() {
+		return csj;
+	}
+
+	public void setCsj(Double csj) {
+		this.csj = csj;
+	}
+
+
+	public Date getCreateStartDate() {
+		return createStartDate;
+	}
+
+	public void setCreateStartDate(Date createStartDate) {
+		this.createStartDate = createStartDate;
+	}
+
+	public Date getCreateEndDate() {
+		return createEndDate;
+	}
+
+	public void setCreateEndDate(Date createEndDate) {
+		this.createEndDate = createEndDate;
+	}
+
+	public Date getStartdate() {
+		return startdate;
+	}
+
+	public void setStartdate(Date startdate) {
+		this.startdate = startdate;
+	}
+
+	public Date getEnddate() {
+		return enddate;
+	}
+
+	public void setEnddate(Date enddate) {
+		this.enddate = enddate;
+	}
+
+	public String getFileNumber() {
+		return fileNumber;
+	}
+
+	public void setFileNumber(String fileNumber) {
+		this.fileNumber = fileNumber;
+	}
+
+	public Timestamp getCcreatedate() {
+		return ccreatedate;
+	}
+
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	public Timestamp getCmodifydate() {
+		return cmodifydate;
+	}
+
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public String getClzfs() {
+		return clzfs;
+	}
+
+	public void setClzfs(String clzfs) {
+		this.clzfs = clzfs;
+	}
+
+	public String getCshiyou() {
+		return cshiyou;
+	}
+
+	public void setCshiyou(String cshiyou) {
+		this.cshiyou = cshiyou;
+	}
+
+	public Double getCamount() {
+		return camount;
+	}
+
+	public void setCamount(Double camount) {
+		this.camount = camount;
+	}
+
+	public String getCxz() {
+		return cxz;
+	}
+
+	public void setCxz(String cxz) {
+		this.cxz = cxz;
+	}
+
+	public String getCrzsx() {
+		return crzsx;
+	}
+
+	public void setCrzsx(String crzsx) {
+		this.crzsx = crzsx;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getDeptId() {
+		return deptId;
+	}
+
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+
+	public String getDeptName() {
+		return deptName;
+	}
+
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+
+	public String getSubjectId() {
+		return subjectId;
+	}
+
+	public void setSubjectId(String subjectId) {
+		this.subjectId = subjectId;
+	}
+
+	public String getSubjectName() {
+		return subjectName;
+	}
+
+	public void setSubjectName(String subjectName) {
+		this.subjectName = subjectName;
+	}
+
+	public String getUserId() {
+		return userId;
+	}
+
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	public String getKindId() {
+		return kindId;
+	}
+
+	public void setKindId(String kindId) {
+		this.kindId = kindId;
+	}
+
+	public String getKindName() {
+		return kindName;
+	}
+
+	public void setKindName(String kindName) {
+		this.kindName = kindName;
+	}
+
+	public String getZrzxId() {
+		return zrzxId;
+	}
+
+	public void setZrzxId(String zrzxId) {
+		this.zrzxId = zrzxId;
+	}
+
+	public String getZrzxName() {
+		return zrzxName;
+	}
+
+	public void setZrzxName(String zrzxName) {
+		this.zrzxName = zrzxName;
+	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+}

+ 69 - 0
src/main/java/com/post/pageModel/CostPrint.java

@@ -0,0 +1,69 @@
+package com.post.pageModel;
+
+import java.util.List;
+
+public class CostPrint implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private List<Cost> rows;
+	private int total;
+	private Double amount;
+	private String deptName;
+	private String lzfs;
+	private String upperNumber;
+	private String dzbh;
+	
+	
+	
+	
+	
+	
+	
+	public String getDzbh() {
+		return dzbh;
+	}
+	public void setDzbh(String dzbh) {
+		this.dzbh = dzbh;
+	}
+	public String getUpperNumber() {
+		return upperNumber;
+	}
+	public void setUpperNumber(String upperNumber) {
+		this.upperNumber = upperNumber;
+	}
+	public String getDeptName() {
+		return deptName;
+	}
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+	public String getLzfs() {
+		return lzfs;
+	}
+	public void setLzfs(String lzfs) {
+		this.lzfs = lzfs;
+	}
+	public List<Cost> getRows() {
+		return rows;
+	}
+	public void setRows(List<Cost> rows) {
+		this.rows = rows;
+	}
+	public int getTotal() {
+		return total;
+	}
+	public void setTotal(int total) {
+		this.total = total;
+	}
+	public Double getAmount() {
+		return amount;
+	}
+	public void setAmount(Double amount) {
+		this.amount = amount;
+	}
+	
+	
+}

+ 35 - 0
src/main/java/com/post/pageModel/DataGrid.java

@@ -0,0 +1,35 @@
+package com.post.pageModel;
+
+import java.util.List;
+
+public class DataGrid implements java.io.Serializable {
+
+	private Long total;// 总记录数
+	private List rows;// 每行记录
+	private List footer;
+
+	public Long getTotal() {
+		return total;
+	}
+
+	public void setTotal(Long total) {
+		this.total = total;
+	}
+
+	public List getRows() {
+		return rows;
+	}
+
+	public void setRows(List rows) {
+		this.rows = rows;
+	}
+
+	public List getFooter() {
+		return footer;
+	}
+
+	public void setFooter(List footer) {
+		this.footer = footer;
+	}
+
+}

+ 111 - 0
src/main/java/com/post/pageModel/Dept.java

@@ -0,0 +1,111 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.List;
+
+public class Dept implements Serializable {
+
+	private String cid;
+	private String pid;
+	private String id;
+	private String text;
+	private Integer cseq;
+	private String pdeptName;
+	private String cdeptName;
+	private Timestamp ccreateDatetime;
+	private Timestamp cmodifyDatetime;
+	private String state;
+
+	public Integer getCseq() {
+		return cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	public Timestamp getCcreateDatetime() {
+		return ccreateDatetime;
+	}
+
+	public void setCcreateDatetime(Timestamp ccreateDatetime) {
+		this.ccreateDatetime = ccreateDatetime;
+	}
+
+	public Timestamp getCmodifyDatetime() {
+		return cmodifyDatetime;
+	}
+
+	public void setCmodifyDatetime(Timestamp cmodifyDatetime) {
+		this.cmodifyDatetime = cmodifyDatetime;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getText() {
+		return text;
+	}
+
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+	private List<Dept> children;
+
+	public String getPdeptName() {
+		return pdeptName;
+	}
+
+	public void setPdeptName(String pdeptName) {
+		this.pdeptName = pdeptName;
+	}
+
+	public List<Dept> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Dept> children) {
+		this.children = children;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getCdeptName() {
+		return cdeptName;
+	}
+
+	public void setCdeptName(String cdeptName) {
+		this.cdeptName = cdeptName;
+	}
+
+}

+ 95 - 0
src/main/java/com/post/pageModel/Download.java

@@ -0,0 +1,95 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+
+public class Download implements Serializable {
+
+	private String cid;
+	private String cfilename;
+	private String cfilepath;
+	private Timestamp cuploaddate;
+	private Integer ccount;
+	private String userName;
+	private String userId;
+	private String ids;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getCfilename() {
+		return cfilename;
+	}
+	public void setCfilename(String cfilename) {
+		this.cfilename = cfilename;
+	}
+	public String getCfilepath() {
+		return cfilepath;
+	}
+	public void setCfilepath(String cfilepath) {
+		this.cfilepath = cfilepath;
+	}
+	public Timestamp getCuploaddate() {
+		return cuploaddate;
+	}
+	public void setCuploaddate(Timestamp cuploaddate) {
+		this.cuploaddate = cuploaddate;
+	}
+	public Integer getCcount() {
+		return ccount;
+	}
+	public void setCcount(Integer ccount) {
+		this.ccount = ccount;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getUserId() {
+		return userId;
+	}
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+	public String getIds() {
+		return ids;
+	}
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+	public int getPage() {
+		return page;
+	}
+	public void setPage(int page) {
+		this.page = page;
+	}
+	public int getRows() {
+		return rows;
+	}
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+	public String getSort() {
+		return sort;
+	}
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+	public String getOrder() {
+		return order;
+	}
+	public void setOrder(String order) {
+		this.order = order;
+	}
+	
+	
+}

+ 179 - 0
src/main/java/com/post/pageModel/File.java

@@ -0,0 +1,179 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class File implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private String ids;
+	private String cid;
+	private String cfilenumber;
+	private String cname;
+	private String ccontent;
+	private String cfilepath;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	private Date ccreatedate;
+	private String deptId;
+	private Date cdate;
+	private String deptName;
+	private Date cstartdate;
+	private Date cenddate;
+	private Date createStartDate;
+	private Date createEndDate;
+	
+	
+	
+	
+
+	public String getCfilepath() {
+		return cfilepath;
+	}
+
+	public void setCfilepath(String cfilepath) {
+		this.cfilepath = cfilepath;
+	}
+
+	public Date getCreateStartDate() {
+		return createStartDate;
+	}
+
+	public void setCreateStartDate(Date createStartDate) {
+		this.createStartDate = createStartDate;
+	}
+
+	public Date getCreateEndDate() {
+		return createEndDate;
+	}
+
+	public void setCreateEndDate(Date createEndDate) {
+		this.createEndDate = createEndDate;
+	}
+
+	public Date getCstartdate() {
+		return cstartdate;
+	}
+
+	public void setCstartdate(Date cstartdate) {
+		this.cstartdate = cstartdate;
+	}
+
+	public Date getCenddate() {
+		return cenddate;
+	}
+
+	public void setCenddate(Date cenddate) {
+		this.cenddate = cenddate;
+	}
+
+	public String getDeptName() {
+		return deptName;
+	}
+
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+
+	public Date getCdate() {
+		return cdate;
+	}
+
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+
+	public String getDeptId() {
+		return deptId;
+	}
+
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+
+	public Date getCcreatedate() {
+		return ccreatedate;
+	}
+
+	public void setCcreatedate(Date ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+
+	public String getCfilenumber() {
+		return cfilenumber;
+	}
+
+	public void setCfilenumber(String cfilenumber) {
+		this.cfilenumber = cfilenumber;
+	}
+
+	public String getCcontent() {
+		return ccontent;
+	}
+
+	public void setCcontent(String ccontent) {
+		this.ccontent = ccontent;
+	}
+
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+}

+ 32 - 0
src/main/java/com/post/pageModel/Json.java

@@ -0,0 +1,32 @@
+package com.post.pageModel;
+
+public class Json {
+	private boolean success = false;
+	private String msg = "";
+	private Object obj = null;
+
+	public boolean isSuccess() {
+		return success;
+	}
+
+	public void setSuccess(boolean success) {
+		this.success = success;
+	}
+
+	public String getMsg() {
+		return msg;
+	}
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+	public Object getObj() {
+		return obj;
+	}
+
+	public void setObj(Object obj) {
+		this.obj = obj;
+	}
+
+}

+ 92 - 0
src/main/java/com/post/pageModel/Kind.java

@@ -0,0 +1,92 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class Kind implements Serializable {
+
+	private String cid;
+	private String cname;
+	private Integer cseq;
+	private String pid;
+	private String pname;
+	private String state = "open";
+	private String id;
+	private String text;
+	private List<Kind> children;
+	
+	
+
+	public Integer getCseq() {
+		return cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getText() {
+		return text;
+	}
+
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	public List<Kind> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Kind> children) {
+		this.children = children;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getPname() {
+		return pname;
+	}
+
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+}

+ 121 - 0
src/main/java/com/post/pageModel/Kmlz.java

@@ -0,0 +1,121 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Kmlz implements Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private String cid;
+	private String ids;
+	private String pzhs;
+	private String cpzh;
+	private Double camount;
+	private Date cdate;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	private String kjkmId;
+	private String kjkmName;
+	private String costId;
+	private String filename;
+	
+	
+	
+	public String getPzhs() {
+		return pzhs;
+	}
+	public void setPzhs(String pzhs) {
+		this.pzhs = pzhs;
+	}
+	public String getCpzh() {
+		return cpzh;
+	}
+	public void setCpzh(String cpzh) {
+		this.cpzh = cpzh;
+	}
+	public String getFilename() {
+		return filename;
+	}
+	public void setFilename(String filename) {
+		this.filename = filename;
+	}
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getIds() {
+		return ids;
+	}
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+	public Double getCamount() {
+		return camount;
+	}
+	public void setCamount(Double camount) {
+		this.camount = camount;
+	}
+	public Date getCdate() {
+		return cdate;
+	}
+	public void setCdate(Date cdate) {
+		this.cdate = cdate;
+	}
+	public int getPage() {
+		return page;
+	}
+	public void setPage(int page) {
+		this.page = page;
+	}
+	public int getRows() {
+		return rows;
+	}
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+	public String getSort() {
+		return sort;
+	}
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+	public String getOrder() {
+		return order;
+	}
+	public void setOrder(String order) {
+		this.order = order;
+	}
+	public String getKjkmId() {
+		return kjkmId;
+	}
+	public void setKjkmId(String kjkmId) {
+		this.kjkmId = kjkmId;
+	}
+	public String getKjkmName() {
+		return kjkmName;
+	}
+	public void setKjkmName(String kjkmName) {
+		this.kjkmName = kjkmName;
+	}
+	public String getCostId() {
+		return costId;
+	}
+	public void setCostId(String costId) {
+		this.costId = costId;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	
+	
+	
+	
+}

+ 101 - 0
src/main/java/com/post/pageModel/Link.java

@@ -0,0 +1,101 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+public class Link implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -8619597134472818104L;
+
+	private String cid;
+	private String ctitle;
+	private String curl;
+	private Timestamp ccreatedate;
+	private Timestamp cmodifydate;
+	private String userName;
+	private String userId;
+	private String ids;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	
+	
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getCtitle() {
+		return ctitle;
+	}
+	public void setCtitle(String ctitle) {
+		this.ctitle = ctitle;
+	}
+	public String getCurl() {
+		return curl;
+	}
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+	public Timestamp getCcreatedate() {
+		return ccreatedate;
+	}
+	public void setCcreatedate(Timestamp ccreatedate) {
+		this.ccreatedate = ccreatedate;
+	}
+	public Timestamp getCmodifydate() {
+		return cmodifydate;
+	}
+	public void setCmodifydate(Timestamp cmodifydate) {
+		this.cmodifydate = cmodifydate;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getUserId() {
+		return userId;
+	}
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+	public String getIds() {
+		return ids;
+	}
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+	public int getPage() {
+		return page;
+	}
+	public void setPage(int page) {
+		this.page = page;
+	}
+	public int getRows() {
+		return rows;
+	}
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+	public String getSort() {
+		return sort;
+	}
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+	public String getOrder() {
+		return order;
+	}
+	public void setOrder(String order) {
+		this.order = order;
+	}
+	
+	
+}

+ 130 - 0
src/main/java/com/post/pageModel/Menu.java

@@ -0,0 +1,130 @@
+package com.post.pageModel;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.post.model.Tmenu;
+
+public class Menu implements java.io.Serializable {
+
+	private String id;
+	private String pid;
+	private String pname;
+	private String state = "open";// 是否展开(open,closed)
+	private String iconCls;// 前面的小图标样式
+	private String cid;
+	private Tmenu tmenu;
+	private String ciconcls;
+	private String cname;
+	private BigDecimal cseq;
+	private String curl;
+	private List<Menu> children;
+	private String userId;
+	
+
+	public String getUserId() {
+		return userId;
+	}
+
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+
+	public List<Menu> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Menu> children) {
+		this.children = children;
+	}
+
+	public String getIconCls() {
+		return iconCls;
+	}
+
+	public void setIconCls(String iconCls) {
+		this.iconCls = iconCls;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getPname() {
+		return pname;
+	}
+
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public Tmenu getTmenu() {
+		return tmenu;
+	}
+
+	public void setTmenu(Tmenu tmenu) {
+		this.tmenu = tmenu;
+	}
+
+	public String getCiconcls() {
+		return ciconcls;
+	}
+
+	public void setCiconcls(String ciconcls) {
+		this.ciconcls = ciconcls;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public BigDecimal getCseq() {
+		return cseq;
+	}
+
+	public void setCseq(BigDecimal cseq) {
+		this.cseq = cseq;
+	}
+
+	public String getCurl() {
+		return curl;
+	}
+
+	public void setCurl(String curl) {
+		this.curl = curl;
+	}
+
+}

+ 74 - 0
src/main/java/com/post/pageModel/Project.java

@@ -0,0 +1,74 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+
+public class Project implements Serializable{
+	
+	private String ids;
+	private String cid;
+	private String cname;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+
+	
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+}
+
+

+ 26 - 0
src/main/java/com/post/pageModel/Pzh.java

@@ -0,0 +1,26 @@
+package com.post.pageModel;
+
+public class Pzh implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private String cid;
+	private String pzh;
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getPzh() {
+		return pzh;
+	}
+	public void setPzh(String pzh) {
+		this.pzh = pzh;
+	}
+	
+	
+}

+ 112 - 0
src/main/java/com/post/pageModel/Role.java

@@ -0,0 +1,112 @@
+package com.post.pageModel;
+
+public class Role implements java.io.Serializable{
+	private String cid;
+	private String cdesc;
+	private String cname;
+	private String ids;
+	private String authIds;
+	private String authNames;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+	private String menuIds;
+	private String menuNames;
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCdesc() {
+		return cdesc;
+	}
+
+	public void setCdesc(String cdesc) {
+		this.cdesc = cdesc;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public String getAuthIds() {
+		return authIds;
+	}
+
+	public void setAuthIds(String authIds) {
+		this.authIds = authIds;
+	}
+
+	public String getAuthNames() {
+		return authNames;
+	}
+
+	public void setAuthNames(String authNames) {
+		this.authNames = authNames;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getMenuIds() {
+		return menuIds;
+	}
+
+	public void setMenuIds(String menuIds) {
+		this.menuIds = menuIds;
+	}
+
+	public String getMenuNames() {
+		return menuNames;
+	}
+
+	public void setMenuNames(String menuNames) {
+		this.menuNames = menuNames;
+	}
+}

+ 87 - 0
src/main/java/com/post/pageModel/SessionInfo.java

@@ -0,0 +1,87 @@
+package com.post.pageModel;
+
+public class SessionInfo implements java.io.Serializable {
+	
+	private String userId;// 用户ID
+	private String loginName;// 用户登录名称
+	private String ipAddress;// IP地址
+	private String deptName;
+	private String deptId;
+	private boolean lock;
+	
+	
+	
+	public String getDeptId() {
+		return deptId;
+	}
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+	public boolean isLock() {
+		return lock;
+	}
+	public void setLock(boolean lock) {
+		this.lock = lock;
+	}
+	public String getUserId() {
+		return userId;
+	}
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+	public String getLoginName() {
+		return loginName;
+	}
+	public void setLoginName(String loginName) {
+		this.loginName = loginName;
+	}
+	
+	public String getIpAddress() {
+		return ipAddress;
+	}
+	public void setIpAddress(String ipAddress) {
+		this.ipAddress = ipAddress;
+	}
+	public String getDeptName() {
+		return deptName;
+	}
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+	public String getAuthIds() {
+		return authIds;
+	}
+	public void setAuthIds(String authIds) {
+		this.authIds = authIds;
+	}
+	public String getAuthNames() {
+		return authNames;
+	}
+	public void setAuthNames(String authNames) {
+		this.authNames = authNames;
+	}
+	public String getAuthUrls() {
+		return authUrls;
+	}
+	public void setAuthUrls(String authUrls) {
+		this.authUrls = authUrls;
+	}
+	public String getRoleIds() {
+		return roleIds;
+	}
+	public void setRoleIds(String roleIds) {
+		this.roleIds = roleIds;
+	}
+	public String getRoleNames() {
+		return roleNames;
+	}
+	public void setRoleNames(String roleNames) {
+		this.roleNames = roleNames;
+	}
+	private String authIds;// 拥有的权限ID集合
+	private String authNames;
+	private String authUrls;
+	private String roleIds;
+	private String roleNames;
+
+}

+ 74 - 0
src/main/java/com/post/pageModel/Shangpin.java

@@ -0,0 +1,74 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+
+public class Shangpin implements Serializable{
+	
+	private String ids;
+	private String cid;
+	private String cname;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+
+	
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+}
+
+

+ 138 - 0
src/main/java/com/post/pageModel/Subject.java

@@ -0,0 +1,138 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class Subject implements Serializable {
+
+	private String ids;
+	private String cid;
+	private String cname;
+	private Integer cseq;
+	private String pid;
+	private String pname;
+	private String state = "open";
+	private String id;
+	private String text;
+	private List<Subject> children;
+	private int page;// 当前页
+	private int rows;// 每页显示记录数
+	private String sort;// 排序字段名
+	private String order;// 按什么排序(asc,desc)
+
+	
+	
+	
+	public Integer getCseq() {
+		return cseq;
+	}
+
+	public void setCseq(Integer cseq) {
+		this.cseq = cseq;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getPname() {
+		return pname;
+	}
+
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getText() {
+		return text;
+	}
+
+	public void setText(String text) {
+		this.text = text;
+	}
+
+	public List<Subject> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Subject> children) {
+		this.children = children;
+	}
+
+	public String getIds() {
+		return ids;
+	}
+
+	public void setIds(String ids) {
+		this.ids = ids;
+	}
+
+	public int getPage() {
+		return page;
+	}
+
+	public void setPage(int page) {
+		this.page = page;
+	}
+
+	public int getRows() {
+		return rows;
+	}
+
+	public void setRows(int rows) {
+		this.rows = rows;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+}

+ 61 - 0
src/main/java/com/post/pageModel/TjNormal.java

@@ -0,0 +1,61 @@
+package com.post.pageModel;
+
+import java.io.Serializable;
+
+public class TjNormal implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private String cid;
+	private String cname;
+	private Double bntotal;
+	private Double bytotal;
+	private String deptName;
+	
+	
+
+	public String getDeptName() {
+		return deptName;
+	}
+
+	public void setDeptName(String deptName) {
+		this.deptName = deptName;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public Double getBntotal() {
+		return bntotal;
+	}
+
+	public void setBntotal(Double bntotal) {
+		this.bntotal = bntotal;
+	}
+
+
+	public Double getBytotal() {
+		return bytotal;
+	}
+
+	public void setBytotal(Double bytotal) {
+		this.bytotal = bytotal;
+	}
+
+
+}

Vissa filer visades inte eftersom för många filer har ändrats