xionghy 5 rokov pred
rodič
commit
e4b64998ba

+ 248 - 0
adm.iml

@@ -0,0 +1,248 @@
+<?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="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <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>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <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="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/webapp/WEB-INF/lib/commons-fileupload-1.3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/webapp/WEB-INF/lib/commons-io-2.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/webapp/WEB-INF/lib/min-1.0.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/webapp/WEB-INF/lib/minencrypt-1.0.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/src/main/webapp/WEB-INF/lib/ueditor.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.13" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-amqp:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:1.0.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:1.0.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-core:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-event:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-file:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-ftp:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-net:commons-net:3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-groovy:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.groovy:groovy-all:1.8.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-http:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-ip:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-jdbc:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-jms:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-jmx:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.6.8" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.6.8" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-mail:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-mongodb:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:1.0.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-redis:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.0.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-rmi:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-scripting:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-security:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:3.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:3.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:3.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-sftp:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-stream:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-test:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mockito:mockito-all:1.9.0" level="project" />
+    <orderEntry type="library" name="Maven: junit:junit-dep:4.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-ws:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-core:2.0.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-xml:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-xml:2.0.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-xmpp:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.igniterealtime.smack:smackx:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.igniterealtime.smack:smack:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.18" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.0" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.25" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-test:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jms:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.2.17.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20160810" level="project" />
+    <orderEntry type="library" name="Maven: cglib:cglib:2.2" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-api:2.7.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.1.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:stax2-api:3.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-addr:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-policy:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-transports-http:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.2" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.8.1" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15:1.46" level="project" />
+    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.51" level="project" />
+    <orderEntry type="library" name="Maven: com.jcraft:jzlib:1.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-excelant:3.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf.tool:xmlworker:5.5.9" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.5.13" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch:elasticsearch:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-core:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-analyzers-common:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-backward-codecs:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-grouping:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-highlighter:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-join:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-memory:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-misc:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-queries:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-queryparser:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-sandbox:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-spatial:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-spatial-extras:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-spatial3d:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.lucene:lucene-suggest:6.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch:securesm:1.1" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.jopt-simple:jopt-simple:5.0.2" level="project" />
+    <orderEntry type="library" name="Maven: com.carrotsearch:hppc:0.7.1" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.tdunning:t-digest:3.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.6" level="project" />
+    <orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.client:transport:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.plugin:transport-netty3-client:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty:3.10.6.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.plugin:transport-netty4-client:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec-http:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.7.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.plugin:reindex-client:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.client:rest:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.plugin:lang-mustache-client:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.spullara.mustache.java:compiler:0.9.3" level="project" />
+    <orderEntry type="library" name="Maven: org.elasticsearch.plugin:percolator-client:5.2.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
+    <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.4.2" level="project" />
+  </component>
+</module>

+ 4 - 0
src/main/java/com/minpay/common/constant/Constant.java

@@ -313,6 +313,10 @@ public class Constant implements IMINBusinessConstant{
 	 * 原始文件类型 1000006:95598工单
 	 */
 	public static final String FILE_DETAIL_TYPE_05 = "1000006";
+	/**
+	 * 原始文件类型 1000006:95598计停非计停
+	 */
+	public static final String FILE_DETAIL_TYPE_07 = "1000007";
 	
 	/**
 	 * 报表类型 TQTDRB:台区停电日报

+ 8 - 18
src/main/java/com/minpay/common/service/impl/DianwangServiceImpl.java

@@ -8,24 +8,8 @@ import com.minpay.common.constant.Constant;
 import com.minpay.common.format.IFormatService;
 import com.minpay.common.service.IDianwangService;
 import com.minpay.common.util.CommonUtil;
-import com.minpay.db.table.mapper.DwFileDetail00Mapper;
-import com.minpay.db.table.mapper.DwFileDetail01Mapper;
-import com.minpay.db.table.mapper.DwFileDetail02Mapper;
-import com.minpay.db.table.mapper.DwFileDetail03Mapper;
-import com.minpay.db.table.mapper.DwFileDetail04Mapper;
-import com.minpay.db.table.mapper.DwFileDetail05Mapper;
-import com.minpay.db.table.model.DwFileDetail00;
-import com.minpay.db.table.model.DwFileDetail00Example;
-import com.minpay.db.table.model.DwFileDetail01;
-import com.minpay.db.table.model.DwFileDetail01Example;
-import com.minpay.db.table.model.DwFileDetail02;
-import com.minpay.db.table.model.DwFileDetail02Example;
-import com.minpay.db.table.model.DwFileDetail03;
-import com.minpay.db.table.model.DwFileDetail03Example;
-import com.minpay.db.table.model.DwFileDetail04;
-import com.minpay.db.table.model.DwFileDetail04Example;
-import com.minpay.db.table.model.DwFileDetail05;
-import com.minpay.db.table.model.DwFileDetail05Example;
+import com.minpay.db.table.mapper.*;
+import com.minpay.db.table.model.*;
 import com.startup.minpay.frame.constant.IMINBusinessConstant;
 import com.startup.minpay.frame.exception.MINBusinessException;
 import com.startup.minpay.frame.jdbc.MINRowBounds;
@@ -100,6 +84,12 @@ public class DianwangServiceImpl implements IDianwangService {
     		List<DwFileDetail05> resList = db.selectByExample(DwFileDetail05Mapper.class, fileDetail05Example, rows);
     		return resList;
     	}
+		else if (Constant.FILE_DETAIL_TYPE_07.equals(fileType)) {
+			DwFileDetail07Example fileDetail07Example = new DwFileDetail07Example();
+			fileDetail07Example.createCriteria().andFileIdEqualTo(fileId);
+			List<DwFileDetail07> resList = db.selectByExample(DwFileDetail07Mapper.class, fileDetail07Example, rows);
+			return resList;
+		}
     	return null;
 	}
 	

+ 1 - 1
src/main/java/com/minpay/common/util/FilesUtil.java

@@ -87,7 +87,7 @@ public class FilesUtil {
 			//处理路径问题 判断是否存在,不存在则创建
 			File saveFilePath = new File(basePath + savePath);
 			if (!saveFilePath.exists()) {
-				saveFilePath.mkdir();
+				saveFilePath.mkdirs();
 			}
 			File saveFile = new File(basePath + savePath + saveFileName);
 			boolean t = saveFile.createNewFile();

+ 31 - 25
src/main/java/com/minpay/reportManage/action/DataWareManageAction.java

@@ -11,6 +11,8 @@ import java.util.UUID;
 
 import javax.servlet.http.HttpServletResponse;
 
+import com.minpay.db.table.mapper.*;
+import com.minpay.db.table.model.*;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 
@@ -23,28 +25,6 @@ import com.minpay.common.service.IPropertiesService;
 import com.minpay.common.util.CommonUtil;
 import com.minpay.common.util.FilesUtil;
 import com.minpay.common.util.ListUtil;
-import com.minpay.db.table.mapper.DwFileDetail00Mapper;
-import com.minpay.db.table.mapper.DwFileDetail01Mapper;
-import com.minpay.db.table.mapper.DwFileDetail02Mapper;
-import com.minpay.db.table.mapper.DwFileDetail03Mapper;
-import com.minpay.db.table.mapper.DwFileDetail04Mapper;
-import com.minpay.db.table.mapper.DwFileDetail05Mapper;
-import com.minpay.db.table.mapper.DwFileInfMapper;
-import com.minpay.db.table.mapper.DwReporttypeFiletypeRelMapper;
-import com.minpay.db.table.mapper.ImUserMapper;
-import com.minpay.db.table.model.DwFileDetail00;
-import com.minpay.db.table.model.DwFileDetail00Example;
-import com.minpay.db.table.model.DwFileDetail01;
-import com.minpay.db.table.model.DwFileDetail01Example;
-import com.minpay.db.table.model.DwFileDetail02;
-import com.minpay.db.table.model.DwFileDetail03;
-import com.minpay.db.table.model.DwFileDetail04;
-import com.minpay.db.table.model.DwFileDetail05;
-import com.minpay.db.table.model.DwFileInf;
-import com.minpay.db.table.model.DwReporttypeFiletypeRelExample;
-import com.minpay.db.table.model.DwReporttypeFiletypeRelKey;
-import com.minpay.db.table.model.ImUser;
-import com.minpay.db.table.model.ImUserExample;
 import com.minpay.db.table.own.mapper.DataWareManageMapper;
 import com.minpay.db.table.own.mapper.SequenceMapper;
 import com.startup.minpay.frame.business.IMINAction;
@@ -322,7 +302,7 @@ public class DataWareManageAction implements IMINAction {
 			}
 		} else if(Constant.FILE_DETAIL_TYPE_03.equals(fileType)) {
 			String[] titleKey = new String[]{"no","sgsmc","xgsmc","bdzmc","xlmc","tqid","byqmc","yhgldw1","yhid","yhmc","yhgldw2","dymax","dymin","dyhgl","csxl","cxxl","dysc","gdlx","ljts","sjrq","gddw"};         
-			list = FilesUtil.readExecleasy(fileItem, titleKey, 3);
+			list = FilesUtil.readExecleasy(fileItem, titleKey, 1);
 			
 			if (list.size() == 0) {
 				throw new MINBusinessException("无数据,请添加数据");//无数据,请添加数据
@@ -372,7 +352,7 @@ public class DataWareManageAction implements IMINAction {
 			}
 		} else if(Constant.FILE_DETAIL_TYPE_04.equals(fileType)) {
 			String[] titleKey = new String[]{"no","sgsmc","xgsmc","bdzmc","xlmc","tqid","byqmc","yhgldw1","yhid","yhmc","yhgldw2","dymax","dymin","dyhgl","csxl","cxxl","gdysc","gdlx","ljts","gddw","sjrq"};         
-			list = FilesUtil.readExecleasy(fileItem, titleKey, 3);
+			list = FilesUtil.readExecleasy(fileItem, titleKey, 1);
 			
 			if (list.size() == 0) {
 				throw new MINBusinessException("无数据,请添加数据");//无数据,请添加数据
@@ -424,7 +404,7 @@ public class DataWareManageAction implements IMINAction {
 		} else if(Constant.FILE_DETAIL_TYPE_05.equals(fileType)) {
 			String[] titleKey = new String[]{"NO","GDBH","GWGDBH","ZT","YWLX","DQBZ","SLRY","SLSJ","SLLR","YHBH","YHMC","LXDZ","LXDH","HFNR","YJFL","EJFL",
 					"YWZL","SJDW","GDDW","CBD","CLJG","CLDW","CLBM","GLGD","WTYYFL","GDFJ","ZRBM","GDSJ","GQSJ","GQYY","FWQD","SJHTZRYY"};         
-			list = FilesUtil.readExecleasy(fileItem, titleKey, 3);
+			list = FilesUtil.readExecleasy(fileItem, titleKey, 1);
 			
 			if (list.size() == 0) {
 				throw new MINBusinessException("无数据,请添加数据");//无数据,请添加数据
@@ -468,6 +448,32 @@ public class DataWareManageAction implements IMINAction {
 				fileDetail05.setFileId(fileId);
 				db.insertSelective(DwFileDetail05Mapper.class, fileDetail05);
 			}
+		}else if(Constant.FILE_DETAIL_TYPE_07.equals(fileType)) {
+			String[] titleKey = new String[]{"NO","TYPE","UNIT","DEVICE","TIME","EVENTTYPE","FA","TRIPTYPE","CAUSE","CHZDZQK","HANDLE","ERROBRIEF"};
+			list = FilesUtil.readExecleasy(fileItem, titleKey, 1);
+
+			if (list.size() == 0) {
+				throw new MINBusinessException("无数据,请添加数据");//无数据,请添加数据
+			}
+			// 详情数据存入数据库
+			for (Map<String,String> excelMap : list) {
+				String fileDetailId = db.getMybatisMapper(SequenceMapper.class).getSequence("FILE_DETAIL_05_NO");
+				DwFileDetail07 fileDetail07 = new DwFileDetail07();
+				fileDetail07.setId(fileDetailId);
+				fileDetail07.setNo(excelMap.get("NO"));
+				fileDetail07.setType(excelMap.get("TYPE"));
+				fileDetail07.setUnit(excelMap.get("UNIT"));
+				fileDetail07.setDevice(excelMap.get("DEVICE"));
+				fileDetail07.setTime(excelMap.get("TIME"));
+				fileDetail07.setEventtype(excelMap.get("EVENTTYPE"));
+				fileDetail07.setFa(excelMap.get("FA"));
+				fileDetail07.setTriptype(excelMap.get("TRIPTYPE"));
+				fileDetail07.setCause(excelMap.get("CAUSE"));
+				fileDetail07.setChzdzqk(excelMap.get("CHZDZQK"));
+				fileDetail07.setHandle(excelMap.get("HANDLE"));
+				fileDetail07.setErrobrief(excelMap.get("ERROBRIEF"));
+				db.insertSelective(DwFileDetail07Mapper.class, fileDetail07);
+			}
 		}
 		
 		// 文件名

+ 156 - 0
src/main/webapp/admin/jtfjt/reportManageDetailTqtd.html

@@ -0,0 +1,156 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报告详情</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+	<div class="shadow-content" style="margin:1.5rem; text-align: center;">
+		<p id = "reportTitle" style="margin:15px; font-size : 20px"></p>
+    	<table id="reportTable" class="layui-table"></table>
+    	<div id = "reportDiv" style = "margin : 20px; text-align : left;"></div>
+    	<div id = "reportFujian" style = "margin : 20px; text-align : right;">
+    		<a style = "color : red;" onclick = "downLoadFujian()">附件下载</a>
+    	</div>
+	</div>
+    <script>
+	var pageId = getQueryString("pageId");
+	var reportId = getQueryString("reportId");		//报告id
+	var fileName = chineseUrlDecodeURI(getQueryString("fileName"));	//报告名称
+	
+	var type = getQueryString("type");				//报告类型00:excel 01:word
+	var typeId = getQueryString("typeId");			//报告类型id
+	var reportType = getQueryString("reportType");	//报告类型
+	
+	var cols = null;
+	
+	// excel
+	if ("00" == type) {
+		$("#reportDiv").hide();
+		$("#reportFujian").hide();
+		$("#reportTitle").html(fileName);
+		$.request({
+			action : 'ReportManageAction/reportInfDetail',
+			data : {
+				reportId : reportId
+			},
+			success : function(data) {
+				var reportDataJsonStr = data.data.data;
+				var excelList = eval('(' + reportDataJsonStr + ')');
+				reportTable(excelList, typeId);
+			},
+			error : function(data2) {
+				$.ErrorAlert(data2.MINErrorMessage);
+			}
+	  	});
+	// word
+	} else {
+		$("#reportTable").hide();
+		$("#reportTitle").html(fileName);
+		$.request({
+			action : 'ReportManageAction/reportInfDetail',
+			data : {
+				reportId : reportId
+			},
+			success : function(data) {
+				var resJSON = eval('(' + data.data.data + ')');
+				var reportDataJson = resJSON.dataMap;
+				var reportDesc = resJSON.descStr;
+				
+				for(var key in reportDataJson){
+					var replaceStr = "${" + key + "}";
+					if (key == "totalCountTwice") {
+						reportDesc = reportDesc.replace(/\${totalCountTwice}/g, reportDataJson[key]);
+					} else {
+						reportDesc = reportDesc.replace(replaceStr, reportDataJson[key]);
+					}
+				}
+				$("#reportDiv").html(reportDesc);
+				
+				// 周报下的excel
+				var excelList = resJSON.excelList;
+				if (!isEmpty(excelList)) {
+					var tableHtml = '<table class="layui-table">';
+					for (var i = 0; i < excelList.length; i ++) {
+						tableHtml += '<tr>';
+						var childList = excelList[i];
+						for (var j = 0; j < childList.length; j ++) {
+							tableHtml += '<td>' + childList[j] + '</td>';
+						}
+						tableHtml += '</tr>';
+					}
+					tableHtml += '</table>';
+					$("#reportDiv").append(tableHtml);
+				}
+				if (reportType != "TQTDYB") {
+					$("#reportFujian").hide();
+				}
+			},
+			error : function(data2) {
+				$.ErrorAlert(data2.MINErrorMessage);
+			}
+	  	});
+	}
+	
+	function reportTable(excelList, typeId, isEdit) {
+		var html = '';
+		for (var i = 0; i < excelList.length; i ++) {
+			html += '<tr>';
+			var excelChildList = excelList[i];
+			for (var j = 0; j < excelChildList.length; j ++) {
+				// 合计列增加穿透
+				if ((j == excelChildList.length - 1)) {
+					// 台区停电次数
+					if (i == 2) {
+						html += '<td style="cursor: pointer" onclick="tqtd0()">' + excelChildList[j] + '</td>';
+					// 2个月停电3次及以上台区
+					} else if (i == 5) {
+						html += '<td style="cursor: pointer" onclick="tqtd1()">' + excelChildList[j] + '</td>';
+					// 2个月停电3次及以上台区且昨日停电
+					} else if (i == 6) {
+						html += '<td style="cursor: pointer" onclick="tqtd2()">' + excelChildList[j] + '</td>';
+					} else if (i == 7) {
+						html += '<td style="cursor: pointer" onclick="tqtd3()">' + excelChildList[j] + '</td>';
+					} else {
+						html += '<td>' + excelChildList[j] + '</td>';
+					}
+				} else {
+					html += '<td>' + excelChildList[j] + '</td>';
+				}
+			}
+			html += '</tr>';
+		}
+		$("#reportTable").html(html);
+	}
+	
+	// 台区次数穿透
+	function tqtd0(){
+		var openPageId = pageId + "-01";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD01", '', pageId, null);
+	}
+	// 2个月停电3次及以上台区穿透
+	function tqtd1(){
+		var openPageId = pageId + "-02";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD02", '', pageId, null);
+	}
+	// month个月停电count次及以上台区且昨日停电穿透
+	function tqtd2(){
+		var openPageId = pageId + "-03";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD03", '', pageId, null);
+	}
+	// 2个月停电1次及以上台区且昨日停电穿透
+	function tqtd3(){
+		var openPageId = pageId + "-04";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD04", '', pageId, null);
+	}
+	
+	function downLoadFujian() {
+		var data = {reportId : reportId};
+		exportExcel("../../TQTDReportAction/reportInfFujian",data);
+	}
+    </script>
+</body>
+
+</html>

+ 247 - 0
src/main/webapp/admin/jtfjt/reportManageJtfjt.html

@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报表管理</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+	<div class="order-body">
+		<div class="order-tiaojian back-gray">
+			<div class="tiaojian-part1" id = "conditions">
+				<div class="fl f12-gray4-op">所选条件:</div>
+			</div>
+			<div class="tiaojian-part2 fr  demoTable">
+				<button class="order-bnt1 layui-btn" onclick="reloadSearch()" >查询</button>
+				<button class="layui-btn order-bnt2" onclick="reset()">重置</button>
+				<button class="order-bnt2 layui-btn" onclick="uploadExcel()">报表生成</button>
+				<a href="#" id="toggle" class="top">收起</a>
+			</div>
+		</div>
+		<form class="layui-form" action="" id = "formRole">
+			<div class="order-select back-border" id="content">
+				<div class="d-dashed" style="margin: 10px 0;"></div>
+				<div class="layui-inline">
+					<label class="f12-gray4">生成日期:</label>
+					<div class="layui-input-inline" style="position: relative;">
+						<input type="text" class="layui-input" id="date" placeholder="请选择日期" readOnly/>
+					</div>
+				</div>
+				<div class="layui-inline">
+					<label class="f12-gray4">文件名称:</label>
+					<input name="fileName"  id ="fileName" autocomplete="off" placeholder="请输入文件名称" class="search-select" onchange = "changeSelectCon(1,this,'inp')">
+				</div>
+			</div>
+		</form>
+	</div>
+	<div class="shadow-content" style="margin:1.5rem;">
+    	<table id="tableTest" lay-filter="tableFilter"></table>
+	</div>
+	<script type="text/html" id="barDemo">
+		<a class="layui-btn layui-btn-xs" lay-event="detail">详情查看</a>
+		{{#  if(timeType == '00'){ }}
+			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
+		{{#  } }}
+     	<a class="layui-btn layui-btn-xs" lay-event="downLoad">下载</a>
+		<a class="layui-btn layui-btn-xs" lay-event="delete">删除</a>
+   	</script>
+	<script type="text/html" id="algorithmBar">
+		<a class="layui-btn layui-btn-xs" lay-event="algorithmDetail">查看</a>
+   	</script>
+    <script>
+	$("#toggle").click(function() {
+		$(this).html($("#content").is(":hidden") ? "收起" + "<i class='iconfont up iconSelect_drop-down'/></i>" : "展开" +
+			"<i class='iconfont up iconSelect_drop-down'/></i>");
+		$("#content").slideToggle();
+	});
+	var pageId = "270000";
+	// 报表类型
+	var reportType = getQueryString("reportType")
+	
+	var timeType = getQueryString("timeType");// 00日报01周报02月报
+	
+     var table;
+     var form;
+     layui.use(['table','laydate','form'], function(){
+    	  var laydate = layui.laydate;
+    	  laydate.render({ 
+    		  elem: '#date'
+    		  ,type: 'date'
+    		  ,range: true
+    		  ,done: function(value, date, endDate){
+    			  changeSelectCon(0,"date",'date',value)
+  			  }
+		  });
+    	  
+		  table = layui.table;
+		  
+		  // 加载数据
+		  table.render({
+			id: 'tableTest'
+		    ,elem: '#tableTest'
+		    ,limit:10
+		    ,url: 'ReportManageAction/reportInfQuery' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", timeType : timeType, reportType : reportType}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+		      {field:'num', title: '序号',width:'5%', type:'numbers', align: 'center'}
+		      ,{field: 'uploadDate', title: '生成时间', width:'15%', sort: true}
+		      ,{field: 'fileName', title: '报表名称', width:'30%'}
+		      ,{field: 'algorith', title: '算法', width: '10%', toolbar: '#algorithmBar'}
+		      ,{field: 'operate', title: '操作', width: '40%', toolbar: '#barDemo', fixed : 'right'}
+		    ]]
+		    ,done: function(res, curr, count){
+		    }
+		    ,even: true //开启隔行背景
+		  });
+		  
+		 // 监听工具条(操作)
+		  table.on('tool(tableFilter)', function(obj){ //注:tool是工具条事件名,tableFilter是table原始容器的属性 lay-filter="对应的值"
+		    var data = obj.data; //获得当前行数据
+		    var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
+		    var tr = obj.tr; //获得当前行 tr 的DOM对象
+		    if (layEvent === 'detail'){ //查看
+		    	showDetail(data);
+		    } else if(layEvent === 'downLoad'){
+		    	window.open("../../ReportManageAction/reportDownLoad?reportId=" + data.id);
+		    } else if(layEvent === 'delete'){
+		    	layer.confirm('确认删除?', function(index){
+	        		layer.close(index);
+			    	$.request({
+						action : 'ReportManageAction/reportInfDelete',
+						data : {
+							reportId : data.id
+						},
+						success : function(data1) {
+							$.SuccAlert("操作成功!");
+							reloadSearch();
+						},
+						error : function(data2) {
+							$.ErrorAlert(data2.MINErrorMessage);
+						}
+		    	  	});
+	      		});
+		    } else if (layEvent === 'edit'){ // 编辑
+		    	editReport(data);
+		    } else if (layEvent === 'algorithmDetail'){ // 算法查看
+		    	algorithmDetail(data);
+		    }
+		  });
+	 });
+      
+      function reloadSearch (t) {
+	    	var fileName = $("#fileName").val();
+	    	var date = $("#date").val();
+	        //执行重载
+ 		    table.reload('tableTest', {
+ 		        page: {
+ 		        	curr: 1 //重新从第 1 页开始
+ 		        }
+ 		        ,where: {
+ 		        	date : date,
+ 		        	fileName : fileName
+ 		        }
+ 		     });
+ 		 if (t == 1) {
+     		  $.Alert("修改成功"); 
+     	 }
+      }
+      
+      function reset(){
+    	  $('#formRole')[0].reset();
+    	  $("#conditions").html('<div class="fl f12-gray4-op">所选条件:</div>');
+      }
+      
+      function uploadExcel(){
+    	  var openPageId = pageId + "-01";
+    	  openMainTabPage(openPageId, "报表生成", "jtfjt/reportProduceJtfjt.html?pageId="+openPageId+"&timeType="+timeType+"&reportType="+reportType, '', pageId, reloadSearch);
+      }
+      
+      function showDetail(data){
+    	  var openPageId = pageId + "-02";
+    	  openMainTabPage(openPageId, "详情查看", "tqtd/reportManageDetailTqtd.html?pageId="+openPageId+"&reportId="+data.id+"&type="+data.type+"&typeId="+data.typeId+"&fileName="+chineseUrlEncode(data.fileName)+"&reportType="+reportType, '', pageId, null);
+      }
+      function editReport(data){
+    	  var openPageId = pageId + "-03";
+    	  openMainTabPage(openPageId, "编辑", "tqtd/reportManageUpdateTqtd.html?pageId="+openPageId+"&reportId="+data.id+"&type="+data.type+"&typeId="+data.typeId+"&fileName="+chineseUrlEncode(data.fileName)+"&reportType="+reportType, '', pageId, reloadSearch);
+      }
+      function algorithmDetail(data){
+   	  	var openPageId = pageId + "-04";
+		openMainTabPage(openPageId, "算法查看", "reprotManage/reportAlgorithm.html?pageId="+openPageId+"&reportTypeId="+data.typeId, '', pageId, null);
+      }
+      
+   	function changeSelectCon(index, t, type, dateValue){
+   		if (type == "date") {
+   			if (isEmpty(dateValue)) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type,dateValue));
+   				}
+   			}
+   		} else if (type == 'inp') {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		} else {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$(t).attr("id","subjects");
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		}
+   	}
+    	
+	var array = new Array('生成日期','文件名称');
+	function getSelectConHtml(index, t, type,dateValue){
+		var name;
+		if (type == "date") {
+			name = $("#"+t).attr("id");
+		} else {
+			name = $(t).attr("id");
+		}
+		var value;
+		if(type == "inp"){
+			value = t.value.substr(0,5)+"..";
+		}
+		if (type == "date") {
+			value = dateValue;
+		}
+		if(type == "sel"){
+			value = $("#stateDiv").find("option:selected").text();
+		}
+		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
+						'<div class="fl">' + array[index] + '</div>' +
+						':<span>'+value+'</span>' +
+						'<svg class="icon" aria-hidden="true">' +
+						  '<use xlink:href="#iconicon_close1"></use>' +
+						'</svg>' +
+					'</div>';
+		return html;
+	}
+	function removeSearch(t) {
+		if ($(t).attr("name") == 'subjects') {
+			initSelect('stateDiv', "COMPANY_STATE", "state", '', true); 
+			form.render();
+			$(t).remove();
+		} else {
+			$("#"+$(t).attr("name")).val('');
+			$(t).remove();
+		}
+	}
+    </script>
+</body>
+
+</html>

+ 78 - 0
src/main/webapp/admin/jtfjt/reportManageUpdateTqtd.html

@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报告详情</title>
+    <script src="../../js/min-loader-next.js"></script>
+    <script src="../../js/report.js"></script>
+</head>
+<body class="content">
+	<div class="shadow-content" style="margin:1.5rem; text-align: center;">
+		<p id = "reportTitle" style="margin:15px; font-size : 20px" contenteditable = "true"></p>
+    	<table id="reportTable" class="layui-table"></table>
+	</div>
+	<div class="layui-form-item box-button" style="margin-top:50px">
+          <div class="layui-input-block">
+				<button class="layui-btn" onclick = "saveReport()">保存</button>
+          </div>
+    </div>
+    <script>
+	var pageId = getQueryString("pageId");
+	var reportId = getQueryString("reportId");		//报告id
+	var fileName = chineseUrlDecodeURI(getQueryString("fileName"));	//报告名称
+	
+	var type = getQueryString("type");		//报告类型00:excel 01:word
+	var typeId = getQueryString("typeId");	//报告类型id
+	
+	var cols = null;
+	
+	// excel
+	if ("00" == type) {
+		$("#reportTitle").html(fileName);
+		$.request({
+			action : 'ReportManageAction/reportInfDetail',
+			data : {
+				reportId : reportId
+			},
+			success : function(data) {
+				var reportDataJsonStr = data.data.data;
+				var excelList = eval('(' + reportDataJsonStr + ')');
+				reportTable(excelList, typeId, true);
+			},
+			error : function(data2) {
+				$.ErrorAlert(data2.MINErrorMessage);
+			}
+	  	});
+	// word
+	} else {
+		
+	}
+
+	function saveReport() {
+		// excel
+		if ("00" == type) {
+			var excelList = getTableToArray("reportTable");
+			$.request({
+				action : 'ReportManageAction/reportInfUpdate',
+				data : {
+					reportId : reportId,
+					excelList : JSON.stringify(excelList),
+					reportName : $("#reportTitle").html()
+				},
+				success : function(data) {
+					$.SuccAlert("保存成功!");
+					setTimeout(function(){
+						deleteTabPageParent(pageId); 
+					}, 1500)
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+		  	});
+		}
+	}
+    </script>
+</body>
+
+</html>

+ 424 - 0
src/main/webapp/admin/jtfjt/reportProduceJtfjt.html

@@ -0,0 +1,424 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>导入</title>
+    <script src="../../js/min-loader-next.js"></script>
+    <script src="../../js/report.js"></script>
+    <link rel="stylesheet" href="../../plugins/layui/lay/modules/steps/style.css"></link>
+    <style>
+    	.layui-input {
+    		width : 200px;
+    	}
+    	.layui-upload-drag .layui-icon {
+    		font-size: 18px;
+		    color: #fff;
+		}
+		.layui-btn-sm {
+		    height: 22px;
+		    line-height: 22px;
+		    padding: 0 10px;
+		    font-size: 12px;
+		}
+    </style>
+</head>
+<body class="content">
+	<div id="step_demo" class="step-body" style = "margin-top : 20px; margin-left: 10%;">
+	    <div class="step-header" style="width:80%;overflow: hidden;">
+	        <ul>
+	            <li>
+	                <span class="step-name">选择报告/报表</span>
+	            </li>
+	            <li>
+	                <span class="step-name">选择文件</span>
+	            </li>
+	            <li>
+	                <span class="step-name">数据预览</span>
+	            </li>
+	            <li>
+	                <span class="step-name">生成报告/报表</span>
+	            </li>
+	        </ul>
+	    </div>
+	</div>
+	<div class="order-body" style = "width: 80%; margin-left : 10%;height : 450px" name = "step">
+		<form class="layui-form" style = "text-align : center;">
+			<div class="order-select" id="content" style = "background: #FFFFFF;border-radius: 8px;padding: 16px 1.4rem;">
+				<div class="layui-inline" style="margin-top: 150px;">
+					<label class="f12-gray4">请选择文件类型:</label>
+					<div id = "reportTypeDiv" class="layui-inline">
+					</div>
+				</div>
+				<div style="margin-top : 200px;">
+			      <button type="button" class="layui-btn" style = "width : 214px" onclick = "goStep(2)">下一步</button>
+			    </div>
+			</div>
+		</form>
+	</div>
+	<div name = "step" style = "width: 80%; margin-left : 10%;height : 300px; display : none; text-align : center;">
+		<div style = "width: 80%; margin-left : 0px; height : 200px" class = "layui-upload-drag" >
+		  	<input type="text" style = "display : inline-block" class="layui-input" id="dayRange" placeholder="请选择报表日期">
+		  	<input type="text" style = "display : inline-block" class="layui-input" id="dateRange" placeholder="请选择报表日期范围">
+		  	<input type="text" style = "display : inline-block" class="layui-input" id="timeRange" placeholder="请选择报表时间段">
+		  	<p name = "TQTDRB" style = "display : none;"><a id = "monthNum" style = "font-size: 18px; color: red;" onclick = "changeHtml(this)">2</a>个月内停电<a id = "countNum" style = "font-size: 18px; color: red;" onclick = "changeHtml(this)">3</a>次以上的台区数量</p>
+		</div>
+		<div style="margin-top : 50px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "tableYulan()">下一步</button>
+	    </div>
+	</div>
+	<div name = "step" style = "width: 80%; margin-left : 10%; height : 300px; display : none; text-align : center;">
+		<div style = "width: 80%; margin-left : 0px;" class = "layui-upload-drag" >
+		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
+		  <table id = "reportTable" class="layui-table" style = "display : none">
+		  </table>
+		  <p id = "gongjubiao">报表关联的工具表为《<a id = "utilName" onclick = "goUtilDetail(this)">2020年6月底低电压月报工具表</a>》  关联的报表算法为《<a id = "algorithmName" onclick = "goAlgorithmDetail(this)">国网泰安供电公司2020年8月份配网运行分析月报</a>》    的算法</p>
+		  <div id = "reportDiv" style = "display : none;text-align : left;"></div>
+		</div>
+		<div style="margin-top : 50px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "goStep(4)">下一步</button>
+	    </div>
+	</div>
+	<div name = "step" style = "width: 80%; margin-left : 10%;height : 300px; display : none; text-align : center; margin-top : 50px;">
+		<i class="layui-icon layui-icon-ok-circle" style="font-size: 100px; color: #009688;"></i>
+		<p style = "font-weight: 700;font-size: 25px;">报表生成成功!</p>
+		<p style = " color: #b2bbc2;">可在数据仓库-报表管理进行查看</p>
+		<div style="margin-top : 100px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "finish()">完成</button>
+	    </div>
+	</div>
+	
+    <script>
+		var pageId = getQueryString("pageId");
+		var timeType = getQueryString("timeType");// 00日报01周报02月报
+		var reportType = getQueryString("reportType");// 00日报01周报02月报
+		// 日报
+		if (timeType == '00') {
+			$("#dayRange").show();
+			$("#dateRange").hide();
+		// 周报和月报
+		} else {
+			$("#dayRange").hide();
+			$("#dateRange").show();
+		}
+		
+		var $step;
+		layui.config({
+	        base: '../../plugins/layui/lay/modules/steps/'
+	    }).use(['steps','jquery'],function(){
+	    	var $ = layui.$;
+    	    $step = $("#step_demo").step();
+		})
+		
+		layui.use('laydate', function(){
+			var laydate = layui.laydate;
+			// 报告日报日期选择
+			laydate.render({
+				elem : '#dayRange'
+				,format : 'yyyyMMdd'
+				,done: function(value, date, endDate){
+					console.log(value); //得到日期生成的值,如:2017-08-18
+					var fileName = $("#fileName").html();
+					if (fileName.indexOf("-") != -1) {
+						$("#fileName").html(fileName.split("-")[0]+value);
+					} else {
+						$("#fileName").html(fileName+"-" + value);
+					}
+				}
+			});
+			// 报告日期范围选择
+			laydate.render({
+				elem : '#dateRange'
+				,format : 'yyyyMMdd'
+				,range : true
+				,done: function(value, date, endDate){
+					console.log(value); //得到日期生成的值,如:2017-08-18
+					var fileName = $("#fileName").html();
+					if (fileName.indexOf("-") != -1) {
+						$("#fileName").html(fileName.split("-")[0]+value);
+					} else {
+						$("#fileName").html(fileName+"-" + value);
+					}
+				}
+			});
+			//时间范围
+			laydate.render({ 
+			  elem : '#timeRange'
+			  ,type : 'time'
+			  ,format : 'HHmmss'
+			  ,value : '000000 - 235959'
+			  ,range : true
+			});
+		});
+		
+		// 范围类型
+		layui.use('form', function(){
+			var form = layui.form;
+			$.request({
+				action : 'BranchReportTypeAction/branchReportTypeQuery',
+				data : {
+					reportType : reportType
+				},
+				success : function(data) {
+					var html = '<select id = "reportType" lay-filter="reportTypeFilter"><option value = "">请选择</option>';
+					var fileTypeList = data.data;
+					for (var i = 0; i < fileTypeList.length; i ++) {
+						var fileTypeInf = fileTypeList[i];
+						html += '<option value = "' + fileTypeInf.id + '_' + fileTypeInf.type + '_' + fileTypeInf.timeType + '">' + fileTypeInf.name + '</option>';
+					}
+					html += '</select>';
+					$("#reportTypeDiv").html(html);
+					form.render();
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+    	  	});
+			
+			form.on('select(reportTypeFilter)', function(data){
+				var value = data.value;
+				if (!isEmpty(value)) {
+					var reportTypeId = value.split("_")[0];
+					
+					$("#fileName").html(data.elem.selectedOptions[0].text);
+					
+					if (!isEmpty(reportTypeId)) {
+						  $.request({
+								action : 'BranchReportTypeAction/fileTypeOfReportType',
+								data : {
+									reportTypeId : reportTypeId
+								},
+								success : function(data) {
+									fileType = data.data;
+									setTempVal("fileType", fileType);
+									
+									var utilDataInf = data.utilDataInf;
+									if (!isEmpty(utilDataInf)) {
+										$("#utilName").html(utilDataInf.fileName);
+										$("#utilName").attr("fileName", utilDataInf.fileName);
+										setTempVal("utilExcelDataDetail", utilDataInf.excelData);
+										var algorithmInf = data.algorithmInf;
+										if (!isEmpty(algorithmInf)) {
+											$("#algorithmName").html(utilDataInf.fileName+"算法");
+											$("#algorithmName").attr("reportTypeId", reportTypeId);
+										}
+									}
+									
+								},
+								error : function(data2) {
+									$.ErrorAlert(data2.MINErrorMessage);
+								}
+				    	  });
+					  }
+				}
+			});      
+		})
+		
+		function goStep (step) {
+			var reportInf = $("#reportTypeDiv").find("select option:selected").val();
+			
+			var dayRange = $("#dayRange").val();
+			var dateRange = $("#dateRange").val();
+			var timeRange = $("#timeRange").val();
+			if (step == 2) {
+				if (isEmpty(reportInf)) {
+					$.ErrorAlert("请选择上传文件类型!");
+					return;
+				}
+				var reportType = reportInf.split("_")[0];
+				// 台区停电日报
+				if ("TQTDRB" == reportType) {
+					$("body").find("[name='TQTDRB']").show();
+				}
+			}
+			
+			if (step == 4) {
+				var fileName = $("#fileName").html();
+				var range = null;
+				if (timeType == '00') {
+					range = dayRange + "-" + dayRange;
+				} else {
+					range = dateRange;
+				}
+				var monthNum = $("#monthNum").html();
+				var countNum = $("#countNum").html();
+				$.request({
+					action : 'ReportManageAction/fileInfReportSubmit',
+					data : {
+						reportData : JSON.stringify(resJsonStr),
+						reportInf : reportInf,
+						fileName : fileName,
+						range : range,
+						timeRange : timeRange,
+						monthNum : monthNum,
+						countNum : countNum
+					},
+					success : function(data) {
+						if (data.code == 0) {
+							$step.goStep(step);
+							var stepDiv = $("div[name = 'step']");
+							for (var i = 0; i < stepDiv.length; i ++) {
+								if (step == (i + 1)) {
+									$(stepDiv[i]).show();
+								} else {
+									$(stepDiv[i]).hide();
+								}
+							}
+				    	} else {
+				    		$.ErrorAlert(res.MINErrorMessage);
+				    	}
+					},
+					error : function(data2) {
+						$.ErrorAlert(data2.MINErrorMessage);
+					}
+	    	  	});
+				return;
+			}
+			
+			$step.goStep(step);
+			var stepDiv = $("div[name = 'step']");
+			for (var i = 0; i < stepDiv.length; i ++) {
+				if (step == (i + 1)) {
+					$(stepDiv[i]).show();
+				} else {
+					$(stepDiv[i]).hide();
+				}
+			}
+		}
+		
+		function finish() {
+			deleteTabPageParent(pageId); 
+		}
+		
+		// 查看工具表详情
+		function goUtilDetail(t) {
+			var fileName = $(t).attr("fileName");
+			var openPageId = pageId + "-01";
+			openMainTabPage(openPageId, "详情查看", "reprotManage/utilExcelDetail.html?pageId="+openPageId+"&fileName="+chineseUrlEncode(fileName), '', pageId, null);
+		}
+		// 查看算法详情
+		function goAlgorithmDetail(t) {
+			var reportTypeId = $(t).attr("reportTypeId");
+			var openPageId = pageId + "-02";
+			openMainTabPage(openPageId, "详情查看", "reprotManage/reportAlgorithm.html?pageId="+openPageId+"&reportTypeId="+reportTypeId, '', pageId, null);
+		}
+		
+		// 报表返回数据
+		var resJsonStr = null;
+		// 预览
+		function tableYulan() {
+			var reportInf = $("#reportTypeDiv").find("select option:selected").val();
+			var dayRange = $("#dayRange").val();
+			var dateRange = $("#dateRange").val();
+			var timeRange = $("#timeRange").val();
+			
+			// 日报
+			if (timeType == '00') {
+				if (isEmpty(dayRange)) {
+					$.ErrorAlert("请选择报表日期!");
+					return;
+				}
+			} else {
+				if (isEmpty(dateRange)) {
+					$.ErrorAlert("请选择报表日期范围!");
+					return;
+				}
+			}
+			
+			// 日报
+			var range = null;
+			if (timeType == '00') {
+				range = dayRange + "-" + dayRange;
+			} else {
+				range = dateRange;
+			}
+			var monthNum = $("#monthNum").html();
+			var countNum = $("#countNum").html();
+			// 查询符合条件的明细数据,生成预览数据
+			$.request({
+				action : 'ReportManageAction/reportNeedDataDetail',
+				data : {
+					range : range,
+					timeRange : timeRange,
+					reportInf : reportInf,
+					monthNum : monthNum,
+					countNum : countNum
+				},
+				success : function(data) {
+					if (data.code == 0) {
+						// 日报
+						if (timeType == '00') {
+							resJsonStr = data.data.resList;
+							$("#reportDiv").hide();
+							$("#reportTable").show();
+							$("#gongjubiao").show();
+							initExcelData(resJsonStr, "reportTable", false);
+							goStep(3);
+						// 月报 或 周报
+						} else if (timeType == '02' || timeType == '01') {
+							$("#reportTable").hide();
+							$("#gongjubiao").hide();
+							$("#reportDiv").show();
+							resJsonStr = data.data;
+							var dataMap = data.data.dataMap;
+							var descStr = data.data.descStr;
+							console.log(dataMap);
+							console.log(descStr);
+							for(var key in dataMap){
+								var replaceStr = "${" + key + "}";
+								if (key == "totalCountTwice") {
+									descStr = descStr.replace(/\${totalCountTwice}/g, dataMap[key]);
+								} else {
+									descStr = descStr.replace(replaceStr, dataMap[key]);
+								}
+								
+							}
+							
+							$("#reportDiv").html(descStr);
+							
+							var tableHtml = '<table class="layui-table">';
+							// 周报
+							if (timeType == '01') {
+								var excelList = data.data.excelList;
+								for (var i = 0; i < excelList.length; i ++) {
+									tableHtml += '<tr>';
+									var childList = excelList[i];
+									for (var j = 0; j < childList.length; j ++) {
+										tableHtml += '<td>' + childList[j] + '</td>';
+									}
+									tableHtml += '</tr>';
+								}
+							}
+							tableHtml += '</table>';
+							$("#reportDiv").append(tableHtml);
+							goStep(3);
+						}
+						
+			    	} else {
+			    		$.ErrorAlert(res.MINErrorMessage);
+			    	}
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+    	  	});
+		}
+		
+		function changeHtml(t) {
+			var initValue = $(t).html();
+			layer.prompt({
+					formType: 2,
+					value: initValue,
+					title: '请输入',
+					area: ['200px', '33px'] //自定义文本域宽高
+				}, 
+				function(value, index, elem){
+					$(t).html(value);
+					layer.close(index);
+				}
+			);
+		}
+    </script>
+</body>
+
+</html>

+ 16 - 1
src/main/webapp/admin/reprotManage/dataWareDetail.html

@@ -123,7 +123,22 @@
 			      ,{field: 'ejfl', title: '二级分类'}
 			      ,{field: 'ywzl', title: '业务子类'}
 			    ]];
-	}
+	}else if("1000007" == fileType){
+        cols = [[
+             {field: 'no', title: '序号'}
+            ,{field: 'type', title: '类型'}
+            ,{field: 'unit', title: '单位'}
+            ,{field: 'device', title: '设备名称'}
+            ,{field: 'time', title: '发生时间'}
+            ,{field: 'eventtype', title: '事项类型'}
+            ,{field: 'fa', title: '馈线自动化动作情况(FA)'}
+            ,{field: 'triptype', title: '跳闸类型'}
+            ,{field: 'cause', title: '故障原因'}
+            ,{field: 'chzdzqk', title: '重合闸动作情况'}
+            ,{field: 'handle', title: '处理纪事'}
+            ,{field: 'errobrief', title: '异常概况'}
+        ]];
+    }
 	
      var table;
      layui.use('table', function(){

+ 47 - 0
src/main/webapp/admin/reprotManage/dataWareUpload.html

@@ -320,6 +320,53 @@
 			</tr>
 		</table>
 	</div>
+	<div id = "tableDemo1000007" name = "tableDiv" style = "display : none; margin: 10px;">
+		<p style = "font-weight: 700;">表格示例</p>
+		<p>1、请上传有标准行列的一组数据</p>
+		<p>2、日期字段需包含年月日(如:2020/08/08)或年月日时分(如:2020/08/08 00:00:00)</p>
+		<table class="layui-table">
+			<tr>
+				<td>序号</td>
+				<td>类型</td>
+				<td>单位</td>
+				<td>设备名称</td>
+				<td>发生时间</td>
+				<td>事项类型</td>
+				<td>馈线自动化动作情况(FA)</td>
+				<td>跳闸类型</td>
+				<td>故障原因</td>
+				<td>重合闸动作情况</td>
+				<td>处理纪事</td>
+				<td>异常概况</td>
+			</tr>
+			<tr>
+				<td>1</td>
+				<td>计停</td>
+				<td>景区供电中心</td>
+				<td>中天门站:10kV岱顶线</td>
+				<td>2012-03-13 17:59:07</td>
+				<td>跳闸</td>
+				<td>主线跳闸</td>
+				<td>用户进线电缆施工损伤,造成AC相间短路跳闸</td>
+				<td>未投重合闸</td>
+				<td>配电自动化显示:北上高站:10kV汉明线创业支07-01D开关跳闸</td>
+				<td>指挥支线天泰文化旅游发展用户箱变电缆进水</td>
+			</tr>
+			<tr>
+				<td>2</td>
+				<td>非计停</td>
+				<td>景区供电中心</td>
+				<td>中天门站:10kV岱顶线</td>
+				<td>2012-03-13 17:59:07</td>
+				<td>跳闸</td>
+				<td>主线跳闸</td>
+				<td>用户进线电缆施工损伤,造成AC相间短路跳闸</td>
+				<td>未投重合闸</td>
+				<td>配电自动化显示:北上高站:10kV汉明线创业支07-01D开关跳闸</td>
+				<td>指挥支线天泰文化旅游发展用户箱变电缆进水</td>
+			</tr>
+		</table>
+	</div>
 	
     <script>
 		var pageId = getQueryString("pageId");