归档系统1.1(最新提交)

master
hujl 6 years ago
parent 1f55229777
commit 3982ccdb04

@ -0,0 +1,14 @@
<component name="ArtifactManager">
<artifact type="war" name="emr_record:war">
<output-path>$PROJECT_DIR$/target</output-path>
<properties id="maven-jee-properties">
<options>
<module>emr_record</module>
<packaging>war</packaging>
</options>
</properties>
<root id="archive" name="emr_record-1.0-SNAPSHOT.war">
<element id="artifact" artifact-name="emr_record:war exploded" />
</root>
</artifact>
</component>

@ -0,0 +1,114 @@
<component name="ArtifactManager">
<artifact type="exploded-war" name="emr_record:war exploded">
<output-path>$PROJECT_DIR$/target/emr_record-1.0-SNAPSHOT</output-path>
<properties id="maven-jee-properties">
<options>
<exploded>true</exploded>
<module>emr_record</module>
<packaging>war</packaging>
</options>
</properties>
<root id="root">
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
<element id="module-output" name="emr_record" />
</element>
<element id="directory" name="lib">
<element id="library" level="project" name="Maven: org.apache.commons:commons-lang3:3.3.2" />
<element id="library" level="project" name="Maven: commons-io:commons-io:1.3.2" />
<element id="library" level="project" name="Maven: commons-net:commons-net:3.3" />
<element id="library" level="project" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" />
<element id="library" level="project" name="Maven: commons-beanutils:commons-beanutils:1.8.0" />
<element id="library" level="project" name="Maven: commons-collections:commons-collections:3.2.1" />
<element id="library" level="project" name="Maven: commons-lang:commons-lang:2.5" />
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.1" />
<element id="library" level="project" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.4" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpclient:4.5.1" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore:4.4.3" />
<element id="library" level="project" name="Maven: org.slf4j:slf4j-log4j12:1.6.4" />
<element id="library" level="project" name="Maven: org.slf4j:slf4j-api:1.6.4" />
<element id="library" level="project" name="Maven: log4j:log4j:1.2.16" />
<element id="library" level="project" name="Maven: org.mybatis:mybatis:3.2.8" />
<element id="library" level="project" name="Maven: org.mybatis:mybatis-spring:1.2.2" />
<element id="library" level="project" name="Maven: com.github.miemiedev:mybatis-paginator:1.2.15" />
<element id="library" level="project" name="Maven: com.github.pagehelper:pagehelper:5.0.0" />
<element id="library" level="project" name="Maven: com.github.jsqlparser:jsqlparser:0.9.5" />
<element id="library" level="project" name="Maven: mysql:mysql-connector-java:5.1.32" />
<element id="library" level="project" name="Maven: com.alibaba:druid:1.0.9" />
<element id="library" level="project" name="Maven: org.springframework:spring-context:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-aop:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-core:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-jcl:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-expression:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-beans:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-webmvc:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-web:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-jdbc:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-aspects:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-tx:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-test:5.0.2.RELEASE" />
<element id="library" level="project" name="Maven: org.aspectj:aspectjweaver:1.8.13" />
<element id="library" level="project" name="Maven: org.aspectj:aspectjrt:1.8.13" />
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.9" />
<element id="library" level="project" name="Maven: org.bouncycastle:bcprov-jdk16:1.46" />
<element id="library" level="project" name="Maven: javax.mail:mail:1.4.5" />
<element id="library" level="project" name="Maven: javax.activation:activation:1.1" />
<element id="library" level="project" name="sqlserver" />
<element id="library" level="project" name="Maven: commons-dbutils:commons-dbutils:1.4" />
<element id="library" level="project" name="Maven: jstl:jstl:1.2" />
<element id="library" level="project" name="Maven: javax.servlet:servlet-api:2.5" />
<element id="library" level="project" name="Maven: javax.servlet:jsp-api:2.0" />
<element id="library" level="project" name="Maven: commons-fileupload:commons-fileupload:1.3.1" />
<element id="library" level="project" name="Maven: redis.clients:jedis:2.7.2" />
<element id="library" level="project" name="Maven: org.apache.commons:commons-pool2:2.3" />
<element id="library" level="project" name="Maven: org.apache.shiro:shiro-spring:1.2.2" />
<element id="library" level="project" name="Maven: org.apache.shiro:shiro-ehcache:1.2.2" />
<element id="library" level="project" name="Maven: net.sf.ehcache:ehcache-core:2.5.0" />
<element id="library" level="project" name="Maven: org.apache.shiro:shiro-core:1.2.2" />
<element id="library" level="project" name="Maven: org.apache.shiro:shiro-web:1.2.2" />
<element id="library" level="project" name="Maven: com.mchange:c3p0:0.9.5-pre6" />
<element id="library" level="project" name="Maven: com.mchange:mchange-commons-java:0.2.6.3" />
<element id="library" level="project" name="Maven: org.postgresql:postgresql:9.2-1004-jdbc4" />
<element id="library" level="project" name="Maven: taglibs:standard:1.1.2" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpmime:4.5.5" />
<element id="library" level="project" name="Maven: org.jdom:jdom:1.1" />
<element id="library" level="project" name="Maven: org.apache.maven.plugins:maven-resources-plugin:3.1.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-plugin-api:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-artifact:3.0" />
<element id="library" level="project" name="Maven: org.sonatype.sisu:sisu-inject-plexus:1.4.2" />
<element id="library" level="project" name="Maven: org.sonatype.sisu:sisu-inject-bean:1.4.2" />
<element id="library" level="project" name="Maven: org.sonatype.sisu:sisu-guice:noaop:2.1.7" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-core:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-settings:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-settings-builder:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-repository-metadata:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-model-builder:3.0" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-aether-provider:3.0" />
<element id="library" level="project" name="Maven: org.sonatype.aether:aether-impl:1.7" />
<element id="library" level="project" name="Maven: org.sonatype.aether:aether-spi:1.7" />
<element id="library" level="project" name="Maven: org.sonatype.aether:aether-api:1.7" />
<element id="library" level="project" name="Maven: org.sonatype.aether:aether-util:1.7" />
<element id="library" level="project" name="Maven: org.codehaus.plexus:plexus-classworlds:2.2.3" />
<element id="library" level="project" name="Maven: org.codehaus.plexus:plexus-component-annotations:1.5.5" />
<element id="library" level="project" name="Maven: org.sonatype.plexus:plexus-sec-dispatcher:1.3" />
<element id="library" level="project" name="Maven: org.sonatype.plexus:plexus-cipher:1.4" />
<element id="library" level="project" name="Maven: org.apache.maven:maven-model:3.0" />
<element id="library" level="project" name="Maven: org.codehaus.plexus:plexus-utils:3.1.0" />
<element id="library" level="project" name="Maven: org.apache.maven.shared:maven-filtering:3.1.1" />
<element id="library" level="project" name="Maven: org.apache.maven.shared:maven-shared-utils:3.0.0" />
<element id="library" level="project" name="Maven: com.google.code.findbugs:jsr305:2.0.1" />
<element id="library" level="project" name="Maven: org.sonatype.plexus:plexus-build-api:0.0.7" />
<element id="library" level="project" name="Maven: org.codehaus.plexus:plexus-interpolation:1.24" />
</element>
</element>
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/target/emr_record-1.0-SNAPSHOT/META-INF/MANIFEST.MF" />
</element>
<element id="javaee-facet-resources" facet="emr_record/web/Web" />
</root>
</artifact>
</component>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="EMR_Medical_Record" />
<module name="emr_record" />
</profile>
</annotationProcessing>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8" addBOMForNewFiles="with NO BOM">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java/com/emr/controller/MedicalRecallController.java" charset="UTF-8" />
</component>
</project>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
<type id="Spring" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
Subproject commit 5d84257f6190cbf55865d20961fd0e61db5968af

@ -0,0 +1,5 @@
Manifest-Version: 1.0
Built-By: Administrator
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_102

@ -0,0 +1,583 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>com.emr</groupId>
<artifactId>emr_medical_record</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>emr_medical_record Maven Webapp</name>
<url>http://www.example.com</url>
<properties>
<!-- begin 全局设置,被子工程继承 -->
<skipTest>true</skipTest>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 跳过 必须依赖正式版本的检查 -->
<skipRequireRelease>true</skipRequireRelease>
<!-- begin 框架版本 -->
<framework.version>1.0.0</framework.version>
<!-- end -->
<!-- begin 其它第三方开源版本定义 -->
<portable.maven.version>1.1.5</portable.maven.version>
<junit.version>4.12</junit.version>
<jdk.version>1.8</jdk.version>
<mockito.version>1.9.5</mockito.version>
<!--<spring.version>3.2.2.RELEASE</spring.version>-->
<shiro.version>1.2.2</shiro.version>
<quartz.version>2.2.1</quartz.version>
<jetty.version>7.6.11.v20130520</jetty.version>
<servlet.version>2.4</servlet.version>
<jsp.version>2.1</jsp.version>
<jstl.version>1.2</jstl.version>
<c3p0.version>0.9.5.2</c3p0.version>
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
<postgresql.version>9.2-1004-jdbc4</postgresql.version>
<activiti.version>5.17.0</activiti.version>
<groovy.version>2.3.6</groovy.version>
<aliyun-sdk-oss.version>2.2.1</aliyun-sdk-oss.version>
<alipay-sdk.version>1.1.1</alipay-sdk.version>
<bropen-api.version>3.5.0</bropen-api.version>
<spring.version>5.0.2.RELEASE</spring.version>
<mybatis.version>3.2.8</mybatis.version>
<mybatis.spring.version>1.2.2</mybatis.spring.version>
<mybatis.paginator.version>1.2.15</mybatis.paginator.version>
<mysql.version>5.1.32</mysql.version>
<slf4j.version>1.6.4</slf4j.version>
<json-lib.version>2.4</json-lib.version>
<jackson.version>2.9.4</jackson.version>
<druid.version>1.0.9</druid.version>
<httpclient.version>4.3.5</httpclient.version>
<servlet-api.version>2.5</servlet-api.version>
<jsp-api.version>2.0</jsp-api.version>
<joda-time.version>2.5</joda-time.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<commons-io.version>1.3.2</commons-io.version>
<commons-net.version>3.3</commons-net.version>
<pagehelper.version>5.1.8</pagehelper.version>
<jsqlparser.version>0.9.1</jsqlparser.version>
<commons-fileupload.version>1.3.1</commons-fileupload.version>
<jedis.version>2.7.2</jedis.version>
<solrj.version>4.10.3</solrj.version>
<aspectj.version>1.8.13</aspectj.version>
<aspectjrt.version>1.8.13</aspectjrt.version>
<image2pdf.version>2.1.7</image2pdf.version>
<cxf.version>3.1.8</cxf.version>
<poi.version>3.9</poi.version>
</properties>
<!-- maven依赖 -->
<dependencies>
<!-- Apache工具组件 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net.version}</version>
</dependency>
<!--json-->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>${json-lib.version}</version>
<classifier>jdk15</classifier>
</dependency>
<!-- Jackson Json处理工具包 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<!-- 单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- 日志处理 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis.spring.version}</version>
</dependency>
<dependency>
<groupId>com.github.miemiedev</groupId>
<artifactId>mybatis-paginator</artifactId>
<version>${mybatis.paginator.version}</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>${pagehelper.version}</version>
</dependency>
<!-- MySql -->
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<version>${mysql.version}</version>-->
<!--</dependency>-->
<!--sqlserver-->
<!--<dependency>-->
<!--<groupId>com.microsoft.sqlserver</groupId>-->
<!--<artifactId>sqljdbc4</artifactId>-->
<!--<version>4.0</version>-->
<!--</dependency>-->
<!-- 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<!-- Hex -->
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
<!-- 导入DES对称加密包 -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<!-- Java Mail邮件 -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.4</version>
</dependency>
<!-- JSP相关 -->
<!-- jsTree -->
<!-- <dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>jstree</artifactId>
<version>3.3.4</version>
</dependency>-->
<!-- https://mvnrepository.com/artifact/commons-dbutils/commons-dbutils -->
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.4</version>
</dependency>
<!-- 引入pageHelper分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>${jsp-api.version}</version>
</dependency>
<!-- 文件上传组件 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload.version}</version>
</dependency>
<!-- Redis客户端 -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<!-- solr客户端 -->
<!--<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${solrj.version}</version>
</dependency>-->
<!-- OpenSDK中转CGI接口后台接口:经由 opensdk 确认登记后,才可以进行上报 -->
<!-- <dependency>
<groupId>com.manage</groupId>
<artifactId>framework-open-sdk</artifactId>
<version>${framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
-->
<!-- SECURITY begin :进行用户认证以及授予权限的时候,通过各种各样的拦截器来控制权限的访问,从而实现安全 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- SECURITY end -->
<!-- 工作流 -->
<!--<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-layout</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>${activiti.version}</version>
</dependency>-->
<!--实现任务调度-->
<!--<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>${quartz.version}</version>
</dependency>-->
<!-- groovy脚本引擎 -->
<!--<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>-->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>${c3p0.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<!--json-->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>${json-lib.version}</version>
<classifier>jdk15</classifier>
</dependency>
<!-- Jackson Json处理工具包 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!--简化单元测试的书写-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- 使用JDOM操作XML-->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<!--客户端发送Http请求变得容易而且也方便了开发人员测试接口-->
<!--<dependency>-->
<!--<groupId>org.apache.httpcomponents</groupId>-->
<!--<artifactId>httpclient</artifactId>-->
<!--<version>4.5.1</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.mybatis.generator</groupId>-->
<!--<artifactId>mybatis-generator-core</artifactId>-->
<!--<version>1.3.5</version>-->
<!--</dependency>-->
<!--简化单元测试的书写-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!--非web项目实现文件下载使用apache的httpmime工具进行相关的http请求操作-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.5</version>
</dependency>
<!-- 使用JDOM操作XML-->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</dependency>
<!--apache poi-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!--图片转pdf-->
<dependency>
<groupId>org.eclipse.birt.runtime.3_7_1</groupId>
<artifactId>com.lowagie.text</artifactId>
<version>${image2pdf.version}</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.7</version>
</dependency>
<!--webService-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.50</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.12</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 资源文件拷贝插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- java编译插件 -->
<plugin>
<!-- 指定maven编译的jdk版本,如果不指定,maven3默认用jdk 1.5 maven2默认用jdk1.3 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- 一般而言target与source是保持一致的但是有时候为了让程序能在其他版本的jdk中运行(对于低版本目标jdk源代码中不能使用低版本jdk中不支持的语法)会存在target不同于source的情况 -->
<source>1.8</source> <!-- 源代码使用的JDK版本 -->
<target>1.8</target> <!-- 需要生成的目标class文件的编译版本 -->
<encoding>UTF-8</encoding><!-- 字符集编码 -->
<verbose>true</verbose>
<showWarnings>true</showWarnings>
<fork>true</fork><!-- 要使compilerVersion标签生效还需要将fork设为true用于明确表示编译版本配置的可用 -->
<executable><!-- path-to-javac --></executable><!-- 使用指定的javac命令例如<executable>${JAVA_1_4_HOME}/bin/javac</executable> -->
<!--<compilerVersion>1.3</compilerVersion>--><!-- 指定插件将使用的编译器的版本 -->
<meminitial>128m</meminitial><!-- 编译器使用的初始内存 -->
<maxmem>512m</maxmem><!-- 编译器使用的最大内存 -->
<!-- <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> 这个选项用来传递编译器自身不包含但是却支持的参数选项 -->
</configuration>
</plugin>
<!-- mybatis-generator自动生成代码插件 -->
<!--<plugin>-->
<!--<groupId>org.mybatis.generator</groupId>-->
<!--<artifactId>mybatis-generator-maven-plugin</artifactId>-->
<!--<version>1.3.5</version>-->
<!--<configuration>-->
<!--<verbose>true</verbose>-->
<!--<overwrite>false</overwrite>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
<!--<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>-->
</build>
</project>

@ -0,0 +1,13 @@
package com.emr.annotation;
import java.lang.annotation.*;
/**
*
*/
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OptionalLog {
String methods() default "";
}

@ -0,0 +1,127 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/9 16:12
* Description:
*/
package com.emr.controller;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.Emr_Fault_Type;
import com.emr.service.Emr_DictionaryService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/dictionary")
public class DictionaryController {
@Autowired
private Emr_DictionaryService emrDictionaryService;
@RequestMapping(value = "/dictionarys")
public String inHospitals(Model model) {
return "dictionaryDir/dictionary";
}
@ResponseBody
@RequestMapping(value = "/dicList")
public List<Emr_Dictionary> dicList(HttpServletRequest request, HttpServletResponse response, Emr_Dictionary emrDictionary) {
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(emrDictionary);
return list;
}
@ResponseBody
@RequestMapping(value = "/delById")
public int delById(HttpServletRequest request, HttpServletResponse response, Integer id) {
int bol = 0;
if (id != null) {
//删除
bol = emrDictionaryService.delById(id);
}
return bol;
}
@ResponseBody
@RequestMapping(value = "/saveInfo")
public String saveInfo(HttpServletRequest request, HttpServletResponse response, Emr_Dictionary emrDictionary) {
String result="";
int bol=0;
Emr_Dictionary dic2 = new Emr_Dictionary();
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
if(emrDictionary.getId()!=null){
//判断类别代码或代码是否已经存在
//存在修改
emrDictionary.setUpdater(username);
emrDictionary.setUpdateTime(nowTime);
bol=emrDictionaryService.updateCloById(emrDictionary);
if (bol == 1) {
result = "修改成功!";
} else {
result = "修改失败!";
}
}else{
emrDictionary.setCreater(username);
emrDictionary.setCreateTime(nowTime);
//判断类别代码或代码是否已经存在
if(emrDictionary.getCode()!=null && emrDictionary.getCode()!=""){
dic2.setCode(emrDictionary.getCode());
dic2.setParentId(emrDictionary.getParentId());
//根据代码查询该父类下是否存在是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if(list.size()<=0){
//添加叶子
bol = emrDictionaryService.insertSel(emrDictionary);
if(bol==1){
result = "添加成功!";
}else{
result = "添加失败!";
}
}else{
result="代码已存在!";
}
}else{
dic2.setTypecode(emrDictionary.getTypecode());
//根据代码查询是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if (list.size() <= 0) {
//emrDictionary.setEffective(1);
//添加类别
bol = emrDictionaryService.insertSel(emrDictionary);
if (bol == 1) {
result = "添加成功!";
} else {
result = "添加失败!";
}
} else {
result = "代码已存在!";
}
}
}
return result;
}
}

@ -0,0 +1,180 @@
package com.emr.controller;
import com.emr.annotation.OptionalLog;
import com.emr.entity.Emr_Log;
import com.emr.service.LogService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
*
*/
@Aspect
@Component
public class LogAopAction {
// 注入service,用来将日志信息保存在数据库
@Resource
private LogService logService;
// 配置接入点即为所要记录的action操作目录
@Pointcut("@annotation(com.emr.annotation.OptionalLog)")
private void controllerAspect() {
}
@Around("controllerAspect()")
public Object around(ProceedingJoinPoint pjp) throws Throwable {
//日志实体对象
Emr_Log logBo = new Emr_Log();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
logBo.setCreater(username);
// 获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm");
logBo.setCreateDate(fmt.format(new Date()));
// 获取访问真实IP
String ipAddress = request.getHeader("x-forwarded-for");
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("WL-Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getRemoteAddr();
if(ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")){
//根据网卡取本机配置的IP
InetAddress inet=null;
try {
inet = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
ipAddress= inet.getHostAddress();
}
}
//对于通过多个代理的情况第一个IP为客户端真实IP,多个IP按照','分割
if(ipAddress!=null && ipAddress.length()>15){ //"***.***.***.***".length() = 15
if(ipAddress.indexOf(",")>0){
ipAddress = ipAddress.substring(0,ipAddress.indexOf(","));
}
}
logBo.setIp(ipAddress);
// 拦截的实体类就是当前正在执行的controller
Object target = pjp.getTarget();
// 拦截的方法名称。当前正在执行的方法
String methodName = pjp.getSignature().getName();
// 拦截的方法参数
Object[] args = pjp.getArgs();
//获取请求路径
String actionUrl = request.getRequestURI();
// 拦截的放参数类型
Signature sig = pjp.getSignature();
MethodSignature msig = null;
if (!(sig instanceof MethodSignature)) {
throw new IllegalArgumentException("该注解只能用于方法");
}
msig = (MethodSignature) sig;
Class[] parameterTypes = msig.getMethod().getParameterTypes();
Object object = null;
// 获得被拦截的方法
Method method = null;
try {
method = target.getClass().getMethod(methodName, parameterTypes);
} catch (NoSuchMethodException e1) {
e1.printStackTrace();
} catch (SecurityException e1) {
e1.printStackTrace();
}
if (null != method) {
// 获取方法(此为自定义注解)
OptionalLog op = method.getAnnotation(OptionalLog.class);
// 获取注解的methods 设为执行方法
logBo.setLogContent(op.methods());
// 将上面获取到的请求路径 设为请求路径
//logBo.setActionurl(actionUrl);
try {
object = pjp.proceed();
//接受客户端的数据
Map<String,String[]> map = request.getParameterMap();
// 解决获取参数乱码
Map<String,String[]> newmap = new HashMap<String,String[]>();
for(Map.Entry<String, String[]> entry : map.entrySet()){
String name = entry.getKey();
String values[] = entry.getValue();
if(values==null){
newmap.put(name, new String[]{});
continue;
}
String newvalues[] = new String[values.length];
for(int i=0; i<values.length;i++){
String value = values[i];
value = new String(value.getBytes("iso8859-1"),request.getCharacterEncoding());
newvalues[i] = value; //解决乱码后封装到Map中
}
newmap.put(name, newvalues);
}
logBo.setLogTitle(request.getParameter("id"));
logBo.setSysFlag("EMR_Medical_Record");
// 添加到数据库
logService.insert(logBo);
} catch (Throwable e) {
//接受客户端的数据
Map<String,String[]> map = request.getParameterMap();
// 解决获取参数乱码
Map<String,String[]> newmap = new HashMap<String,String[]>();
for(Map.Entry<String, String[]> entry : map.entrySet()){
String name = entry.getKey();
String values[] = entry.getValue();
if(values==null){
newmap.put(name, new String[]{});
continue;
}
String newvalues[] = new String[values.length];
for(int i=0; i<values.length;i++){
String value = values[i];
value = new String(value.getBytes("iso8859-1"),request.getCharacterEncoding());
newvalues[i] = value; //解决乱码后封装到Map中
}
newmap.put(name, newvalues);
}
logBo.setLogTitle(request.getParameter("id"));
logBo.setSysFlag("EMR_Medical_Record");
//添加到数据库
logService.insert(logBo);
}
}
return object;
}
}

@ -0,0 +1,74 @@
package com.emr.controller;
import com.alibaba.fastjson.JSONObject;
import com.emr.util.ActionScopeUtils;
import com.emr.util.HttpClientUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* @author HJL
* @create 2019/4/29
*/
@Controller
public class LoginController {
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Value("${POWER_JSP}")
private String POWER_JSP;
@Value("${powerUrl}")
private String powerUrl;
@RequestMapping(value = "/toLogin")
public String toLogin(Model model) {
// 从session获取用户名
// Subject currentUser = SecurityUtils.getSubject();
// Session session = currentUser.getSession();
// session.removeAttribute("username");
// session.removeAttribute("menuList");
// session.removeAttribute("userSession");
//session.invalidate();
return "redirect:/login.jsp";
}
//实现用户登录@PathVariable("username")
@RequestMapping(value = "/login")
public String login(Model model, HttpServletRequest request) {
String token = request.getParameter("token");
String userName = request.getParameter("userName");
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
model.addAttribute("POWER_URLHEAD", POWER_JSP);
request.getSession().setAttribute("token", token);
request.getSession().setAttribute("userName", userName);
return "index";
}
@RequestMapping(value = "/index")
public String Login(HttpServletRequest request, Model model) {
return "index";
}
}

@ -0,0 +1,128 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.annotation.OptionalLog;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.LogService;
import com.emr.util.ExportExcelUtil;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@PropertySource(value = "classpath:config/jdbc.properties", encoding = "UTF-8")
@Controller
@RequestMapping("/medicalRecall")
public class MedicalRecallController {
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private Archive_MasterService archiveMasterService;
@Value("${recallReason}")
private String recallReason;
@RequestMapping(value = "/recall")
public String recall(Model model) {
return "medicalRecallDir/medicalRecallList";
}
@ResponseBody
@RequestMapping(value = "/recallList")
public OffsetLimitPage recallList(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
OffsetLimitPage result = emrFaultDetailService.selectByCol(emrFaultVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Emr_Fault_Vo emrFaultVo) throws Exception {
String tableThNames = "ID,病历清单id,住院号,住院次数,名字,性别,身份证,入院科室,入院日期,出院科室,出院日期,状态,归档状态";
String fieldCns = "id,archiveDetailId,inpNo,visitId,name,sex,idNo,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,state,archivestate";
//构造excel的数据
List<Emr_Fault_Vo> list = emrFaultDetailService.selectByCol(emrFaultVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
for (int i = 0; i < list.size(); i++) {
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
if (deptName.equals(dicList.get(k).getCode())) {
//出院科室
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
//入院科室dept_admission_to
deptName = list.get(i).getDeptAdmissionTo();
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(deptName);
}
}
}
//文件名
String fileName = "召回信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@OptionalLog(methods = "病案召回")
@ResponseBody
@RequestMapping(value = "/updateState")
public int updateState(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
emrFaultDetail.setUpdater(username);
SimpleDateFormat from1=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
emrFaultDetail.setUpdateTime(from1.format(new Date()));
if(emrFaultDetail.getRecallReason()==null ||emrFaultDetail.getRecallReason()==""){
emrFaultDetail.setRecallReason(recallReason);
}
//emrFaultDetail.setRecallReason("医院需要这份病案");
Archive_Master archiveMaster=new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate("初审");
int bol=archiveMasterService.updateByClo(archiveMaster);
emrFaultDetail.setArchiveDetailId(null);
if(bol==1){
bol = emrFaultDetailService.updateCloByPrimaryKey(emrFaultDetail);
}else{
bol=0;
}
return bol;
}
}

@ -0,0 +1,64 @@
package com.emr.controller;
import com.emr.entity.Paper;
import com.emr.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;
/**
* @Author:hjl
* @Date:Creatid in 15:49 2019/4/6
* @Description:
*/
@Controller
@RequestMapping("/paper")
public class PaperController {
@Autowired
private PaperService paperService;
@RequestMapping("/allPaper")
public String list(Model model) {
List<Paper> list = paperService.queryAllPaper();
model.addAttribute("list", list);
return "paperDir/papeList";
}
@RequestMapping("toAddPaper")
public String toAddPaper() {
return "paperDir/addPaper";
}
@RequestMapping("/addPaper")
public String addPaper(Paper paper) {
paperService.addPaper(paper);
return "redirect:/paper/allPaper";
}
@RequestMapping("/del/{paperId}")
public String deletePaper(@PathVariable("paperId") Long id) {
paperService.deletePaperById(id);
return "redirect:/paper/allPaper";
}
@RequestMapping("toUpdatePaper")
public String toUpdatePaper(Model model, Long id) {
model.addAttribute("paper", paperService.queryById(id));
return "paperDir/updatePaper";
}
@RequestMapping("/updatePaper")
public String updatePaper(Model model, Paper paper) {
paperService.updatePaper(paper);
paper = paperService.queryById(paper.getPaperId());
model.addAttribute("paper", paper);
return "redirect:/paper/allPaper";
}
}

@ -0,0 +1,47 @@
package com.emr.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @Author:hjl
* @Date:Creatid in 1:28 2019/4/17
* @Description:
*/
@Controller
@RequestMapping("/menuPower")
public class Power_MenuController {
// @Autowired
// private Power_MenuService powerMenuService;
//
// @Autowired
// private Power_UserService powerUserService;
//
//
// @RequestMapping("/powerMenuList")
// @ResponseBody
// public Msg list() {
// List<Power_Menu> list = powerMenuService.queryAllPowerMenu();
// return Msg.success().add("list",list);
// }
//
// @RequestMapping("/indexMenu")
// @ResponseBody
// public Msg indexMenu() {
// Power_User user = (Power_User) ActionScopeUtils.getSessionAttribute( Constant.CURRENT_USER);
// List<Power_Menu> list = null;
// List<Power_Detailed_Menu> menuList = null;
// List<Power_Menu_User> listPower = null;
// if (user.getRoleId().equals(0)) {
// list = powerMenuService.queryAllPowerMenu();
// return Msg.success().add("listRole", list);
// } else if(user.getRoleId().equals(-100)){
// listPower = powerMenuService.queryPoswerMenuByUserId(user.getUserId());
// return Msg.success().add("listPower", listPower);
// } else{
// menuList = powerMenuService.queryMenuViewByUserId(user.getUserId());
// return Msg.success().add("listUser", menuList);
// }
// }
}

@ -0,0 +1,151 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/10 17:09
* Description:
*/
package com.emr.controller;
import com.emr.service.Archive_DetailService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
@Controller
@RequestMapping(value = "/Upload")
public class UploadFilesController {
@Autowired
private Archive_DetailService archiveDetailService;
private Logger logger = Logger.getLogger(UploadFilesController.class);
/**
* app
*
* @param
* @return
* @throws IOException
*/
@RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
public void uploadImg(HttpServletResponse resp, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
resp.setContentType("text/json");
resp.setCharacterEncoding("utf-8");
String masterID = request.getParameter("masterID");
String assortID = request.getParameter("assortID");
PrintWriter pw = null;
pw = resp.getWriter();
if (!file.isEmpty()) {
logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
type = fileName.indexOf(".") != -1 ? fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : null;
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("PDF".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = String.valueOf(System.currentTimeMillis()) + fileName;
// 设置存放图片文件的路径
path = realPath + "/static/img/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
//2、根据申请单的标志查询出父级id
// int parentId=emrPictureService.selectByTypeflag("applyImg").get(0).getId();
// //2、将其路径及文件名类型、申请id以及参数保存图片相关信息到图片表
// Emr_Picture obj=new Emr_Picture();
// obj.setRelationId(seqId);
// obj.setMaxPicture("/static/img/uploads/" + trueFileName);
// obj.setPictureSort(seqId);
// obj.setEffective(1);
// obj.setParentId(parentId);
// obj.setCreater(userId);
// obj.setUpdater(userId);
// SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String nowTime = format1.format(new Date());
// obj.setCreateTime(nowTime);
// obj.setUpdateTime(nowTime);
// int bol= emrPictureService.insert(obj);
// JSONObject json = JSONObject.fromObject(obj);
// if(bol==1){
// pw.print(json.toString());
// }else{
// pw.print("保存图片信息失败");
// }
} else {
logger.info("不是PDF文件类型,请按要求重新上传");
pw.print("文件类型有误,请重新上传");
}
} else {
logger.info("文件类型为空");
pw.print("文件类型为空");
}
} else {
logger.info("没有找到相对应的文件");
pw.print("没有找到相对应的文件");
}
pw.flush();
}
@ResponseBody
@RequestMapping("upload")
public String upload(HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
System.out.println("执行upload");
request.setCharacterEncoding("UTF-8");
logger.info("执行图片上传");
String userId = request.getParameter("userId");
logger.info("userId:" + userId);
if (!file.isEmpty()) {
logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
type = fileName.indexOf(".") != -1 ? fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : null;
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("GIF".equals(type.toUpperCase()) || "PNG".equals(type.toUpperCase()) || "JPG".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = String.valueOf(System.currentTimeMillis()) + fileName;
// 设置存放图片文件的路径
path = realPath + "/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
} else {
logger.info("不是我们想要的文件类型,请按要求重新上传");
return "error";
}
} else {
logger.info("文件类型为空");
return "error";
}
} else {
logger.info("没有找到相对应的文件");
return "error";
}
return "success";
}
}

@ -0,0 +1,98 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/22 13:49
* Description:
*/
package com.emr.controller;
import com.emr.entity.Power_User;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class UrlInterceptor implements HandlerInterceptor {
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Value("${powerUrl}")
private String powerUrl;
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
// String url = request.getServletPath();
// String token = "";
// if (!"/login".equals(url) && StringUtils.isNoneBlank(token)) {
// token = (String) request.getSession().getAttribute("token");
// if (StringUtils.isNoneBlank(token)) {
// JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
// Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
// Object[] objects = new Object[0];
// Power_User powerUser = new Power_User();
// try {
// objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
// ObjectMapper mapper = new ObjectMapper();
// powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
// UsernamePasswordToken userToken = new UsernamePasswordToken(powerUser.getUserName(), "123456");
// Subject subject = SecurityUtils.getSubject();
// subject.login(userToken);
// //设置进session
// request.getSession().setAttribute("CURRENT_USER", powerUser);
//
// if (null == powerUser.getUserId()) {
// response.sendRedirect(POWER_URLHEAD + "/login");
// return false;
// }
//
//
// } catch (Exception e) {
// e.printStackTrace();
// response.sendRedirect(POWER_URLHEAD + "/login");
// return false;
// }
// } else {
// response.sendRedirect(POWER_URLHEAD + "/login");
// return false;
// }
// }
// return true;
String url = request.getServletPath();
String token = (String) request.getSession().getAttribute("token");
if (!"/login".equals(url) && StringUtils.isNoneBlank(token)) {
try {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session
request.getSession().setAttribute("CURRENT_USER", powerUser);
if (null == powerUser.getUserId()) {
response.sendRedirect(POWER_URLHEAD + "/login");
return false;
}
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect(POWER_URLHEAD + "/login");
return false;
}
}
// } else {
// response.sendRedirect(POWER_URLHEAD + "/login");
// return false;
// }
return true;
}
}

@ -0,0 +1,151 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.ExportExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("vCount")
public class VCountController {
@Autowired
private V_CountService v_countService;
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@RequestMapping(value = "/vCounts")
public String faults(Model model){
return "vCountDir/vCountList";
}
@ResponseBody
@RequestMapping(value = "/vCountList")
public OffsetLimitPage faultList(HttpServletRequest request, HttpServletResponse response, V_Count vCount, Integer offset, Integer limit) {
OffsetLimitPage result = v_countService.selectPageByClo(vCount,offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, V_Count vCount) throws Exception {
String tableThNames = "科室代码,科室名称,出院人数,已归档,未归档,死亡人数,归档率(%),2日率(%),3日率(%),7日率(%)";
String fieldCns = "deptCode,deptName,outNum,fileNum,unfileNum,deathNum,fileRate,day2Rate,day3Rate,day7Rate";
//构造excel的数据
List<V_Count> list = v_countService.selectByCol(vCount);
for (int i = 0; i < list.size(); i++) {
if(list.get(i).getInNum()==null){
list.get(i).setInNum(0);
}
if (list.get(i).getOutNum() == null) {
list.get(i).setOutNum(0);
}
if (list.get(i).getFileNum() == null) {
list.get(i).setFileNum(0);
}
if (list.get(i).getUnfileNum() == null) {
list.get(i).setUnfileNum(0);
}
if (list.get(i).getDeathNum() == null) {
list.get(i).setDeathNum(0);
}
if (list.get(i).getFileRate() == null) {
list.get(i).setFileRate("0.0%");
}else{
Double val= Double.valueOf(list.get(i).getFileRate())/100;
list.get(i).setFileRate(val+"%");
}
if (list.get(i).getDay2Rate() == null) {
list.get(i).setDay2Rate("0.0%");
} else {
Double val = Double.valueOf(list.get(i).getDay2Rate()) / 100;
list.get(i).setDay2Rate(val + "%");
}
if (list.get(i).getDay3Rate() == null) {
list.get(i).setDay3Rate("0.0%");
} else {
Double val = Double.valueOf(list.get(i).getDay3Rate()) / 100;
list.get(i).setDay3Rate(val + "%");
}
if (list.get(i).getDay7Rate() == null) {
list.get(i).setDay7Rate("0.0%");
} else {
Double val = Double.valueOf(list.get(i).getDay7Rate()) / 100;
list.get(i).setDay7Rate(val + "%");
}
}
//文件名
String fileName = "统计数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/exportExcel2")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
String tableThNames = "名字,入院科室,入院日期,出院科室,出院日期,主管医生";
String fieldCns = "name,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,doctorInCharge";
//构造excel的数据
List<Archive_Master> list = archiveMasterService.selectByUnfile(archiveMasterVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
for (int i = 0; i < list.size(); i++) {
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode())) || (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
//出院科室
if(deptName != null) {
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
}
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
}
}
}
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
}

@ -0,0 +1,106 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:38
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.ExportExcelUtil;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/beHosp")
public class beHospitaledController {
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private Archive_DetailService archiveDetailService;
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
@Autowired
private Emr_PictureService emrPictureService;
@RequestMapping(value = "/beHosps")
public String inHospitals(Model model) {
return "beHospitaledDir/beHospList";
}
@ResponseBody
@RequestMapping(value = "/beHospList")
public OffsetLimitPage beHospList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
OffsetLimitPage result = archiveMasterService.selectByColumn(archiveMasterVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
String tableThNames = "病历清单id,住院号,住院次数,名字,性别,身份证,出院科室,出院日期,主管医生,状态";
String fieldCns = "id,inpNo,visitId,name,sex,idNo,deptName,dischargeDateTime,doctorInCharge,archivestate";
//构造excel的数据
List<Archive_Master> list = archiveMasterService.selectByColumn(archiveMasterVo);
//文件名
String fileName = "出院浏览" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")
public int updateStateByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
//修改病案归档状态
Archive_Master archiveMaster=new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate(emrFaultDetail.getState());
int bol= archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if(bol==1){
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
emrFaultDetail.setState("未召回");
bol= emrFaultDetailService.insertSel(emrFaultDetail);
}
return bol;
}
}

@ -0,0 +1,118 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.util.ExportExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("fault")
public class faultController {
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
@Autowired
private Emr_Fault_TypeService emrFaultTypeService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@RequestMapping(value = "/faults")
public String faults(Model model){
return "faultDir/faultList";
}
@ResponseBody
@RequestMapping(value = "/faultList")
public OffsetLimitPage faultList(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
OffsetLimitPage result = emrFaultDetailService.selectByCol(emrFaultVo,offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Emr_Fault_Vo emrFaultVo) throws Exception {
String tableThNames = "ID,病历清单id,住院号,住院次数,姓名,出院科室,出院日期,归档状态,评分,回退内容,缺陷选项,缺陷内容,创建时间";
String fieldCns = "id,archiveDetailId,inpNo,visitId,name,deptName,dischargeDateTime,archivestate,score,backContent,assortId,content,createTime";
//构造excel的数据
List<Emr_Fault_Vo> list = emrFaultDetailService.selectByCol(emrFaultVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
//获取缺陷类别列表
Emr_Fault_Type obj=new Emr_Fault_Type();
obj.setEffective(1);
//缺陷选项
List<Emr_Fault_Type> typeLis= emrFaultTypeService.selectByCol(obj);
for(int i=0;i<list.size();i++){
String assortId = list.get(i).getAssortId();
if (assortId != "" && assortId != null) {
String[] assorArr = assortId.split(",");
//替换类别
for (int j = 0; j < typeLis.size(); j++) {
String id = String.valueOf(typeLis.get(j).getId());
if (Arrays.asList(assorArr).contains(id)) {
assortId = assortId.replace(id, typeLis.get(j).getTypeName());
list.get(i).setAssortId(assortId);
}
}
}
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();;
if ((deptName != null && deptName.equals(dicList.get(k).getCode()))|| (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
//出院科室
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
}
}
}
//文件名
String fileName = "缺陷信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
// @ResponseBody
// @RequestMapping(value = "/faultByArchiveId")
// public Emr_Fault_Detail faultByArchiveId(HttpServletRequest request, HttpServletResponse response, String archiveDetailId) {
// Emr_Fault_Detail result = emrFaultDetailService.selectByArchiveDetailId(archiveDetailId);
// return result;
// }
}

@ -0,0 +1,73 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:32
* Description:
*/
package com.emr.controller;
import com.emr.entity.Emr_Fault_Type;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.service.Emr_Fault_TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("/faultType")
public class faultTypeController {
@Autowired
private Emr_Fault_TypeService emrFaultTypeService;
@RequestMapping(value = "/faultTypes")
public String faultTypes(Model model) {
return "faultTypeDir/faultTypeList";
}
@ResponseBody
@RequestMapping(value = "/faultTypeList")
public List<Emr_Fault_Type> faultTypeList(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Type emrFaultType) {
List<Emr_Fault_Type> list = emrFaultTypeService.selectByCol(emrFaultType);
return list;
}
@ResponseBody
@RequestMapping(value = "/updateByClo")
public int updateByClo(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Type emrFaultType) {
int bol=0;
//判断id是否存在
if(emrFaultType.getId()!=null){
//判断是否存在记录
if (emrFaultTypeService.selectById(emrFaultType.getId()) != null) {
bol = emrFaultTypeService.updateByClo(emrFaultType);
}
}else{
//不存在则添加缺陷类别记录
bol= emrFaultTypeService.insertClo(emrFaultType);
}
return bol;
}
@ResponseBody
@RequestMapping(value = "/delById")
public int delById(HttpServletRequest request, HttpServletResponse response,Integer id) {
int bol = 0;
//判断id是否存在
if (id!= null) {
//判断是否存在记录
bol = emrFaultTypeService.delById(id);
}
return bol;
}
}

@ -0,0 +1,862 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.Archive_DetailService;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_PictureService;
import com.emr.util.ExportExcelUtil;
import com.emr.util.PDFUtils;
import com.emr.util.PrintToPdfUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/inHosp")
public class inHospitalController {
//private Logger logger = Logger.getLogger(inHospitalController.class);
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private Archive_DetailService archiveDetailService;
@Autowired
private Emr_PictureService emrPictureService;
@Value("${pictureUrl}")
private String pictureUrl;
@RequestMapping(value = "/inHospitals")
public String inHospitals(Model model) {
return "inHospitalDir/inHositalList";
}
@ResponseBody
@RequestMapping(value = "/inHospitalList")
public OffsetLimitPage inHospitalList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
OffsetLimitPage result = archiveMasterService.selectByCol(archiveMasterVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
String tableThNames = "病历清单id,住院号,住院次数,名字,性别,身份证,入院科室,入院日期,主管医生,状态";
String fieldCns = "id,inpNo,visitId,name,sex,idNo,deptAdmissionTo,admissionDateTime,doctorInCharge,archivestate";
//构造excel的数据
List<Archive_Master> list = archiveMasterService.selectByCol(archiveMasterVo);
//文件名
String fileName = "在院浏览" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/getDept")
public List<Emr_Dictionary> getDept(HttpServletResponse response, Emr_Dictionary emrDictionary) throws Exception {
emrDictionary.setEffective(1);
emrDictionary.setTypecode("dept_code");
//科室列表
return emrDictionaryService.dicByTypeCode(emrDictionary);
}
@ResponseBody
@RequestMapping(value = "/getAssort")
public List<Archive_Detail_Vo> getDept(HttpServletResponse response, Archive_Detail_Vo archiveDetailVo) throws Exception {
//分段列表
return archiveDetailService.selectByClo(archiveDetailVo);
}
@ResponseBody
@RequestMapping(value = "/getAssortdetail")
public OffsetLimitPage getAssortdetail(HttpServletResponse response, Archive_Detail_Vo archiveDetailVo, Integer offset, Integer limit) throws Exception {
//分段详情列表分页
OffsetLimitPage result = archiveDetailService.detailByClo(archiveDetailVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/updateState")
public int updateState(HttpServletResponse response, Archive_Detail archiveDetail) throws Exception {
archiveDetail.setFlag("1");
//修改状态分段信息
return archiveDetailService.updateCloById(archiveDetail);
}
@ResponseBody
@RequestMapping(value = "/updateStateAll")
public int updateStateAll(HttpServletResponse response, Archive_Detail archiveDetail) throws Exception {
int bol=0;
String idStr=archiveDetail.getId();
if(idStr.length()>0){
String[] idArr = idStr.split(",");
archiveDetail.setFlag("1");
for(int i=0;i<idArr.length;i++){
archiveDetail.setId(idArr[i]);
//修改状态分段信息
bol=archiveDetailService.updateCloById(archiveDetail);
}
}
return bol;
}
@ResponseBody
@RequestMapping(value = "/saveInfo")
public String saveInfo(HttpServletResponse response, Archive_Detail archiveDetail) throws Exception {
String result="";
//判断id是否为空
if(archiveDetail.getId()==null || archiveDetail.getId()==""){
//生成id
//插入记录
int bol= archiveDetailService.insertSel(archiveDetail);
if(1==bol){
result="添加成功!";
}else{
result = "添加失败!";
}
}else{
//根据id查找是否存在记录
Archive_Detail entity= archiveDetailService.selectByid(archiveDetail.getId());
if(entity!=null){
//修改记录
int bol = archiveDetailService.updateCloById(archiveDetail);
if (1 == bol) {
result = "修改成功!";
} else {
result = "修改失败!";
}
} else {
result = "该记录不存在!";
}
}
return result;
}
/**
* idPDFpdf
*
* @param response
* @param request
* @param imgStr
* @param masterId
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping(value = "/getPdfToPdf")
public String getPdfToPdf(HttpServletResponse response, HttpServletRequest request, String imgStr, String masterId) throws Exception {
String result = "";
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl+"\\static\\img\\";
//pdf名称
String pdfFileName = String.valueOf(System.currentTimeMillis());
//病案号文件夹
if (masterId != "" && masterId != null) {
//判断文件夹是否存在
File fileDic = new File(realPath + masterId + "\\");
if (!fileDic.exists() && !fileDic.isDirectory()) {
fileDic.mkdirs();
}
//病案号/类别/id文件夹(图片路径下的子文件夹名称)
//生成pdf(图片路径pdf生成路径图片路径文件夹列表)
List imgList = new ArrayList();
if (imgStr != "" && imgStr != null) {
String[] imgArr = imgStr.split(",");
if (imgArr.length > 0) {
for (int i = 0; i < imgArr.length; i++) {
imgList.add(imgArr[i]);
}
}
}
// if(imgList.size()==1){
// result= masterId.trim() + "/"+ imgList.get(0) +"/"+ imgList.get(0)+".pdf";
// }else{
String pdfPath = realPath+"pdfFiles\\" + "typesPdf\\"+ pdfFileName + ".pdf";
String imgPath= realPath + "pdfFiles\\"+masterId.trim()+"\\";
//获取废除的pdf文件名列表archive_detail
List pdfList=new ArrayList();
Archive_Detail archiveDetail = new Archive_Detail();
archiveDetail.setFlag("0");
archiveDetail.setMasterid(masterId.trim());
archiveDetail.setTitle(imgStr);
List<Archive_Detail> arList=archiveDetailService.selectByCol(archiveDetail);
if(arList!=null) {
for (int m = 0; m < arList.size(); m++) {
String str = arList.get(m).getPdfPath();
if (str.indexOf("..\\static\\img\\pdfFiles\\") != -1) {
str = str.split("pdfFiles")[1];
str = realPath + "pdfFiles" + str;
}
// str= str.substring(str.lastIndexOf("\\") + 1);
pdfList.add(str);
}
}
//PrintToPdfUtil.pdtToPdf(imgPath,pdfPath, imgList,pdfList);
PDFUtils.getPdf(pdfPath, pdfList);
result = "typesPdf/"+pdfFileName + ".pdf";
// }
} else {
result = "a000000.pdf";
}
return result;
}
/**
* idPDFpdf
* @param response
* @param request
* @param imgStr
* @param masterId
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping(value = "/getPdf")
public String getPdf(HttpServletResponse response, HttpServletRequest request,String imgStr, String masterId) throws Exception {
String result="";
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl+"\\static\\img\\uploads\\";
//pdf名称
String pdfFile = String.valueOf(System.currentTimeMillis());
String pdfPath = realPath + "pdfFiles\\" + pdfFile + ".pdf";
//病案号文件夹
if(masterId!="" && masterId!=null ){
realPath = realPath+ masterId+"\\";
//判断文件夹是否存在
File fileDic = new File(realPath );
if (!fileDic.exists() && !fileDic.isDirectory()) {
fileDic.mkdirs();
}
//病案号/类别/id文件夹(图片路径下的子文件夹名称)
//生成pdf(图片路径pdf生成路径图片路径文件夹列表)
List imgList=new ArrayList();
if(imgStr!="" && imgStr!=null) {
String[] imgArr = imgStr.split(",");
if (imgArr.length > 0) {
for (int i = 0; i < imgArr.length; i++) {
imgList.add(imgArr[i]);
}
}
}
//imgList.add(imgStr.split())imgStr.split(","));
PrintToPdfUtil.toPdf(realPath, pdfPath, imgList);
result= pdfFile + ".pdf";
}else{
result="a000000.pdf";
}
return result;
}
@ResponseBody
@RequestMapping(value = "/delPdf")
public String delPdf(HttpServletResponse response, HttpServletRequest request,String pdfName) throws Exception {
String msg = "";
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl+"\\static\\img\\uploads\\";
realPath=realPath + "pdfFiles\\" + pdfName + ".pdf";
//将之前文件删除
File file1 = new File(realPath);
if (file1.exists() && file1.isFile()) {
file1.delete();
msg="删除成功";
}
return msg;
}
@ResponseBody
@RequestMapping(value = "/delImg")
public String delImg(HttpServletResponse response, HttpServletRequest request,Emr_Picture emrPicture) throws Exception {
String msg = "";
int bol =0;
if (emrPicture.getId() != null && emrPicture.getId() != "" && emrPicture.getId() != "-1") {
//判断记录是否存在
Emr_Picture entity=emrPictureService.selectByid(emrPicture.getId());
if(entity!=null){
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl;
String imgPath=entity.getMaxPicture().replace("..",realPath);
//将之前图片文件删除
File file1 = new File(imgPath);
if (file1.exists() && file1.isFile()) {
file1.delete();
// 设置存放图片文件的路径
String path2 = "\\static\\img\\uploads\\";
//病案号
if (entity.getRelationId() != null && entity.getRelationId() != "") {
path2 = path2 + entity.getRelationId() + "\\";
}
//类型
if (entity.getAssortId() != null && entity.getAssortId() != "") {
path2 = path2 + entity.getAssortId() + "\\";
}
String pdfPath= realPath + "\\static\\img\\pdfFiles\\" + entity.getRelationId() + "\\" + entity.getAssortId()+"\\"+ entity.getAssortId() + ".pdf";
//将之前文件删除
File file = new File(pdfPath);
if (file1.exists() && file1.isFile()) {
file1.delete();
}
//重新生成pdf
//读取指定路径下的文件名和目录名
List arr = new ArrayList();
//arr.add(pathType);
//图片转PDF(病案号文件夹+类别文件夹)
PrintToPdfUtil.toPdf(realPath + path2 , pdfPath , arr);
}
//存在删除
bol = emrPictureService.deleteById(emrPicture.getId());
}
}
if(bol==1) {
msg = "删除成功!";
}else{
msg = "删除失败!";
}
return msg;
}
/**
*
* @param response
* @param
* @param emrPicture
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping(value = "/getPicList")
public List<Emr_Picture> getPicList(HttpServletResponse response, Emr_Picture emrPicture) throws Exception {
List<Emr_Picture> picList = emrPictureService.selectByClo(emrPicture);
return picList;
}
/**
*
*
* @param resp
* @param request
* @param
* @return
* @throws IOException
*/
@ResponseBody
@RequestMapping(value = "/uploadImgS", method = RequestMethod.POST)
public String uploadImgS(HttpServletResponse resp, HttpServletRequest request, @RequestParam MultipartFile[] imgs) throws Exception {
resp.setContentType("text/json");
resp.setCharacterEncoding("utf-8");
String firstFile = request.getParameter("fileName");
String list = request.getParameter("list");
String masterID = request.getParameter("masterID");
int t = 0;
//String id = request.getParameter("id");
JSONArray fileObj = JSONArray.fromObject(list);
String result = "";
if (!masterID.isEmpty()) {
String fileName = "";
String path = null;
String type = null;
//type = fileName.indexOf(".") != -1 ? fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : null;
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl;
// 设置存放图片文件的路径
String path2 = "\\static\\img\\uploads\\";
//病案号
if (masterID != null && masterID != "") {
path2 = path2 + masterID + "\\";
}
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
//类循环
if (fileObj != null && fileObj.size() > 0) {
for (int x = 0; x < fileObj.size(); x++) {
JSONObject obj = fileObj.getJSONObject(x);
//类别
String pathType = "";
if (obj.get("selectVal") != null && obj.get("selectVal") != "") {
pathType = obj.get("selectVal") + "\\";
//图片id
// if (id != null && id != "") {
// path2 = path2 + id + "\\";
// } else {
// path2 = path2 + idTime + "\\";
// }
//判断文件夹是否存在
File fileDic = new File(realPath + path2 + pathType);
if (!fileDic.exists() && !fileDic.isDirectory()) {
fileDic.mkdirs();
}
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//创建时间id
String idTime = String.valueOf(System.currentTimeMillis());
String trueFileName ="";
//将其路径及文件名类型以及参数保存图片相关信息到分段详细表
Emr_Picture entity = new Emr_Picture();
entity.setRelationId(masterID);
entity.setAssortId(obj.get("selectVal").toString());
//entity.setMasterid(masterID);
entity.setUpdateTime(nowTime);
entity.setUpdater(username);
int bol = 0;
String id= obj.get("id").toString();
if (id != null && id != "" && !id.equals("-1")) {
Emr_Picture picList = emrPictureService.selectByid(id);
// entity.setTypeFlag(id);
//判断记录是否已经存在
if (picList!=null) {
entity.setId(id);
//图片是否有改动有改动则删除之前重新上传
//String[] img= picList.getMaxPicture().split("/");
if(picList.getAssortId()!=entity.getAssortId() || picList.getRelationId()!=entity.getRelationId() ){
//if(img[img.length-1]!= obj.get("fileSrc")){
//将之前文件删除
// File file1 = new File(realPath + "/static" + picList.getMaxPicture().split("static")[1]);
// if (file1.exists() && file1.isFile()) {
// file1.delete();
// }
//上传图片
//imgs[x].transferTo(new File(realPath + path2 + pathType + trueFileName));
//System.out.println(oldName);picList.getMaxPicture()
if(picList.getMaxPicture().indexOf(path2 + pathType)==-1){
// 移动图片
String startPath= realPath + "/static" + picList.getMaxPicture().split("static")[1];
String endPath= realPath + path2 + pathType;
PrintToPdfUtil.moveTotherFolders(startPath, endPath);
String[] oldName= picList.getMaxPicture().split("\\\\");
//新的图片地址
entity.setMaxPicture(".." + path2 + pathType + oldName[oldName.length - 1]);
}
//被修改的类别重新生成pdf查询出pdf记录
//根据病案号和类别查询是否存在
Archive_Detail detail = new Archive_Detail();
detail.setMasterid(masterID);
detail.setAssortid(picList.getAssortId());
List<Archive_Detail> detailList = archiveDetailService.selectByColm(detail);
//判断pdf是否存在将之前文件删除
File file1 = new File(detailList.get(0).getPdfPath().replace("..", realPath));
if (file1.exists() && file1.isFile()) {
file1.delete();
}
//读取指定路径下的文件名和目录名
List arr = new ArrayList();
arr.add(picList.getAssortId());
//图片转PDF(病案号文件夹+类别文件夹)
PrintToPdfUtil.toPdf(realPath + path2 + picList.getAssortId(), detailList.get(0).getPdfPath().replace("..", realPath), arr);
//判断pdf文件大小等于了则删除并删除pdf记录
File file = new File(detailList.get(0).getPdfPath().replace("..", realPath));
if (file.exists() && file.isFile()) {
System.out.println("文件" + file.getName() + "的大小是:" + file.length());
if(file.length()==0){
archiveDetailService.deleteByClo(detail);
file.delete();
}
}
//根据id修改记录
bol = emrPictureService.updateCloByIdOrFlay(entity);
//}
if (bol == 1) {
result = "批量上传成功!";
} else {
result = "批量上传失败!";
}
}
} else {
//得到图片名
String oldName = imgs[t].getOriginalFilename();// 如apple1.jpg
// 自定义的文件名称String.valueOf(System.currentTimeMillis())
trueFileName = firstFile + idTime + oldName;
//上传图片
imgs[t].transferTo(new File(realPath + path2 + pathType + trueFileName));
entity.setId(idTime);
entity.setCreater(username);
entity.setCreateTime(nowTime);
entity.setEffective(1);
entity.setMaxPicture(".." + path2 + pathType + trueFileName);
//插入记录
bol = emrPictureService.insertSel(entity);
t++;
}
} else {
//得到图片名
String oldName = imgs[t].getOriginalFilename();// 如apple1.jpg
// 自定义的文件名称String.valueOf(System.currentTimeMillis())
trueFileName = firstFile + idTime + oldName;
//上传图片
imgs[t].transferTo(new File(realPath + path2 + pathType + trueFileName));
t = t + 1;
//新的图片地址
entity.setMaxPicture(".." + path2 + pathType + trueFileName);
entity.setId(idTime);
entity.setCreater(username);
entity.setCreateTime(nowTime);
entity.setEffective(1);
//插入记录
bol = emrPictureService.insertSel(entity);
}
if (bol == 1) {
//根据类别生成pdf:pathType(String.valueOf(System.currentTimeMillis()) )
String pdfFile = pathType.replace("\\", "") + ".pdf";
//根据病案号和类别查询是否存在
Archive_Detail detail = new Archive_Detail();
detail.setMasterid(masterID);
detail.setAssortid(pathType.replace("\\",""));
List<Archive_Detail> voList=archiveDetailService.selectByColm(detail);
//pdf存在则删除记录和文件
if(voList.size()<=0){
//不存在添加记录和转换pdf
detail.setFlag("0");//显示
detail.setSource("后台");
detail.setSys("emr_medical_record");
detail.setUploaddatetime(nowTime);
detail.setPdfPath("..\\static\\img\\pdfFiles\\" + masterID + "\\" + pathType + pdfFile);
int b = archiveDetailService.insertSel(detail);
}
//判断pdf是否存在将之前文件删除
File file1 = new File(realPath + "\\static\\img\\pdfFiles\\" + masterID + "\\" + pathType + pdfFile);
if (file1.exists() && file1.isFile()) {
file1.delete();
}
//读取指定路径下的文件名和目录名
List arr = new ArrayList();
arr.add(pathType);
//图片转PDF(病案号文件夹+类别文件夹)
PrintToPdfUtil.toPdf(realPath + path2 + pathType, realPath + "\\static\\img\\pdfFiles\\" + masterID + "\\" + pathType + pdfFile, arr);
result = "批量上传成功!";
} else {
result = "批量上传失败!";
}
} else {
result = "没有找到相对应的文件!";
}
}
}
}
return result;
}
/**
*
* @param resp
* @param request
* @param file
* @return
* @throws IOException
*/
@ResponseBody
@RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
public String uploadImg(HttpServletResponse resp, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
resp.setContentType("text/json");
resp.setCharacterEncoding("utf-8");
String firstFile = request.getParameter("fileName");
String id = request.getParameter("id");
String masterID = request.getParameter("masterID");
String assortID = request.getParameter("assortID");
String result = "";
if (!file.isEmpty()) {
// logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
type = fileName.indexOf(".") != -1 ? fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : null;
//logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("GIF".equals(type.toUpperCase()) || "JPEG".equals(type.toUpperCase())|| "PNG".equals(type.toUpperCase()) || "JPG".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl;
//创建时间id
String idTime = String.valueOf(System.currentTimeMillis());
// 自定义的文件名称String.valueOf(System.currentTimeMillis())
String trueFileName = firstFile+ idTime + fileName.split(".")[1];
// 设置存放图片文件的路径
String path2 = "\\static\\img\\uploads\\" ;
//病案号
if (masterID != null && masterID!="") {
path2= path2+masterID + "\\";
}
//类别
if(assortID!=null && assortID != ""){
path2= path2+ assortID+"\\";
}
//图片id
if (id != null && id != "") {
path2 = path2 + id + "\\";
}else{
path2 = path2 + idTime + "\\";
}
//判断文件夹是否存在
File fileDic = new File(realPath +path2);
if (!fileDic.exists() && !fileDic.isDirectory()){
fileDic.mkdirs();
}
//logger.info("存放图片文件的路径:" + path);
path= realPath + path2 + trueFileName;
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//将其路径及文件名类型以及参数保存图片相关信息到分段详细表
Emr_Picture entity = new Emr_Picture();
entity.setRelationId(masterID);
entity.setAssortId(assortID);
entity.setUpdateTime(nowTime);
entity.setMaxPicture(".."+ path2 + trueFileName);
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
entity.setUpdater(username);
int bol = 0;
if (id != null && id != "") {
Emr_Picture pic = new Emr_Picture();
pic.setTypeFlag(id);
List<Emr_Picture> list = emrPictureService.selectByClo(pic);
entity.setTypeFlag(id);
if(list.size()>0){
//将之前文件删除
File file1 = new File(realPath + "/static" + list.get(0).getMaxPicture().split("static")[1]);
if (file1.exists() && file1.isFile()) {
file1.delete();
}
//根据id修改记录
bol = emrPictureService.updateCloByIdOrFlay(entity);
}else{
entity.setId(idTime);
entity.setCreater(username);
entity.setCreateTime(nowTime);
entity.setEffective(1);
//插入记录
bol = emrPictureService.insertSel(entity);
}
} else {
entity.setId(idTime);
entity.setCreater(username);
entity.setCreateTime(nowTime);
entity.setEffective(1);
//插入记录
bol = emrPictureService.insertSel(entity);
}
if (bol == 1) {
//文件成功上传到指定目录下
file.transferTo(new File(path));
result = entity.getMaxPicture();
} else {
result = "保存文件信息失败!";
}
} else {
result = "文件类型有误,请重新上传!";
}
} else {
result = "文件类型为空!";
}
} else {
result = "没有找到相对应的文件!";
}
return result;
}
/**
* Pdf
*
* @param resp
* @param request
* @param file
* @return
* @throws IOException
*/
@RequestMapping(value = "/uploadPdf", method = RequestMethod.POST)
public String uploadPdf(HttpServletResponse resp, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
resp.setContentType("text/json");
resp.setCharacterEncoding("utf-8");
String firstFile = request.getParameter("fileName");
String id = request.getParameter("id");
String masterID = request.getParameter("masterID");
String assortID = request.getParameter("assortID");
String result = "";
if (!file.isEmpty()) {
// 成功获取照片原名字
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
type = fileName.indexOf(".") != -1 ? fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : null;
//logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("PDF".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
realPath = realPath.split("target")[0] + pictureUrl;
// 自定义的文件名称String.valueOf(System.currentTimeMillis())
String trueFileName = firstFile + fileName;
// 设置存放图片文件的路径
path = realPath + "\\static\\img\\uploads\\" + trueFileName;
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//将其路径及文件名类型以及参数保存图片相关信息到分段详细表
Archive_Detail entity = new Archive_Detail();
entity.setMasterid(masterID);
entity.setAssortid(assortID);
entity.setUploaddatetime(nowTime);
entity.setPdfPath("../static/img/uploads/" + trueFileName);
Archive_Detail detail = new Archive_Detail();
int bol = 0;
if (id != null && id != "") {
entity.setId(id);
detail = archiveDetailService.selectByid(id);
if (detail != null) {
//根据id修改记录
bol = archiveDetailService.updateCloById(entity);
}
} else {
//插入记录
bol = archiveDetailService.insertSel(entity);
}
if (bol == 1) {
//将之前文件删除
File file1 = new File(realPath + "/static/uploads/" + detail.getPdfPath().split("/")[3]);
if (file1.exists() && file1.isFile()) {
file1.delete();
}
file.transferTo(new File(path));
//文件成功上传到指定目录下
result = entity.toString();
} else {
result = "保存文件信息失败!";
}
} else {
result = "文件类型有误,请重新上传!";
}
} else {
result = "文件类型为空!";
}
} else {
result = "没有找到相对应的文件!";
}
return result;
}
}

@ -0,0 +1,126 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/8 12:46
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.util.ExportExcelUtil;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("lastVerify")
public class lastVerifyController {
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private Emr_Fault_TypeService emrFaultTypeService;
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
@RequestMapping(value = "/lastVerifys")
public String faults(Model model) {
return "lastVerifyDir/lastVerifyList";
}
@ResponseBody
@RequestMapping(value = "/lastVerifyList")
public OffsetLimitPage lastVerifyList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
OffsetLimitPage result = archiveMasterService.selectByLast(archiveMasterVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
String tableThNames = "病历清单id,住院号,住院次数,名字,性别,身份证,入院科室,入院日期,主管医生,状态";
String fieldCns = "id,inpNo,visitId,name,sex,idNo,deptAdmissionTo,admissionDateTime,doctorInCharge,archivestate";
//构造excel的数据
List<Archive_Master> list = archiveMasterService.selectByLast(archiveMasterVo);
//文件名
String fileName = "病案室终审" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/getFaultType")
public List<Emr_Fault_Type> getFaultType(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Type emrFaultType) {
List<Emr_Fault_Type> result = emrFaultTypeService.selectByCol(emrFaultType);
return result;
}
@ResponseBody
@RequestMapping(value = "/getDetailByArchId")
public Emr_Fault_Detail getDetailByArchId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
Emr_Fault_Detail result = emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
return result;
}
@ResponseBody
@RequestMapping(value = "/updateDetailByArchivId")
public int updateDetailByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
//修改病案归档状态:复审退回
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate("复审退回");
int bol = archiveMasterService.updateByClo(archiveMaster);
//修改复审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
//参数输入
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
emrFaultDetail.setUpdater(username);
emrFaultDetail.setUpdateTime(nowTime);
//修改复审内容
//1、查询出该病案的创建时间最近的缺陷记录
Emr_Fault_Detail entity= emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
emrFaultDetail.setId(entity.getId());
//2、修改缺陷记录
bol = emrFaultDetailService.updateCloByPrimaryKey(emrFaultDetail);
}
return bol;
}
}

@ -0,0 +1,72 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.entity.Emr_Log;
import com.emr.entity.Emr_Log_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.LogService;
import com.emr.util.ExportExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/recallDate")
public class medicalRecallDateController {
@Autowired
private LogService logService;
@RequestMapping(value = "/recallDates")
public String recallDates(Model model) {
return "medicalRecallDateDir/recallDateList";
}
@ResponseBody
@RequestMapping(value = "/recallDateList")
public OffsetLimitPage recallDateList(HttpServletRequest request, HttpServletResponse response, Emr_Log_Vo emrLogVo, Integer offset, Integer limit) {
emrLogVo.setLogContent("病案召回");
emrLogVo.setSysFlag("EMR_Medical_Record");
OffsetLimitPage result = logService.selectByCol(emrLogVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Emr_Log_Vo emrLogVo) throws Exception {
String tableThNames = "日志id,病历清单id,住院号,住院次数,名字,性别,身份证,召回人,召回时间,召回原因,状态,归档状态";
String fieldCns = "logId,archiveDetailId,inpNo,visitId,name,sex,idNo,creater,createDate,recallReason,state,archivestate";
emrLogVo.setLogContent("病案召回");
emrLogVo.setSysFlag("EMR_Medical_Record");
//构造excel的数据
List<Emr_Log_Vo> list = logService.selectByCol(emrLogVo);
//文件名
String fileName = "日志信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/lastBylogTitle")
public Emr_Log lastBylogTitle(HttpServletRequest request, HttpServletResponse response, String logTitle) {
Emr_Log result = logService.lastBylogTitle(logTitle);
return result;
}
}

@ -0,0 +1,31 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/9/17 11:30
* Description:
*/
package com.emr.controller;
import com.emr.util.PDFUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.File;
@Component
public class taskController {
@Scheduled(cron="0 0 4 * * ?")//每天4点触发0 0 4 * * ?
public void task(){
//static\img\pdfFiles\typesPdf
// 项目在容器中实际发布运行的根路径
// String realPath = request.getSession().getServletContext().getRealPath("/");
// realPath = realPath.split("target")[0] + pictureUrl + "\\static\\img\\";
String projectPath = System.getProperty("user.dir") + "\\static\\img\\pdfFiles\\typesPdf\\";
System.out.println("projectPath==" + projectPath);
PDFUtils.delAllFile(projectPath);
}
}

@ -0,0 +1,69 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:40
* Description:
*/
package com.emr.controller;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.util.ExportExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/unfile")
public class unfileMedicalController {
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@RequestMapping(value = "/unfileMedicals")
public String faults(Model model) {
return "unfileMedicalDir/unfileMedicalList";
}
@ResponseBody
@RequestMapping(value = "/unfileList")
public OffsetLimitPage unfileList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
OffsetLimitPage result = archiveMasterService.selectByUnfile(archiveMasterVo, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
String tableThNames = "病历清单id,住院号,住院次数,名字,性别,身份证,入院科室,入院日期,出院科室,出院日期,主管医生,状态";
String fieldCns = "id,inpNo,visitId,name,sex,idNo,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,doctorInCharge,archivestate";
//构造excel的数据
List<Archive_Master> list = archiveMasterService.selectByUnfile(archiveMasterVo);
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
}

@ -0,0 +1,32 @@
package com.emr.dao;
import com.emr.entity.Archive_Detail;
import com.emr.entity.Archive_Detail_Vo;
import java.util.List;
public interface Archive_DetailMapper {
int deleteByPrimaryKey(String id);
int deleteByClo(Archive_Detail record);
int insert(Archive_Detail record);
int insertSel(Archive_Detail record);
Archive_Detail selectByid(String id);
int updateCloById(Archive_Detail record);
int updateByPrimaryKey(Archive_Detail record);
List<Archive_Detail> selectByColm(Archive_Detail record);
List<Archive_Detail> selectByCol(Archive_Detail record);
List<Archive_Detail_Vo> selectByClo(Archive_Detail_Vo record);
List<Archive_Detail_Vo> detailByClo(Archive_Detail_Vo record);
}

@ -0,0 +1,30 @@
package com.emr.dao;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import java.util.List;
public interface Archive_MasterMapper {
int deleteByPrimaryKey(String id);
int insert(Archive_Master record);
int insertSelective(Archive_Master record);
Archive_Master selectByPrimaryKey(String id);
List<Archive_Master> selectByCol(Archive_Master_Vo record);
List<Archive_Master> selectByColumn(Archive_Master_Vo record);
List<Archive_Master> selectByLast(Archive_Master_Vo record);
List<Archive_Master> selectByUnfile(Archive_Master_Vo record);
int updateByClo(Archive_Master record);
int updateById(Archive_Master record);
}

@ -0,0 +1,17 @@
package com.emr.dao;
import com.emr.entity.Emr_Archive_Detail;
public interface Emr_Archive_DetailMapper {
int deleteByPrimaryKey(Integer id);
int insert(Emr_Archive_Detail record);
int insertSelective(Emr_Archive_Detail record);
Emr_Archive_Detail selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Emr_Archive_Detail record);
int updateByPrimaryKey(Emr_Archive_Detail record);
}

@ -0,0 +1,42 @@
package com.emr.dao;
import com.emr.entity.Emr_Dictionary;
import java.util.List;
public interface Emr_DictionaryMapper {
/**
*
* @param emrDictionary
* @return
*/
List<Emr_Dictionary> dicByTypeCode(Emr_Dictionary emrDictionary);
/**
*
* @param emrDictionary
* @return
*/
List<Emr_Dictionary> dicByClo(Emr_Dictionary emrDictionary);
/**
*
* @param emrDictionary
* @return
*/
int insertSel(Emr_Dictionary emrDictionary);
/**
* id
* @param id
* @return
*/
int delById(Integer id);
/**
* id
* @param emrDictionary
* @return
*/
int updateCloById(Emr_Dictionary emrDictionary);
}

@ -0,0 +1,24 @@
package com.emr.dao;
import com.emr.entity.Emr_Fault_Detail;
import com.emr.entity.Emr_Fault_Vo;
import java.util.List;
public interface Emr_Fault_DetailMapper {
int deleteByPrimaryKey(Integer id);
int insert(Emr_Fault_Detail record);
int insertSel(Emr_Fault_Detail record);
Emr_Fault_Detail selectByPrimaryKey(Integer id);
int updateCloByPrimaryKey(Emr_Fault_Detail record);
int updateByPrimaryKey(Emr_Fault_Detail record);
List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo record);
Emr_Fault_Detail selectByArchiveDetailId(Emr_Fault_Detail record);
}

@ -0,0 +1,22 @@
package com.emr.dao;
import com.emr.entity.Emr_Fault_Type;
import java.util.List;
public interface Emr_Fault_TypeMapper {
int delById(Integer id);
int insert(Emr_Fault_Type record);
int insertClo(Emr_Fault_Type record);
List<Emr_Fault_Type> selectByCol(Emr_Fault_Type record);
int updateByClo(Emr_Fault_Type record);
int updateByPrimaryKey(Emr_Fault_Type record);
Emr_Fault_Type selectById(Integer id);
}

@ -0,0 +1,22 @@
package com.emr.dao;
import com.emr.entity.Emr_Log;
import com.emr.entity.Emr_Log_Vo;
import java.util.List;
public interface Emr_LogMapper {
int deleteByPrimaryKey(Integer logId);
int insert(Emr_Log record);
int insertSelective(Emr_Log record);
Emr_Log lastBylogTitle(String logTitle);
int updateByPrimaryKeySelective(Emr_Log record);
int updateByPrimaryKey(Emr_Log record);
List<Emr_Log_Vo> selectByCol(Emr_Log_Vo record);
}

@ -0,0 +1,21 @@
package com.emr.dao;
import com.emr.entity.Emr_Picture;
import java.util.List;
public interface Emr_PictureMapper {
int deleteById(String id);
int insert(Emr_Picture record);
int insertSel(Emr_Picture record);
Emr_Picture selectByid(String id);
int updateCloByIdOrFlay(Emr_Picture record);
int updateByPrimaryKey(Emr_Picture record);
List<Emr_Picture> selectByClo(Emr_Picture record);
}

@ -0,0 +1,22 @@
package com.emr.dao;
import com.emr.entity.Paper;
import java.util.List;
/**
* @Author:hjl
* @Date:Creatid in 15:48 2019/4/6
* @Description:
*/
public interface PaperDao {
int addPaper(Paper paper);
int deletePaperById(long id);
int updatePaper(Paper paper);
Paper queryById(long id);
List<Paper> queryAllPaper();
}

@ -0,0 +1,40 @@
package com.emr.dao;
import com.emr.entity.Paper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Author:hjl
* @Date:Creatid in 16:25 2019/4/7
* @Description:
* @Repository
*/
@Repository
public class PaperDaoImpl implements PaperDao {
@Override
public int addPaper(Paper paper) {
return this.addPaper(paper);
}
@Override
public int deletePaperById(long id) {
return this.deletePaperById(id);
}
@Override
public int updatePaper(Paper paper) {
return this.updatePaper(paper);
}
@Override
public Paper queryById(long id) {
return this.queryById(id);
}
@Override
public List<Paper> queryAllPaper() {
return this.queryAllPaper();
}
}

@ -0,0 +1,17 @@
package com.emr.dao;
import com.emr.entity.V_Count;
import java.util.List;
public interface V_CountMapper {
List<V_Count> selectByCol(V_Count record);
// /**
// * 根据条件查找统计列表分页
// *
// * @param record
// * @return
// */
// List<V_Count> selectPageByClo(V_Count record);
}

@ -0,0 +1,103 @@
package com.emr.entity;
public class Archive_Detail {
private String id;
private String pdfPath;
private String masterid;
private String uploaddatetime;
private String assortid;
private String source;
private String subassort;
private String title;
private String flag;
private String sys;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getPdfPath() {
return pdfPath;
}
public void setPdfPath(String pdfPath) {
this.pdfPath = pdfPath == null ? null : pdfPath.trim();
}
public String getMasterid() {
return masterid;
}
public void setMasterid(String masterid) {
this.masterid = masterid == null ? null : masterid.trim();
}
public String getUploaddatetime() {
return uploaddatetime;
}
public void setUploaddatetime(String uploaddatetime) {
this.uploaddatetime = uploaddatetime == null ? null : uploaddatetime.trim();
}
public String getAssortid() {
return assortid;
}
public void setAssortid(String assortid) {
this.assortid = assortid == null ? null : assortid.trim();
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source == null ? null : source.trim();
}
public String getSubassort() {
return subassort;
}
public void setSubassort(String subassort) {
this.subassort = subassort == null ? null : subassort.trim();
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag == null ? null : flag.trim();
}
public String getSys() {
return sys;
}
public void setSys(String sys) {
this.sys = sys == null ? null : sys.trim();
}
}

@ -0,0 +1,183 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/29 15:02
* Description:
*/
package com.emr.entity;
public class Archive_Detail_Vo {
private String id;
private String pdfPath;
private String masterid;
private String uploaddatetime;
private String assortid;
private String source;
private String subassort;
private String title;
private String flag;
private String sys;
private String assortId;
private String assortName;
private Short assortSort;
private String printFlag;
private String patientId;
private String scanPage;
private int pageNum;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getPdfPath() {
return pdfPath;
}
public void setPdfPath(String pdfPath) {
this.pdfPath = pdfPath == null ? null : pdfPath.trim();
}
public String getMasterid() {
return masterid;
}
public void setMasterid(String masterid) {
this.masterid = masterid == null ? null : masterid.trim();
}
public String getUploaddatetime() {
return uploaddatetime;
}
public void setUploaddatetime(String uploaddatetime) {
this.uploaddatetime = uploaddatetime == null ? null : uploaddatetime.trim();
}
public String getAssortid() {
return assortid;
}
public void setAssortid(String assortid) {
this.assortid = assortid == null ? null : assortid.trim();
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source == null ? null : source.trim();
}
public String getSubassort() {
return subassort;
}
public void setSubassort(String subassort) {
this.subassort = subassort == null ? null : subassort.trim();
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag == null ? null : flag.trim();
}
public String getSys() {
return sys;
}
public void setSys(String sys) {
this.sys = sys == null ? null : sys.trim();
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public String getAssortName() {
return assortName;
}
public void setAssortName(String assortName) {
this.assortName = assortName == null ? null : assortName.trim();
}
public Short getAssortSort() {
return assortSort;
}
public void setAssortSort(Short assortSort) {
this.assortSort = assortSort;
}
public String getPrintFlag() {
return printFlag;
}
public void setPrintFlag(String printFlag) {
this.printFlag = printFlag == null ? null : printFlag.trim();
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public String getScanPage() {
return scanPage;
}
public void setScanPage(String scanPage) {
this.scanPage = scanPage == null ? null : scanPage.trim();
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
}

@ -0,0 +1,203 @@
package com.emr.entity;
public class Archive_Master {
private String id;
private String patientId;
private String inpNo;
private String visitId;
private String name;
private String sex;
private String deptName;
private String dischargeDateTime;
private String archivestate;
private String admissionDateTime;
private String deptAdmissionTo;
private String checkDoctor;
private String checkDatetime;
private String checkedDoctor;
private String checkedDatetime;
private String lockinfo;
private String doctorInCharge;
private String idNo;
private String dischargeDisposition;
private String deptCodeLend;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public String getInpNo() {
return inpNo;
}
public void setInpNo(String inpNo) {
this.inpNo = inpNo == null ? null : inpNo.trim();
}
public String getVisitId() {
return visitId;
}
public void setVisitId(String visitId) {
this.visitId = visitId == null ? null : visitId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex == null ? null : sex.trim();
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName == null ? null : deptName.trim();
}
public String getDischargeDateTime() {
return dischargeDateTime;
}
public void setDischargeDateTime(String dischargeDateTime) {
this.dischargeDateTime = dischargeDateTime == null ? null : dischargeDateTime.trim();
}
public String getArchivestate() {
return archivestate;
}
public void setArchivestate(String archivestate) {
this.archivestate = archivestate == null ? null : archivestate.trim();
}
public String getAdmissionDateTime() {
return admissionDateTime;
}
public void setAdmissionDateTime(String admissionDateTime) {
this.admissionDateTime = admissionDateTime == null ? null : admissionDateTime.trim();
}
public String getDeptAdmissionTo() {
return deptAdmissionTo;
}
public void setDeptAdmissionTo(String deptAdmissionTo) {
this.deptAdmissionTo = deptAdmissionTo == null ? null : deptAdmissionTo.trim();
}
public String getCheckDoctor() {
return checkDoctor;
}
public void setCheckDoctor(String checkDoctor) {
this.checkDoctor = checkDoctor == null ? null : checkDoctor.trim();
}
public String getCheckDatetime() {
return checkDatetime;
}
public void setCheckDatetime(String checkDatetime) {
this.checkDatetime = checkDatetime == null ? null : checkDatetime.trim();
}
public String getCheckedDoctor() {
return checkedDoctor;
}
public void setCheckedDoctor(String checkedDoctor) {
this.checkedDoctor = checkedDoctor == null ? null : checkedDoctor.trim();
}
public String getCheckedDatetime() {
return checkedDatetime;
}
public void setCheckedDatetime(String checkedDatetime) {
this.checkedDatetime = checkedDatetime == null ? null : checkedDatetime.trim();
}
public String getLockinfo() {
return lockinfo;
}
public void setLockinfo(String lockinfo) {
this.lockinfo = lockinfo == null ? null : lockinfo.trim();
}
public String getDoctorInCharge() {
return doctorInCharge;
}
public void setDoctorInCharge(String doctorInCharge) {
this.doctorInCharge = doctorInCharge == null ? null : doctorInCharge.trim();
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo == null ? null : idNo.trim();
}
public String getDischargeDisposition() {
return dischargeDisposition;
}
public void setDischargeDisposition(String dischargeDisposition) {
this.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.trim();
}
public String getDeptCodeLend() {
return deptCodeLend;
}
public void setDeptCodeLend(String deptCodeLend) {
this.deptCodeLend = deptCodeLend == null ? null : deptCodeLend.trim();
}
}

@ -0,0 +1,264 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/26 17:51
* Description:
*/
package com.emr.entity;
import java.util.List;
public class Archive_Master_Vo {
private String id;
private String patientId;
private String inpNo;
private String visitId;
private String name;
private String sex;
private String deptName;
private String dischargeDateTime;
private String archivestate;
private String admissionDateTime;
private String deptAdmissionTo;
private String checkDoctor;
private String checkDatetime;
private String checkedDoctor;
private String checkedDatetime;
private String lockinfo;
private String doctorInCharge;
private String idNo;
private String dischargeDisposition;
private String deptCodeLend;
private String startDateTo;
private String endDateTo;
private String startDate;
private String endDate;
private List<String> deptList;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public String getInpNo() {
return inpNo;
}
public void setInpNo(String inpNo) {
this.inpNo = inpNo == null ? null : inpNo.trim();
}
public String getVisitId() {
return visitId;
}
public void setVisitId(String visitId) {
this.visitId = visitId == null ? null : visitId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex == null ? null : sex.trim();
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName == null ? null : deptName.trim();
}
public String getDischargeDateTime() {
return dischargeDateTime;
}
public void setDischargeDateTime(String dischargeDateTime) {
this.dischargeDateTime = dischargeDateTime == null ? null : dischargeDateTime.trim();
}
public String getArchivestate() {
return archivestate;
}
public void setArchivestate(String archivestate) {
this.archivestate = archivestate == null ? null : archivestate.trim();
}
public String getAdmissionDateTime() {
return admissionDateTime;
}
public void setAdmissionDateTime(String admissionDateTime) {
this.admissionDateTime = admissionDateTime == null ? null : admissionDateTime.trim();
}
public String getDeptAdmissionTo() {
return deptAdmissionTo;
}
public void setDeptAdmissionTo(String deptAdmissionTo) {
this.deptAdmissionTo = deptAdmissionTo == null ? null : deptAdmissionTo.trim();
}
public String getCheckDoctor() {
return checkDoctor;
}
public void setCheckDoctor(String checkDoctor) {
this.checkDoctor = checkDoctor == null ? null : checkDoctor.trim();
}
public String getCheckDatetime() {
return checkDatetime;
}
public void setCheckDatetime(String checkDatetime) {
this.checkDatetime = checkDatetime == null ? null : checkDatetime.trim();
}
public String getCheckedDoctor() {
return checkedDoctor;
}
public void setCheckedDoctor(String checkedDoctor) {
this.checkedDoctor = checkedDoctor == null ? null : checkedDoctor.trim();
}
public String getCheckedDatetime() {
return checkedDatetime;
}
public void setCheckedDatetime(String checkedDatetime) {
this.checkedDatetime = checkedDatetime == null ? null : checkedDatetime.trim();
}
public String getLockinfo() {
return lockinfo;
}
public void setLockinfo(String lockinfo) {
this.lockinfo = lockinfo == null ? null : lockinfo.trim();
}
public String getDoctorInCharge() {
return doctorInCharge;
}
public void setDoctorInCharge(String doctorInCharge) {
this.doctorInCharge = doctorInCharge == null ? null : doctorInCharge.trim();
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo == null ? null : idNo.trim();
}
public String getDischargeDisposition() {
return dischargeDisposition;
}
public void setDischargeDisposition(String dischargeDisposition) {
this.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.trim();
}
public String getDeptCodeLend() {
return deptCodeLend;
}
public void setDeptCodeLend(String deptCodeLend) {
this.deptCodeLend = deptCodeLend == null ? null : deptCodeLend.trim();
}
public String getStartDateTo() {
return startDateTo;
}
public void setStartDateTo(String startDateTo) {
this.startDateTo = startDateTo == null ? null : startDateTo.trim();
}
public String getEndDateTo() {
return endDateTo;
}
public void setEndDateTo(String endDateTo) {
this.endDateTo = endDateTo == null ? null : endDateTo.trim();
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate == null ? null : startDate.trim();
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate == null ? null : endDate.trim();
}
public List<String> getDeptList() {
return deptList;
}
public void setDeptList(List<String> deptList) {
this.deptList = deptList;
}
}

@ -0,0 +1,103 @@
package com.emr.entity;
public class Emr_Archive_Detail {
private Integer id;
private String archiveDetailId;
private String assortId;
private Integer parentId;
private String title;
private String creater;
private String createTime;
private String updater;
private String updateTime;
private String remaker;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId == null ? null : archiveDetailId.trim();
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getRemaker() {
return remaker;
}
public void setRemaker(String remaker) {
this.remaker = remaker == null ? null : remaker.trim();
}
}

@ -0,0 +1,183 @@
package com.emr.entity;
public class Emr_Dictionary {
private Integer id;
private String typecode;
private String typename;
private String code;
private String name;
private String pyCode;
private String wbCode;
private String zipCode;
private String gbCode;
private Short flag;
private String cComment;
private Integer parentId;
private Integer effective;
private String updater;
private String updateTime;
private String creater;
private String createTime;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTypecode() {
return typecode;
}
public void setTypecode(String typecode) {
this.typecode = typecode == null ? null : typecode.trim();
}
public String getTypename() {
return typename;
}
public void setTypename(String typename) {
this.typename = typename == null ? null : typename.trim();
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getPyCode() {
return pyCode;
}
public void setPyCode(String pyCode) {
this.pyCode = pyCode == null ? null : pyCode.trim();
}
public String getWbCode() {
return wbCode;
}
public void setWbCode(String wbCode) {
this.wbCode = wbCode == null ? null : wbCode.trim();
}
public String getZipCode() {
return zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode == null ? null : zipCode.trim();
}
public String getGbCode() {
return gbCode;
}
public void setGbCode(String gbCode) {
this.gbCode = gbCode == null ? null : gbCode.trim();
}
public Short getFlag() {
return flag;
}
public void setFlag(Short flag) {
this.flag = flag;
}
public String getcComment() {
return cComment;
}
public void setcComment(String cComment) {
this.cComment = cComment == null ? null : cComment.trim();
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Integer getEffective() {
return effective;
}
public void setEffective(Integer effective) {
this.effective = effective;
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}

@ -0,0 +1,145 @@
package com.emr.entity;
import java.math.BigDecimal;
public class Emr_Fault_Detail {
private Integer id;
private String archiveDetailId;
private String assortId;
private Integer parentId;
private String content;
private BigDecimal score;
private String backContent;
private String firstTrial;
private String state;
private String recallReason;
private String creater;
private String createTime;
private String updater;
private String updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId == null ? null : archiveDetailId.trim();
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getBackContent() {
return backContent;
}
public void setBackContent(String backContent) {
this.backContent = backContent == null ? null : backContent.trim();
}
public String getFirstTrial() {
return firstTrial;
}
public void setFirstTrial(String firstTrial) {
this.firstTrial = firstTrial == null ? null : firstTrial.trim();
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state == null ? null : state.trim();
}
public String getRecallReason() {
return recallReason;
}
public void setRecallReason(String recallReason) {
this.recallReason = recallReason == null ? null : recallReason.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
}

@ -0,0 +1,113 @@
package com.emr.entity;
public class Emr_Fault_Type {
private Integer id;
private String archiveDetailId;
private String typeFlag;
private String typeName;
private Integer typeSort;
private Integer effective;
private String remark;
private String creater;
private String createTime;
private String updater;
private String updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId;
}
public String getTypeFlag() {
return typeFlag;
}
public void setTypeFlag(String typeFlag) {
this.typeFlag = typeFlag == null ? null : typeFlag.trim();
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName == null ? null : typeName.trim();
}
public Integer getTypeSort() {
return typeSort;
}
public void setTypeSort(Integer typeSort) {
this.typeSort = typeSort;
}
public Integer getEffective() {
return effective;
}
public void setEffective(Integer effective) {
this.effective = effective;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
}

@ -0,0 +1,305 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/22 12:06
* Description:
*/
package com.emr.entity;
import java.math.BigDecimal;
public class Emr_Fault_Vo {
private Integer id;
private String archiveDetailId;
private String assortId;
private Integer parentId;
private String content;
private BigDecimal score;
private String backContent;
private String firstTrial;
private String state;
private String recallReason;
private String creater;
private String createTime;
private String updater;
private String updateTime;
private String inpNo;
private String visitId;
private String name;
private String deptName;
private String dischargeDateTime;
private String archivestate;
private String startDate;
private String endDate;
private String admissionDateTime;
private String deptAdmissionTo;
private String sex;
private String idNo;
private String dischargeDisposition;
private String startDateTo;
private String endDateTo;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId == null ? null : archiveDetailId.trim();
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getBackContent() {
return backContent;
}
public void setBackContent(String backContent) {
this.backContent = backContent == null ? null : backContent.trim();
}
public String getFirstTrial() {
return firstTrial;
}
public void setFirstTrial(String firstTrial) {
this.firstTrial = firstTrial == null ? null : firstTrial.trim();
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state == null ? null : state.trim();
}
public String getRecallReason() {
return recallReason;
}
public void setRecallReason(String recallReason) {
this.recallReason = recallReason == null ? null : recallReason.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getInpNo() {
return inpNo;
}
public void setInpNo(String inpNo) {
this.inpNo = inpNo == null ? null : inpNo.trim();
}
public String getVisitId() {
return visitId;
}
public void setVisitId(String visitId) {
this.visitId = visitId == null ? null : visitId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName == null ? null : deptName.trim();
}
public String getDischargeDateTime() {
return dischargeDateTime;
}
public void setDischargeDateTime(String dischargeDateTime) {
this.dischargeDateTime = dischargeDateTime == null ? null : dischargeDateTime.trim();
}
public String getArchivestate() {
return archivestate;
}
public void setArchivestate(String archivestate) {
this.archivestate = archivestate == null ? null : archivestate.trim();
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate == null ? null : startDate.trim();
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate == null ? null : endDate.trim();
}
public String getAdmissionDateTime() {
return admissionDateTime;
}
public void setAdmissionDateTime(String admissionDateTime) {
this.admissionDateTime = admissionDateTime == null ? null : admissionDateTime.trim();
}
public String getDeptAdmissionTo() {
return deptAdmissionTo;
}
public void setDeptAdmissionTo(String deptAdmissionTo) {
this.deptAdmissionTo = deptAdmissionTo == null ? null : deptAdmissionTo.trim();
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex == null ? null : sex.trim();
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo == null ? null : idNo.trim();
}
public String getDischargeDisposition() {
return dischargeDisposition;
}
public void setDischargeDisposition(String dischargeDisposition) {
this.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.trim();
}
public String getStartDateTo() {
return startDateTo;
}
public void setStartDateTo(String startDateTo) {
this.startDateTo = startDateTo == null ? null : startDateTo.trim();
}
public String getEndDateTo() {
return endDateTo;
}
public void setEndDateTo(String endDateTo) {
this.endDateTo = endDateTo == null ? null : endDateTo.trim();
}
}

@ -0,0 +1,93 @@
package com.emr.entity;
public class Emr_Log {
private Integer logId;
private String logTitle;
private String logContent;
private String ip;
private Integer sysId;
private String sysFlag;
private String creater;
private String createDate;
private String remark;
public Integer getLogId() {
return logId;
}
public void setLogId(Integer logId) {
this.logId = logId;
}
public String getLogTitle() {
return logTitle;
}
public void setLogTitle(String logTitle) {
this.logTitle = logTitle == null ? null : logTitle.trim();
}
public String getLogContent() {
return logContent;
}
public void setLogContent(String logContent) {
this.logContent = logContent == null ? null : logContent.trim();
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public Integer getSysId() {
return sysId;
}
public void setSysId(Integer sysId) {
this.sysId = sysId;
}
public String getSysFlag() {
return sysFlag;
}
public void setSysFlag(String sysFlag) {
this.sysFlag = sysFlag == null ? null : sysFlag.trim();
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate == null ? null : createDate.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}

@ -0,0 +1,231 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/24 17:40
* Description:
*/
package com.emr.entity;
public class Emr_Log_Vo {
private String archiveDetailId;
private String state;
private String recallReason;
private String inpNo;
private String visitId;
private String name;
private String archivestate;
private String startDate;
private String endDate;
private String admissionDateTime;
private String deptAdmissionTo;
private String sex;
private String idNo;
private Integer logId;
private String logTitle;
private String logContent;
private String ip;
private Integer sysId;
private String sysFlag;
private String creater;
private String createDate;
private String remark;
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId == null ? null : archiveDetailId.trim();
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state == null ? null : state.trim();
}
public String getRecallReason() {
return recallReason;
}
public void setRecallReason(String recallReason) {
this.recallReason = recallReason == null ? null : recallReason.trim();
}
public String getInpNo() {
return inpNo;
}
public void setInpNo(String inpNo) {
this.inpNo = inpNo == null ? null : inpNo.trim();
}
public String getVisitId() {
return visitId;
}
public void setVisitId(String visitId) {
this.visitId = visitId == null ? null : visitId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getArchivestate() {
return archivestate;
}
public void setArchivestate(String archivestate) {
this.archivestate = archivestate == null ? null : archivestate.trim();
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate == null ? null : startDate.trim();
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate == null ? null : endDate.trim();
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex == null ? null : sex.trim();
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo == null ? null : idNo.trim();
}
public String getAdmissionDateTime() {
return admissionDateTime;
}
public void setAdmissionDateTime(String admissionDateTime) {
this.admissionDateTime = admissionDateTime == null ? null : admissionDateTime.trim();
}
public String getDeptAdmissionTo() {
return deptAdmissionTo;
}
public void setDeptAdmissionTo(String deptAdmissionTo) {
this.deptAdmissionTo = deptAdmissionTo == null ? null : deptAdmissionTo.trim();
}
public Integer getLogId() {
return logId;
}
public void setLogId(Integer logId) {
this.logId = logId;
}
public String getLogTitle() {
return logTitle;
}
public void setLogTitle(String logTitle) {
this.logTitle = logTitle == null ? null : logTitle.trim();
}
public String getLogContent() {
return logContent;
}
public void setLogContent(String logContent) {
this.logContent = logContent == null ? null : logContent.trim();
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public Integer getSysId() {
return sysId;
}
public void setSysId(Integer sysId) {
this.sysId = sysId;
}
public String getSysFlag() {
return sysFlag;
}
public void setSysFlag(String sysFlag) {
this.sysFlag = sysFlag == null ? null : sysFlag.trim();
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate == null ? null : createDate.trim();
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}

@ -0,0 +1,153 @@
package com.emr.entity;
public class Emr_Picture {
private String id;
private String relationId;
private String assortId;
private Integer parentId;
private String typeFlag;
private String typeName;
private String minPicture;
private String maxPicture;
private Integer pictureSort;
private Integer effective;
private String creater;
private String createTime;
private String updater;
private String updateTime;
private String remark;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId == null ? null : relationId.trim();
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getTypeFlag() {
return typeFlag;
}
public void setTypeFlag(String typeFlag) {
this.typeFlag = typeFlag == null ? null : typeFlag.trim();
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName == null ? null : typeName.trim();
}
public String getMinPicture() {
return minPicture;
}
public void setMinPicture(String minPicture) {
this.minPicture = minPicture == null ? null : minPicture.trim();
}
public String getMaxPicture() {
return maxPicture;
}
public void setMaxPicture(String maxPicture) {
this.maxPicture = maxPicture == null ? null : maxPicture.trim();
}
public Integer getPictureSort() {
return pictureSort;
}
public void setPictureSort(Integer pictureSort) {
this.pictureSort = pictureSort;
}
public Integer getEffective() {
return effective;
}
public void setEffective(Integer effective) {
this.effective = effective;
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater == null ? null : creater.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater == null ? null : updater.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}

@ -0,0 +1,32 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/2 18:13
* Description:
*/
package com.emr.entity;
public class File_Vo {
//文件地址
private String fileSrc;
//文件类别
private String selectVal;
public String getFileSrc() {
return fileSrc;
}
public void setFileSrc(String fileSrc) {
this.fileSrc = fileSrc == null ? null : fileSrc.trim();
}
public String getSelectVal() {
return selectVal;
}
public void setSelectVal(String selectVal) {
this.selectVal = selectVal == null ? null : selectVal.trim();
}
}

@ -0,0 +1,47 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 19:49
* Description:
*/
package com.emr.entity;
import com.github.pagehelper.Page;
import java.util.List;
public class OffsetLimitPage {
private Long total;
private List rows;
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 OffsetLimitPage() {
}
public OffsetLimitPage(List rows, Long total) {
this.rows = rows;
this.total = total;
}
public OffsetLimitPage(Page rows) {
this(rows, rows.getTotal());
}
}

@ -0,0 +1,45 @@
package com.emr.entity;
/**
* @Author:hjl
* @Date:Creatid in 15:44 2019/4/6
* @Description:
*/
public class Paper {
private long paperId;
private String paperName;
private int paperNum;
private String paperDetail;
public long getPaperId() {
return paperId;
}
public void setPaperId(long paperId) {
this.paperId = paperId;
}
public String getPaperName() {
return paperName;
}
public void setPaperName(String paperName) {
this.paperName = paperName;
}
public int getPaperNum() {
return paperNum;
}
public void setPaperNum(int paperNum) {
this.paperNum = paperNum;
}
public String getPaperDetail() {
return paperDetail;
}
public void setPaperDetail(String paperDetail) {
this.paperDetail = paperDetail;
}
}

@ -0,0 +1,195 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/22 13:48
* Description:
*/
package com.emr.entity;
import java.util.Set;
public class Power_User {
/**
* id
*/
private Integer userId;
/**
*
*/
private String userName;
/**
* 10
*/
private Integer userSex;
/**
*
*/
private Integer userAge;
/**
*
*/
private String userTel;
/**
*
*/
private String userEmail;
/**
*
*/
private String userPosition;
/**
* id
*/
private Integer roleId;
/**
*
*/
private Integer effective;
/**
*
*/
private String createDate;
/**
*
*/
private String creater;
/**
*
*/
private String updateDate;
/**
*
*/
private String updater;
/**
*
*/
private String remark;
/**
*
*/
private Set<String> menus;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Integer getUserSex() {
return userSex;
}
public void setUserSex(Integer userSex) {
this.userSex = userSex;
}
public Integer getUserAge() {
return userAge;
}
public void setUserAge(Integer userAge) {
this.userAge = userAge;
}
public String getUserTel() {
return userTel;
}
public void setUserTel(String userTel) {
this.userTel = userTel;
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getUserPosition() {
return userPosition;
}
public void setUserPosition(String userPosition) {
this.userPosition = userPosition;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getEffective() {
return effective;
}
public void setEffective(Integer effective) {
this.effective = effective;
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater;
}
public String getUpdateDate() {
return updateDate;
}
public void setUpdateDate(String updateDate) {
this.updateDate = updateDate;
}
public String getUpdater() {
return updater;
}
public void setUpdater(String updater) {
this.updater = updater;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Set<String> getMenus() {
return menus;
}
public void setMenus(Set<String> menus) {
this.menus = menus;
}
}

@ -0,0 +1,33 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/2 18:09
* Description:
*/
package com.emr.entity;
import java.util.List;
public class Upload_File_Vo {
private String masterID;
private List<File_Vo> list;
public String getMasterID() {
return masterID;
}
public void setMasterID(String masterID) {
this.masterID = masterID == null ? null : masterID.trim();
}
public List<File_Vo> getList() {
return list;
}
public void setList(List<File_Vo> list) {
this.list = list;
}
}

@ -0,0 +1,142 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/9/2 14:22
* Description:
*/
package com.emr.entity;
public class V_Count {
private String deptCode;
private String deptName;
private Integer inNum;
private Integer outNum;
private Integer fileNum;
private Integer unfileNum;
private Integer deathNum;
private String fileRate;
private String day2Rate;
private String day3Rate;
private String day7Rate;
private String startDate;
private String endDate;
public String getDeptCode() {
return deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public Integer getInNum() {
return inNum;
}
public void setInNum(Integer inNum) {
this.inNum = inNum;
}
public Integer getOutNum() {
return outNum;
}
public void setOutNum(Integer outNum) {
this.outNum = outNum;
}
public Integer getFileNum() {
return fileNum;
}
public void setFileNum(Integer fileNum) {
this.fileNum = fileNum;
}
public Integer getUnfileNum() {
return unfileNum;
}
public void setUnfileNum(Integer unfileNum) {
this.unfileNum = unfileNum;
}
public Integer getDeathNum() {
return deathNum;
}
public void setDeathNum(Integer deathNum) {
this.deathNum = deathNum;
}
public String getFileRate() {
return fileRate;
}
public void setFileRate(String fileRate) {
this.fileRate = fileRate;
}
public String getDay2Rate() {
return day2Rate;
}
public void setDay2Rate(String day2Rate) {
this.day2Rate = day2Rate;
}
public String getDay3Rate() {
return day3Rate;
}
public void setDay3Rate(String day3Rate) {
this.day3Rate = day3Rate;
}
public String getDay7Rate() {
return day7Rate;
}
public void setDay7Rate(String day7Rate) {
this.day7Rate = day7Rate;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
}

@ -0,0 +1,71 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:27
* Description:
*/
package com.emr.service;
import com.emr.entity.Archive_Detail;
import com.emr.entity.Archive_Detail_Vo;
import com.emr.entity.OffsetLimitPage;
import java.util.List;
public interface Archive_DetailService {
/**
*
*
* @param record
* @return
*/
List<Archive_Detail_Vo> selectByClo(Archive_Detail_Vo record);
/**
*
*
* @param record
* @return
*/
OffsetLimitPage detailByClo(Archive_Detail_Vo record, Integer offset, Integer limit);
/**
*
*
* @param record
* @return
*/
int updateCloById(Archive_Detail record);
/**
*
* @param record
* @return
*/
int insertSel(Archive_Detail record);
/**
* id
* @param id
* @return
*/
Archive_Detail selectByid(String id);
/**
* +
* @param record
* @return
*/
int deleteByClo(Archive_Detail record);
/**
*
* @param record
* @return
*/
List<Archive_Detail> selectByColm(Archive_Detail record);
List<Archive_Detail> selectByCol(Archive_Detail record);
}

@ -0,0 +1,96 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:27
* Description:
*/
package com.emr.service;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import java.util.List;
public interface Archive_MasterService {
/**
*
* @param archiveMasterVo
* @return
*/
OffsetLimitPage selectByCol(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master> selectByCol(Archive_Master_Vo archiveMasterVo);
/**
*
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master> selectByLast(Archive_Master_Vo archiveMasterVo);
/**
* '','退'
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master> selectByColumn(Archive_Master_Vo archiveMasterVo);
/**
*
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master> selectByUnfile(Archive_Master_Vo archiveMasterVo);
/**
* '','退'
*
* @param archiveMasterVo
* @return
*/
OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
*
*
* @param archiveMasterVo
* @return
*/
OffsetLimitPage selectByUnfile(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
*
*
* @param archiveMasterVo
* @return
*/
OffsetLimitPage selectByLast(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
*
* @param record
* @return
*/
int updateByClo(Archive_Master record);
/**
* id
* @param record
* @return
*/
int updateById(Archive_Master record);
}

@ -0,0 +1,13 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:27
* Description:
*/
package com.emr.service;
public interface Emr_Archive_DetailService {
}

@ -0,0 +1,47 @@
package com.emr.service;
import com.emr.entity.Emr_Dictionary;
import java.util.List;
public interface Emr_DictionaryService {
/**
*
*
* @param emrDictionary
* @return
*/
List<Emr_Dictionary> dicByTypeCode(Emr_Dictionary emrDictionary);
/**
*
*
* @param emrDictionary
* @return
*/
List<Emr_Dictionary> dicByClo(Emr_Dictionary emrDictionary);
/**
*
*
* @param emrDictionary
* @return
*/
int insertSel(Emr_Dictionary emrDictionary);
/**
* id
*
* @param id
* @return
*/
int delById(Integer id);
/**
* id
*
* @param emrDictionary
* @return
*/
int updateCloById(Emr_Dictionary emrDictionary);
}

@ -0,0 +1,54 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:27
* Description:
*/
package com.emr.service;
import com.emr.entity.Emr_Fault_Detail;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.entity.OffsetLimitPage;
import java.util.List;
public interface Emr_Fault_DetailService {
/**
*
* @param emrFaultVo
* @param offset
* @param limit
* @return
*/
OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit);
/**
*
* @param emrFaultVo
* @return
*/
List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo);
/**
* id
* @param emrFaultDetail
* @return
*/
int updateCloByPrimaryKey(Emr_Fault_Detail emrFaultDetail);
/**
* 退
* @param record
* @return
*/
Emr_Fault_Detail selectByArchiveDetailId(Emr_Fault_Detail record);
/**
* 退
* @param record
* @return
*/
int insertSel(Emr_Fault_Detail record);
}

@ -0,0 +1,53 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:35
* Description:
*/
package com.emr.service;
import com.emr.entity.Emr_Fault_Type;
import java.util.List;
public interface Emr_Fault_TypeService {
/**
*
* @param record
* @return
*/
List<Emr_Fault_Type> selectByCol(Emr_Fault_Type record);
/**
*
*
* @param record
* @return
*/
int updateByClo(Emr_Fault_Type record);
/**
*
* @param record
* @return
*/
int insertClo(Emr_Fault_Type record);
/**
* id
* @param id
* @return
*/
int delById(Integer id);
/**
* id
*
* @param id
* @return
*/
Emr_Fault_Type selectById(Integer id);
}

@ -0,0 +1,51 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:28
* Description:
*/
package com.emr.service;
import com.emr.entity.Emr_Picture;
import java.util.List;
public interface Emr_PictureService {
/**
* id
* @param id
* @return
*/
Emr_Picture selectByid(String id);
/**
*
* @param record
* @return
*/
int insertSel(Emr_Picture record);
/**
* id
* @param record
* @return
*/
int updateCloByIdOrFlay(Emr_Picture record);
/**
*
* @param record
* @return
*/
List<Emr_Picture> selectByClo(Emr_Picture record);
/**
* id
* @param id
* @return
*/
int deleteById(String id);
}

@ -0,0 +1,53 @@
package com.emr.service;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.entity.Emr_Log;
import com.emr.entity.Emr_Log_Vo;
import com.emr.entity.OffsetLimitPage;
import java.util.List;
public interface LogService {
/**
*
* @param log
*/
int insert(Emr_Log log);
/**
*
*
* @param log
*/
int insertSelective(Emr_Log log);
/**
* id
* @param logId
*/
void deleteLogById(Integer logId);
/**
*
* @param emr_log_vo
* @param offset
* @param limit
* @return
*/
OffsetLimitPage selectByCol(Emr_Log_Vo emr_log_vo, Integer offset, Integer limit);
/**
*
* @param emr_log_vo
* @return
*/
List<Emr_Log_Vo> selectByCol(Emr_Log_Vo emr_log_vo);
/**
* logTitle
* @param logTitle
* @return
*/
Emr_Log lastBylogTitle(String logTitle);
}

@ -0,0 +1,22 @@
package com.emr.service;
import com.emr.entity.Paper;
import java.util.List;
/**
* @Author:hjl
* @Date:Creatid in 15:46 2019/4/6
* @Description:
*/
public interface PaperService {
int addPaper(Paper paper);
int deletePaperById(long id);
int updatePaper(Paper paper);
Paper queryById(long id);
List<Paper> queryAllPaper();
}

@ -0,0 +1,32 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:35
* Description:
*/
package com.emr.service;
import com.emr.entity.*;
import java.util.List;
public interface V_CountService {
/**
*
* @param record
* @return
*/
List<V_Count> selectByCol(V_Count record);
/**
*
*
* @param record
* @return
*/
OffsetLimitPage selectPageByClo(V_Count record, Integer offset, Integer limit);
}

@ -0,0 +1,74 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:37
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Archive_DetailMapper;
import com.emr.entity.Archive_Detail;
import com.emr.entity.Archive_Detail_Vo;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_DetailService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class Archive_DetailServiceImpl implements Archive_DetailService {
@Autowired
private Archive_DetailMapper archiveDetailMapper;
@Override
public List<Archive_Detail_Vo> selectByClo(Archive_Detail_Vo record) {
return archiveDetailMapper.selectByClo(record);
}
@Override
public OffsetLimitPage detailByClo(Archive_Detail_Vo record, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Detail_Vo> list = archiveDetailMapper.detailByClo(record);
return new OffsetLimitPage((Page) list);
}
@Override
public int updateCloById(Archive_Detail record) {
return archiveDetailMapper.updateCloById(record);
}
@Override
public int insertSel(Archive_Detail record) {
return archiveDetailMapper.insertSel(record);
}
@Override
public Archive_Detail selectByid(String id) {
return archiveDetailMapper.selectByid(id);
}
@Override
public int deleteByClo(Archive_Detail record) {
return archiveDetailMapper.deleteByClo(record);
}
@Override
public List<Archive_Detail> selectByColm(Archive_Detail record) {
return archiveDetailMapper.selectByColm(record);
}
@Override
public List<Archive_Detail> selectByCol(Archive_Detail record) {
return archiveDetailMapper.selectByCol(record);
}
}

@ -0,0 +1,97 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:39
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
public class Archive_MasterServiceImpl implements Archive_MasterService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Override
public OffsetLimitPage selectByCol(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
//archiveMasterVo.setDeptAdmissionTo("20050102,20070102");
List<Archive_Master> list= archiveMasterMapper.selectByCol(archiveMasterVo);
return new OffsetLimitPage((Page) list);
}
@Override
public List<Archive_Master> selectByCol(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectByCol(archiveMasterVo);
}
@Override
public List<Archive_Master> selectByColumn(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectByColumn(archiveMasterVo);
}
@Override
public List<Archive_Master> selectByUnfile(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectByUnfile(archiveMasterVo);
}
@Override
public List<Archive_Master> selectByLast(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectByLast(archiveMasterVo);
}
@Override
public OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master> list = archiveMasterMapper.selectByColumn(archiveMasterVo);
return new OffsetLimitPage((Page) list);
}
@Override
public OffsetLimitPage selectByUnfile(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master> list = archiveMasterMapper.selectByUnfile(archiveMasterVo);
return new OffsetLimitPage((Page) list);
}
@Override
public OffsetLimitPage selectByLast(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master> list = archiveMasterMapper.selectByLast(archiveMasterVo);
return new OffsetLimitPage((Page) list);
}
@Override
public int updateByClo(Archive_Master record) {
return archiveMasterMapper.updateByClo(record);
}
@Override
public int updateById(Archive_Master record) {
return archiveMasterMapper.updateById(record);
}
}

@ -0,0 +1,21 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:41
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Archive_DetailMapper;
import com.emr.service.Emr_Archive_DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class Emr_Archive_DetailServiceImpl implements Emr_Archive_DetailService {
@Autowired
private Emr_Archive_DetailMapper emrArchiveDetailMapper;
}

@ -0,0 +1,49 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/26 15:51
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Archive_DetailMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.entity.Emr_Dictionary;
import com.emr.service.Emr_DictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class Emr_DictionaryServiceImpl implements Emr_DictionaryService {
@Autowired
private Emr_DictionaryMapper emrDictionaryMapper;
@Override
public List<Emr_Dictionary> dicByTypeCode(Emr_Dictionary emrDictionary) {
return emrDictionaryMapper.dicByTypeCode(emrDictionary);
}
@Override
public List<Emr_Dictionary> dicByClo(Emr_Dictionary emrDictionary) {
return emrDictionaryMapper.dicByClo(emrDictionary);
}
@Override
public int insertSel(Emr_Dictionary emrDictionary) {
return emrDictionaryMapper.insertSel(emrDictionary);
}
@Override
public int delById(Integer id) {
return emrDictionaryMapper.delById(id);
}
@Override
public int updateCloById(Emr_Dictionary emrDictionary) {
return emrDictionaryMapper.updateCloById(emrDictionary);
}
}

@ -0,0 +1,108 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:43
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Fault_DetailMapper;
import com.emr.entity.*;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
@Autowired
private Emr_Fault_DetailMapper emrFaultDetailMapper;
@Autowired
private Emr_Fault_TypeService emrFaultTypeService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
/**
*
* @param emrFaultVo
* @return
*/
@Override
public OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
//return emrFaultDetailMapper.selectByCol(emrFaultDetail);
PageHelper.offsetPage(offset, limit);
List<Emr_Fault_Vo> list = emrFaultDetailMapper.selectByCol(emrFaultVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
//获取缺陷类别列表
Emr_Fault_Type obj = new Emr_Fault_Type();
obj.setEffective(1);
List<Emr_Fault_Type> typeLis = emrFaultTypeService.selectByCol(obj);
for (int i = 0; i < list.size(); i++) {
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode())) || (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
//出院科室
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
}
}
String assortId = list.get(i).getAssortId();
if(assortId!="" && assortId!=null) {
String[] assorArr = assortId.split(",");
//替换类别
for (int j = 0; j < typeLis.size(); j++) {
String id = String.valueOf(typeLis.get(j).getId());
if (Arrays.asList(assorArr).contains(id)) {
assortId = assortId.replace(id, typeLis.get(j).getTypeName());
list.get(i).setAssortId(assortId);
}
}
}
}
return new OffsetLimitPage((Page) list);
}
@Override
public List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo) {
return emrFaultDetailMapper.selectByCol(emrFaultVo);
}
@Override
public int updateCloByPrimaryKey(Emr_Fault_Detail emrFaultDetail) {
return emrFaultDetailMapper.updateCloByPrimaryKey(emrFaultDetail);
}
@Override
public Emr_Fault_Detail selectByArchiveDetailId(Emr_Fault_Detail record) {
return emrFaultDetailMapper.selectByArchiveDetailId(record);
}
@Override
public int insertSel(Emr_Fault_Detail record) {
return emrFaultDetailMapper.insertSel(record);
}
}

@ -0,0 +1,49 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:46
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Fault_TypeMapper;
import com.emr.entity.Emr_Fault_Type;
import com.emr.service.Emr_Fault_TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class Emr_Fault_TypeServiceImpl implements Emr_Fault_TypeService {
@Autowired
private Emr_Fault_TypeMapper emrFaultTypeMapper;
@Override
public List<Emr_Fault_Type> selectByCol(Emr_Fault_Type record) {
return emrFaultTypeMapper.selectByCol(record);
}
@Override
public int updateByClo(Emr_Fault_Type record) {
return emrFaultTypeMapper.updateByClo(record);
}
@Override
public int insertClo(Emr_Fault_Type record) {
return emrFaultTypeMapper.insertClo(record);
}
@Override
public int delById(Integer id) {
return emrFaultTypeMapper.delById(id);
}
@Override
public Emr_Fault_Type selectById(Integer id) {
return emrFaultTypeMapper.selectById(id);
}
}

@ -0,0 +1,51 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:48
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_PictureMapper;
import com.emr.entity.Emr_Picture;
import com.emr.service.Emr_PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class Emr_PictureServiceImpl implements Emr_PictureService {
@Autowired
private Emr_PictureMapper emrPictureMapper;
@Override
public Emr_Picture selectByid(String id) {
return emrPictureMapper.selectByid(id);
}
@Override
public int insertSel(Emr_Picture record) {
return emrPictureMapper.insertSel(record);
}
@Override
public int updateCloByIdOrFlay(Emr_Picture record) {
return emrPictureMapper.updateCloByIdOrFlay(record);
}
@Override
public List<Emr_Picture> selectByClo(Emr_Picture record) {
return emrPictureMapper.selectByClo(record);
}
@Override
public int deleteById(String id) {
return emrPictureMapper.deleteById(id);
}
}

@ -0,0 +1,55 @@
package com.emr.service.ipml;
import com.emr.dao.Emr_LogMapper;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.entity.Emr_Log;
import com.emr.entity.Emr_Log_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.LogService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class LogServiceImpl implements LogService {
@Autowired
private Emr_LogMapper logMapper;
@Override
public int insert(Emr_Log log) {
return logMapper.insert(log);
}
@Override
public int insertSelective(Emr_Log log) {
return logMapper.insertSelective(log);
}
@Override
public void deleteLogById(Integer logId) {
logMapper.deleteByPrimaryKey(logId);
}
@Override
public OffsetLimitPage selectByCol(Emr_Log_Vo emr_log_vo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Emr_Log_Vo> newsInfoList = logMapper.selectByCol(emr_log_vo);
return new OffsetLimitPage((Page) newsInfoList);
}
@Override
public List<Emr_Log_Vo> selectByCol(Emr_Log_Vo emr_log_vo) {
return logMapper.selectByCol(emr_log_vo);
}
@Override
public Emr_Log lastBylogTitle(String logTitle) {
return logMapper.lastBylogTitle(logTitle);
}
}

@ -0,0 +1,46 @@
package com.emr.service.ipml;
import com.emr.dao.PaperDao;
import com.emr.entity.Paper;
import com.emr.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author:hjl
* @Date:Creatid in 15:47 2019/4/6
* @Description:
*/
@Service
public class PaperServiceImpl implements PaperService {
@Autowired
private PaperDao paperDao;
@Override
public int addPaper(Paper paper) {
return paperDao.addPaper(paper);
}
@Override
public int deletePaperById(long id) {
return paperDao.deletePaperById(id);
}
@Override
public int updatePaper(Paper paper) {
return paperDao.updatePaper(paper);
}
@Override
public Paper queryById(long id) {
return paperDao.queryById(id);
}
@Override
public List<Paper> queryAllPaper() {
return paperDao.queryAllPaper();
}
}

@ -0,0 +1,42 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 15:46
* Description:
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Fault_TypeMapper;
import com.emr.dao.Emr_LogMapper;
import com.emr.dao.V_CountMapper;
import com.emr.entity.*;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.service.V_CountService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
public class V_CountServiceImpl implements V_CountService {
@Autowired
private V_CountMapper vCountMapper;
@Override
public List<V_Count> selectByCol(V_Count record) {
return vCountMapper.selectByCol(record);
}
@Override
public OffsetLimitPage selectPageByClo(V_Count record, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<V_Count> list = vCountMapper.selectByCol(record);
return new OffsetLimitPage((Page) list);
}
}

@ -0,0 +1,119 @@
package com.emr.shiro;
import com.alibaba.fastjson.JSONObject;
import com.emr.util.HttpClientUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.List;
/**
* @author HJL
* @create 2019/4/29
*/
public class MyRealm extends AuthorizingRealm {
//获取权限列表
/*@Autowired
private PermissionService permissionService;
//获取用户
@Autowired
private UserService userService;
////获取用户角色
@Autowired
private RoleService roleService;*/
@Value("${powerUrl}")
private String powerUrl;
/**
* , .
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
//获取登录时输入的用户名
String username = (String) principalCollection.getPrimaryPrincipal();
if (username != null) {
//获取用户信息
//User user = userService.getUserByUsername(username);
//获取用户角色
//List<Role> roles = roleService.getRoles(username);
//获取权限列表
//List<String> permission = permissionService.getTheUrl(user.getId());
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
info.addStringPermission("/login");
info.addStringPermission("index");
info.addRole("0");
// String url = powerUrl + "?sysFlag=emr_medical_record&userName=" + username;
// JSONObject obj = HttpClientUtils.httpGet(url);
// if (obj != null) {
// if ((obj.getString("code")).equals("100")) {
//
// }
// }
/* if (permission != null && !permission.isEmpty()) {
for (String url : permission) {
info.addStringPermission(url);//加入权限
}
}
if (roles != null && !roles.isEmpty()) {
for (Role role : roles) {
info.addRole(role.getRole());//加入角色
}
}*/
return info;
}
return null;
}
/**
* ,.
*/
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
UsernamePasswordToken token = (UsernamePasswordToken) authenticationToken;
//通过表单接收的用户名
String username = token.getUsername();
String userpwd = String.valueOf(token.getPassword());
if (username != null && !"".equals(username)) {
/*User user = userService.getUserByUsername(username);
if (user != null) {
return new SimpleAuthenticationInfo(user.getUsername(), user.getPassword(), getName());
}
http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag?sysFlag=emr_medical_record&userName=admin*/
String url = powerUrl+"?sysFlag=emr_medical_record&userName="+ username;
JSONObject obj = HttpClientUtils.httpGet(url);
if(obj!=null){
if((obj.getString("code")).equals("100")){
//当验证都通过后,把用户信息放在 session 里
Session session = SecurityUtils.getSubject().getSession();
// session.setTimeout(30*24 * 60 * 60);//以秒为单位即在没有活动30分钟后session将失效
session.setAttribute("menuList", obj);
//session.setAttribute("userSession",username);
//session.setAttribute("userSessionId", users.get(0).getId());
//session.setAttribute("userRoles", org.apache.commons.lang.StringUtils.join(roleList, ","));
//当验证都通过后,把用户信息放在 session 里
JSONObject list= (JSONObject) obj.getJSONObject("extend");
//System.out.println(list);
session.setAttribute("userSession", username);
return new SimpleAuthenticationInfo(username, userpwd, getName());
}
}
}
System.out.println("认证失败");
return null;
}
}

@ -0,0 +1,42 @@
package com.emr.util;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
*
* @Author:
* @Date:
* @Version 1.0
*/
public class ActionScopeUtils {
public static HttpSession getSession(HttpServletRequest request){
return request.getSession();
}
public static HttpServletRequest getRequest(){
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
public static void setSessionAttribute(String key,Object value){
getSession(getRequest()).setAttribute(key,value);
}
public static Object getSessionAttribute(String key){
return getSession(getRequest()).getAttribute(key);
}
public static void setRequestAttribute(String key,Object value){
getRequest().setAttribute(key,value);
}
public static Object getRequestAttribute(String key){
return getRequest().getAttribute(key);
}
}

@ -0,0 +1,201 @@
/**
* Excel
* @version 1.0
*/
package com.emr.util;
import org.apache.commons.lang3.CharUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class ExportExcelUtil {
private final int SPLIT_COUNT = 1000000; //Excel每个工作簿的行数
private static List<String> fieldName = null; //excel标题数据集
private static List<List<String>> fieldData = null; //excel数据内容
private String fileName;//excel文件名
private HSSFWorkbook workBook = null;
/**
* ,list
* */
public List<String> getFieldName(String tableThNames){
String[] names = tableThNames.split(",");
List<String> fieldName = new ArrayList<>();
if (names != null) {
for (int i = 0; i < names.length; i++) {
if (StringUtils.isNoneBlank(names[i])) {
fieldName.add(names[i]);
}
}
}
return fieldName;
}
/**
* ,1.list 2.list
* */
public List<List<String>> getFieldData(String fieldCns, Collection list){
List<List<String>> fieldData = new ArrayList<List<String>>();
String[] fieldList = fieldCns.split(",");
Object[] objects = list.toArray();
for (Object object : objects) {
List<String> data = new ArrayList<String>();
for (String english : fieldList) {
String field = fieldToProperty(english);
String value = getFieldValueByFieldName(field,object);
data.add(value);
}
fieldData.add(data);
}
return fieldData;
}
/**
* excel
* tableThNames",",
* fieldCns","name,age
* list:
* fileName:excel
* response:
* */
public void expordExcel(String tableThNames,String fieldCns,Collection list,String fileName,HttpServletResponse response) throws Exception {
this.fieldName = getFieldName(tableThNames);
this.fieldData = getFieldData(fieldCns,list);
this.fileName = fileName;
OutputStream os = response.getOutputStream();
//导出excel建议加上重置输出流可以不加该代码但是如果不加必须要保证输出流中不应该在存在其他数据否则导出会有问题
response.reset();
//处理乱码
fileName = new String(fileName.getBytes("gbk"), "iso-8859-1");
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment;filename=" + fileName);
response.setBufferSize(1024);
workBook = createWorkbook();
workBook.write(os);//将excel中的数据写到输出流中用于文件的输出
os.close();
}
/**
* HSSFWorkbook
* @return HSSFWorkbook
*/
public HSSFWorkbook createWorkbook() {
workBook = new HSSFWorkbook();//创建一个工作薄对象
int rows = fieldData.size();//总的记录数
int sheetNum = 0; //指定sheet的页数
if (rows % SPLIT_COUNT == 0) {
sheetNum = rows / SPLIT_COUNT;
} else {
sheetNum = rows / SPLIT_COUNT + 1;
}
for (int i = 1; i <= sheetNum; i++) {//循环2个sheet的值
HSSFSheet sheet = workBook.createSheet("Page " + i);//使用workbook对象创建sheet对象
HSSFRow headRow = sheet.createRow((short) 0); //创建行0表示第一行本例是excel的标题
/**************对标题添加样式begin********************/
HSSFCellStyle cellStyle = workBook.createCellStyle();//创建列的样式对象
//水平居中
cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
//垂直居中
cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
HSSFFont font = workBook.createFont();//创建字体对象
//字体加粗
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
//字体颜色变红
font.setColor(HSSFColor.RED.index);
//如果font中存在设置后的字体并放置到cellStyle对象中此时该单元格中就具有了样式字体
cellStyle.setFont(font);
/**************对标题添加样式end********************/
for (int j = 0; j < fieldName.size(); j++) {//循环excel的标题
HSSFCell cell = headRow.createCell( j);//使用行对象创建列对象0表示第1列
//设置列的宽度/
sheet.setColumnWidth(j, 6000);
//添加样式
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
if(fieldName.get(j) != null){
//将创建好的样式放置到对应的单元格中
cell.setCellStyle(cellStyle);
cell.setCellValue((String) fieldName.get(j));//为标题中的单元格设置值
}else{
cell.setCellValue("-");
}
}
//分页处理excel的数据遍历所有的结果
for (int k = 0; k < (rows < SPLIT_COUNT ? rows : SPLIT_COUNT); k++) {
if (((i - 1) * SPLIT_COUNT + k) >= rows)//如果数据超出总的记录数的时候,就退出循环
break;
HSSFRow row = sheet.createRow((short) (k + 1));//创建1行
//分页处理获取每页的结果集并将数据内容放入excel单元格
ArrayList<String> rowList = (ArrayList<String>) fieldData.get((i - 1) * SPLIT_COUNT + k);
for (int n = 0; n < rowList.size(); n++) {//遍历某一行的结果
HSSFCell cell = row.createCell( n);//使用行创建列对象
if(rowList.get(n) != null){
cell.setCellValue((String) rowList.get(n).toString());
}else{
cell.setCellValue("");
}
}
}
}
return workBook;
}
/**
* user_name to userName
* @param field
* @return
*/
public static String fieldToProperty(String field) {
if (null == field) {
return "";
}
char[] chars = field.toCharArray();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (c == '_') {
int j = i + 1;
if (j < chars.length) {
sb.append(StringUtils.upperCase(CharUtils.toString(chars[j])));
i++;
}
} else {
sb.append(c);
}
}
return sb.toString();
}
/**
*
*
* @param fieldName
* @param object
* @return
*/
public static String getFieldValueByFieldName(String fieldName, Object object) {
try {
Field field = object.getClass().getDeclaredField(fieldName);
//设置对象的访问权限保证对private的属性的访问
field.setAccessible(true);
return field.get(object).toString();
} catch (Exception e) {
return null;
}
}
}

@ -0,0 +1,282 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/6/13 18:49
* Description:
*/
package com.emr.util;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* HttpClient4.3
*
* @author
*/
public class HttpClientUtils {
private static Logger logger = LoggerFactory.getLogger(HttpClientUtils.class); // 日志记录
private static RequestConfig requestConfig = null;
static {
// 设置请求和传输超时时间
requestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000).build();
}
/**
* postjson
*
* @param url url
* @param jsonParam
* @return
*/
public static JSONObject httpPost(String url, JSONObject jsonParam) {
// post请求返回结果
CloseableHttpClient httpClient = HttpClients.createDefault();
JSONObject jsonResult = null;
HttpPost httpPost = new HttpPost(url);
// 设置请求和传输超时时间
httpPost.setConfig(requestConfig);
try {
if (null != jsonParam) {
// 解决中文乱码问题
StringEntity entity = new StringEntity(jsonParam.toString(), "utf-8");
entity.setContentEncoding("UTF-8");
entity.setContentType("application/json");
httpPost.setEntity(entity);
}
CloseableHttpResponse result = httpClient.execute(httpPost);
// 请求发送成功,并得到响应
if (result.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String str = "";
try {
// 读取服务器返回过来的json字符串数据
str = EntityUtils.toString(result.getEntity(), "utf-8");
// 把json字符串转换成json对象
jsonResult = JSONObject.parseObject(str);
} catch (Exception e) {
logger.error("post请求提交失败:" + url, e);
}
}
} catch (IOException e) {
logger.error("post请求提交失败:" + url, e);
} finally {
httpPost.releaseConnection();
}
return jsonResult;
}
/**
* postString name=Jack&sex=1&type=2
* Content-type:application/x-www-form-urlencoded
*
* @param url url
* @param strParam
* @return
*/
public static JSONObject httpPost(String url, String strParam) {
// post请求返回结果
CloseableHttpClient httpClient = HttpClients.createDefault();
JSONObject jsonResult = null;
HttpPost httpPost = new HttpPost(url);
httpPost.setConfig(requestConfig);
try {
if (null != strParam) {
// 解决中文乱码问题
StringEntity entity = new StringEntity(strParam, "utf-8");
entity.setContentEncoding("UTF-8");
entity.setContentType("application/x-www-form-urlencoded");
httpPost.setEntity(entity);
}
CloseableHttpResponse result = httpClient.execute(httpPost);
// 请求发送成功,并得到响应
if (result.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String str = "";
try {
// 读取服务器返回过来的json字符串数据
str = EntityUtils.toString(result.getEntity(), "utf-8");
// 把json字符串转换成json对象
jsonResult = JSONObject.parseObject(str);
} catch (Exception e) {
logger.error("post请求提交失败:" + url, e);
}
}
} catch (IOException e) {
logger.error("post请求提交失败:" + url, e);
} finally {
httpPost.releaseConnection();
}
return jsonResult;
}
/**
* get
*
* @param url
* @return
*/
public static JSONObject httpGet(String url) {
// get请求返回结果
JSONObject jsonResult = null;
CloseableHttpClient client = HttpClients.createDefault();
// 发送get请求
HttpGet request = new HttpGet(url);
request.setConfig(requestConfig);
try {
CloseableHttpResponse response = client.execute(request);
// 请求发送成功,并得到响应
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
// 读取服务器返回过来的json字符串数据
HttpEntity entity = response.getEntity();
String strResult = EntityUtils.toString(entity, "utf-8");
// 把json字符串转换成json对象
jsonResult = JSONObject.parseObject(strResult);
} else {
logger.error("get请求提交失败:" + url);
}
} catch (IOException e) {
logger.error("get请求提交失败:" + url, e);
} finally {
request.releaseConnection();
}
return jsonResult;
}
public static String doGet(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpclient = HttpClients.createDefault();
String resultString = "";
CloseableHttpResponse response = null;
try {
// 创建uri
URIBuilder builder = new URIBuilder(url);
if (param != null) {
for (String key : param.keySet()) {
builder.addParameter(key, param.get(key));
}
}
URI uri = builder.build();
// 创建http GET请求
HttpGet httpGet = new HttpGet(uri);
// 执行请求
response = httpclient.execute(httpGet);
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (response != null) {
response.close();
}
httpclient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
public static String doGet(String url) {
return doGet(url, null);
}
public static String doPost(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建参数列表
if (param != null) {
List<NameValuePair> paramList = new ArrayList<>();
for (String key : param.keySet()) {
paramList.add(new BasicNameValuePair(key, param.get(key)));
}
// 模拟表单
// UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
// 模拟表单(后面是转码发送utf8格式的中文)
StringEntity entity = new UrlEncodedFormEntity(paramList, "utf-8");
httpPost.setEntity(entity);
}
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return resultString;
}
public static String doPost(String url) {
return doPost(url, null);
}
public static String doPostJson(String url, String json) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建请求内容
StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
httpPost.setEntity(entity);
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return resultString;
}
}

@ -0,0 +1,127 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/9/17 9:26
* Description:
*/
package com.emr.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.PdfCopy;
import com.itextpdf.text.pdf.PdfImportedPage;
import com.itextpdf.text.pdf.PdfReader;
import org.springframework.beans.factory.annotation.Value;
public class PDFUtils {
public static void main(String[] args) {
// File[] pdfs = new File[9];
// pdfs[0] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\d10db823-7af0-407f-bfb9-cb992a271dac.pdf");
// pdfs[1] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\dc37ad48-5392-4239-bb07-d39a6d975a4b.pdf");
// pdfs[2] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\4c981c6e-30a6-45de-a4d2-ec8ffa92b2ab.pdf");
// pdfs[3] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\52dd7990-2377-4c3a-9b65-8bf0a72b0bfa.pdf");
// pdfs[4] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\c145b11c-923d-4a4f-a387-2041ae08e4c0.pdf");
//
// pdfs[5] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\c145b11c-923d-4a4f-a387-2041ae08e4c0.pdf");
// pdfs[6] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\aaa58453-838f-49b0-8623-72188d7ef634.pdf");
// pdfs[7] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\0000b5c4-5e91-4252-895c-b92560800064.pdf");
// pdfs[8] = new File("C:\\Users\\Administrator\\Desktop\\病案pdf\\1422482_1\\1f9babf2-8e61-4659-aafa-7231fe6cbfd8.pdf");
// File mergedPdf = new File("C:\\Users\\Administrator\\Desktop\\cs2\\MergedDiagram1.pdf");
// try {
// merge(pdfs, mergedPdf);
// } catch (IOException | DocumentException e) {
// e.printStackTrace();
// }
String projectPath = System.getProperty("user.dir") + "\\static\\img\\pdfFiles\\typesPdf\\";
System.out.println("projectPath==" + projectPath);
PDFUtils.delAllFile(projectPath);
}
//删除指定文件夹下的所有文件
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;
}
if (!file.isDirectory()) {
return flag;
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
} else {
temp = new File(path + File.separator + tempList[i]);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
//delFolder(path + "/" + tempList[i]);//再删除空文件夹
flag = true;
}
}
return flag;
}
public static void getPdf(String filePath, List pathArr){
if(pathArr!=null) {
File[] pdfs = new File[pathArr.size()];
for (int i = 0; i < pathArr.size(); i++) {
pdfs[i] = new File(pathArr.get(i).toString());
}
File mergedPdf = new File(filePath);
try {
merge(pdfs, mergedPdf);
} catch (IOException | DocumentException e) {
e.printStackTrace();
}
}
}
/**
* @param pages
* @param pdffile
* @throws IOException
* @throws DocumentException
*/
public static void merge(File[] pages, File pdffile) throws IOException,
DocumentException {
if (!pdffile.exists()) {
pdffile.createNewFile();
}
System.out.println(pages.length);
if (pages.length < 1)
return;
Document document = new Document(new PdfReader(
((File) pages[0]).getAbsolutePath()).getPageSize(1));
PdfCopy copy = new PdfCopy(document, new FileOutputStream(pdffile));
document.open();
for (int i = 0; i < pages.length; i++) {
PdfReader reader = new PdfReader((pages[i]).getAbsolutePath());
int num = reader.getNumberOfPages();
for (int j = 1; j <= num; j++) {
document.newPage();
PdfImportedPage page = copy.getImportedPage(reader, j);
copy.addPage(page);
}
}
System.out.println("----------------------------------");
document.close();
// for (File page : pages) {
// page.deleteOnExit();
// }
}
}

@ -0,0 +1,141 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 19:20
* Description:
*/
package com.emr.util;
import java.util.List;
public class PageBean<T> {
//已知数据
private int pageNum; //当前页,从请求那边传过来。
private int pageSize; //每页显示的数据条数。
private int totalRecord; //总的记录条数。查询数据库得到的数据
//需要计算得来
private int totalPage; //总页数通过totalRecord和pageSize计算可以得来
//开始索引也就是我们在数据库中要从第几行数据开始拿有了startIndex和pageSize
//就知道了limit语句的两个数据就能获得每页需要显示的数据了
private int startIndex;
//将每页要显示的数据放在list集合中
private List<T> list;
//分页显示的页数,比如在页面上显示12345页start就为1end就为5这个也是算过来的
private int start;
private int end;
//通过pageNumpageSizetotalRecord计算得来tatalPage和startIndex
//构造方法中将pageNumpageSizetotalRecord获得
public PageBean(int pageNum, int pageSize, int totalRecord) {
this.pageNum = pageNum;
this.pageSize = pageSize;
this.totalRecord = totalRecord;
//totalPage 总页数
if (totalRecord % pageSize == 0) {
//说明整除正好每页显示pageSize条数据没有多余一页要显示少于pageSize条数据的
this.totalPage = totalRecord / pageSize;
} else {
//不整除,就要在加一页,来显示多余的数据。
this.totalPage = totalRecord / pageSize + 1;
}
//开始索引
this.startIndex = (pageNum - 1) * pageSize;
//显示5页这里自己可以设置想显示几页就自己通过下面算法修改
this.start = 1;
this.end = 5;
//显示页数的算法
if (totalPage <= 5) {
//总页数都小于5那么end就为总页数的值了。
this.end = this.totalPage;
} else {
//总页数大于5那么就要根据当前是第几页来判断start和end为多少了
this.start = pageNum - 2;
this.end = pageNum + 2;
if (start < 0) {
//比如当前页是第1页或者第2页那么就不如和这个规则
this.start = 1;
this.end = 5;
}
if (end > this.totalPage) {
//比如当前页是倒数第2页或者最后一页也同样不符合上面这个规则
this.end = totalPage;
this.start = end - 5;
}
}
}
//get、set方法。
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRecord() {
return totalRecord;
}
public void setTotalRecord(int totalRecord) {
this.totalRecord = totalRecord;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getStartIndex() {
return startIndex;
}
public void setStartIndex(int startIndex) {
this.startIndex = startIndex;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
}

@ -0,0 +1,292 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/31 19:49
* Description:
*/
package com.emr.util;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.imageio.ImageIO;
import com.emr.entity.Emr_Picture;
import com.lowagie.text.BadElementException;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Image;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.PdfWriter;
import org.apache.commons.io.FileUtils;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
/**
* PDFiTextpdf
*
* @author
*/
public class PrintToPdfUtil {
/**
* @param imageFolderPath
* @param pdfPath PDF
*/
public static void toPdf(String imageFolderPath, String pdfPath,List dirList) {
try {
//判断文件夹是否存在
String pdfStr = pdfPath.substring(0, pdfPath.lastIndexOf("\\"));
File fileDic = new File(pdfStr);
if (!fileDic.exists() && !fileDic.isDirectory()) {
fileDic.mkdirs();
}
//判断pdf是否存在将之前文件删除
File file1 = new File(pdfPath);
if (file1.exists() && file1.isFile()) {
file1.delete();
}
// 输入流
FileOutputStream fos = new FileOutputStream(pdfPath);
// 创建文档
Document doc = new Document(null, 0, 0, 0, 0);
//doc.open();
// 写入PDF文档
PdfWriter.getInstance(doc, fos);
// 获取图片文件夹对象
File file = new File(imageFolderPath);
//imageFolderPath = file.getAbsolutePath() + "\\";
imgFun(imageFolderPath,file, dirList, doc);
if (doc.isOpen()) {
// 关闭文档
doc.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void imgFun(String imageFolderPath,File file, List dirList, Document doc){
try {
// 图片地址
String imagePath = null;
// 读取图片流
BufferedImage img = null;
// 实例化图片
Image image = null;
File[] files = file.listFiles();
if (files.length > 0) {
// 循环获取图片文件夹内的图片
for (File file1 : files) {
if (file1.getName().endsWith(".png") || file1.getName().endsWith(".jpg") || file1.getName().endsWith(".gif")
|| file1.getName().endsWith(".jpeg") || file1.getName().endsWith(".tif")) {
imageFolderPath = file1.getAbsolutePath();
// 读取图片流
img = ImageIO.read(new File(imageFolderPath));
//String pdfStr=imageFolderPath.substring(0, imageFolderPath.lastIndexOf("\\")).replace("uploads", "pdfFiles");
//判断文件夹是否存在
//File fileDic = new File(pdfStr);
//if (!fileDic.exists() && !fileDic.isDirectory()) {
//fileDic.mkdirs();
//}
System.out.println("路径" + imageFolderPath);
doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight()));
// 根据图片大小设置文档大小
//doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight()));
// 实例化图片
image = Image.getInstance(imageFolderPath);
// 添加图片到文档
doc.open();
doc.add(image);
}
//file.getAbsolutePath().replaceFirst(path, " ");
if (file1.isDirectory()) {
if (dirList != null && dirList.size() > 0) {
if (dirList.indexOf(file1.getName()) != -1) {
System.out.println(file1.getAbsolutePath());
imageFolderPath = file1.getAbsolutePath() + "\\";
imgFun(imageFolderPath, file1, dirList, doc);
}
} else {
System.out.println(file1.getAbsolutePath());
imageFolderPath = file1.getAbsolutePath() + "\\";
imgFun(imageFolderPath, file1, dirList, doc);
}
}
}
}else{
System.out.println("空文件夹");
}
} catch(Exception e){
e.printStackTrace();
}
}
public static void pdtToPdf(String pdfFolderPath, String pdfPath, List dirList, List pdfList) {
try {
// 输入流
// FileOutputStream fos = new FileOutputStream(pdfPath);
// // 创建文档
Document doc = new Document(null, 0, 0, 0, 0);
// //doc.open();
// // 写入PDF文档
// PdfWriter.getInstance(doc, fos);
//
// // 获取文件夹对象
File file = new File(pdfFolderPath);
PDFMergerUtility mergePdf = new PDFMergerUtility();
//imageFolderPath = file.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file, dirList, pdfList, mergePdf);
mergePdf.setDestinationFileName(pdfPath);
mergePdf.mergeDocuments();
System.out.print("done");
// if (doc.isOpen()) {
// // 关闭文档
// doc.close();
// }
} catch (Exception e) {
e.printStackTrace();
}
}
public static void pdfFun(String pdfFolderPath, File file, List dirList,List pdfList, PDFMergerUtility mergePdf) {
try {
File[] files = file.listFiles();
if(file!=null)
if (files.length > 0) {
// 循环获取图片文件夹内的图片
for (File file1 : files) {
if (file1.getName().endsWith(".pdf")) {
//System.out.println(file1.length());
if (pdfList != null && pdfList.size() > 0) {
System.out.println("文件名:"+file1.getName());
if (pdfList.indexOf(file1.getName()) != -1) {
}else{
if (file1.length() == 0) {
//file.delete();
} else {
pdfFolderPath = file1.getAbsolutePath();
mergePdf.addSource(pdfFolderPath);
}
}
}else{
if (file1.length() == 0) {
//file.delete();
} else {
pdfFolderPath = file1.getAbsolutePath();
mergePdf.addSource(pdfFolderPath);
}
}
}
if (file1.isDirectory()) {
if (dirList != null && dirList.size() > 0) {
if (dirList.indexOf(file1.getName()) != -1) {
pdfFolderPath = file1.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file1, dirList, pdfList, mergePdf);
}
} else {
pdfFolderPath = file1.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file1, dirList, pdfList, mergePdf);
}
}
}
} else {
System.out.println("空文件夹");
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
*
* @param file
* @param filename
* @param savepath
* @return boolean (true:;false:)
*/
public static boolean save(File file, String filename, String savepath) {
filename = filename;
File f = new File(savepath, filename);
try {
FileUtils.copyFile(file, f);
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
public static void moveTotherFolders(String startPath, String endPath) {
try {
File startFile = new File(startPath);
File tmpFile = new File(endPath);//获取文件夹路径
if (!tmpFile.exists()) {//判断文件夹是否创建,没有创建则创建新文件夹
tmpFile.mkdirs();
}
System.out.println(endPath + startFile.getName());
if (startFile.renameTo(new File(endPath + startFile.getName()))) {
System.out.println("File is moved successful!");
//log.info("文件移动成功!文件名:《{}》 目标路径:{}", fileName, endPath);
} else {
System.out.println("File is failed to move!");
//log.info("文件移动失败!文件名:《{}》 起始路径:{}", fileName, startPath);
}
} catch (Exception e) {
//log.info("文件移动异常!文件名:《{}》 起始路径:{}", fileName, startPath);
}
}
public static void main(String[] args) {
String pdfFile = String.valueOf(System.currentTimeMillis());
//读取指定路径下的文件名和目录名
List list = new ArrayList();
//list.add("123");
//图片转PDF(病案号文件夹+类别文件夹)
//toPdf("C:/Users/Administrator/Desktop/cs/123123/", "C:/Users/Administrator/Desktop/cs/123123/" + pdfFile + ".pdf", list);
//过个pdf合成一个
//pdtToPdf("D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\pdfFiles\\1333ad3c4d6448c89372835dbad3c364\\", "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\pdfFiles\\typesPdf\\"+ pdfFile+".pdf", list);
//图片移动
moveTotherFolders("D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\1333ad3c4d6448c89372835dbad3c364\\HC3SL2HENH348M8X619PMCA7GC5R3125\\2019071905226021565006922724小程序界面.png","D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\1333ad3c4d6448c89372835dbad3c364\\SDV1QEHUPQRQ8GXJE4RQH0FGAS1V7HM0\\");
moveTotherFolders("D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp/static\\img\\uploads\\1333ad3c4d6448c89372835dbad3c364\\HC3SL2HENH348M8X619PMCA7GC5R3125\\2019071905226021565064554400fw.jpg", "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\1333ad3c4d6448c89372835dbad3c364\\3\\");
}
}

@ -0,0 +1,65 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/1 10:54
* Description:
*/
package com.emr.util;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class ReadFile {
/*
*
*/
public void getFileList(String path,List divList) {
File file = new File(path);
File[] fileList = file.listFiles();
for (int i = 0; i < fileList.length; i++) {
if (fileList[i].isFile()) {
String fileName = fileList[i].getName();
System.out.println("文件:" + fileName);
}
if (fileList[i].isDirectory()) {
//if(divList.indexOf(fileList[i].getName())!=-1) {
String fileName = fileList[i].getName();
System.out.println("目录:" + fileName);
// }
}
}
}
public static void printFile(File file) {
if (file.isFile()) {
System.out.println("您给定的是一个文件"); // 判断给定目录是否是一个合法的目录,如果不是,输出提示
} else {
File[] fileLists = file.listFiles(); // 如果是目录,获取该目录下的内容集合
for (int i = 0; i < fileLists.length; i++) { // 循环遍历这个集合内容
System.out.println(fileLists[i].getName()); //输出元素名称
if (fileLists[i].isDirectory()) { //判断元素是不是一个目录
printFile(fileLists[i]); //如果是目录,继续调用本方法来输出其子目录
}
}
}
}
public static void main(String[] args) {
printFile(new File("D:\\"));
// ReadFile rf = new ReadFile();
// List list=new ArrayList();
// list.add("log");
// list.add("logs");
// rf.getFileList("D:\\", list);
}
}

@ -0,0 +1,88 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/14 15:06
* Description:urlJava
*/
package com.emr.util;
import java.util.HashMap;
import java.util.Map;
/**
* @author
* @description url
* @date
*/
public class UrlUtil {
public static class UrlEntity {
/**
* url
*/
public String baseUrl;
/**
* url
*/
public Map<String, String> params;
}
/**
* url
*
* @param url
* @return
*/
public static UrlEntity parse(String url) {
UrlEntity entity = new UrlEntity();
if (url == null) {
return entity;
}
url = url.trim();
if (url.equals("")) {
return entity;
}
String[] urlParts = url.split("\\?");
entity.baseUrl = urlParts[0];
//没有参数
if (urlParts.length == 1) {
return entity;
}
//有参数
String[] params = urlParts[1].split("&");
entity.params = new HashMap<>();
for (String param : params) {
String[] keyValue = param.split("=");
entity.params.put(keyValue[0], keyValue[1]);
}
return entity;
}
/**
*
*
* @param args
*/
public static void main(String[] args) {
/*
null
null
http://www.123.com
null
http://www.123.com
{id=1}
http://www.123.com
{name=, id=1}
*/
UrlEntity entity = parse(null);
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com");
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com?id=1");
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com?id=1&name=小明");
System.out.println(entity.baseUrl + "\n" + entity.params);
}
}

@ -0,0 +1,59 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/1 16:07
* Description:
*/
package com.emr.util;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import java.io.File;
import java.io.IOException;
public class test {
private static String[] getFiles(String folder) throws IOException {
File _folder = new File(folder);
String[] filesInFolder;
if (_folder.isDirectory()) {
filesInFolder = _folder.list();
return filesInFolder;
} else {
throw new IOException("Path is not a directory");
}
}
private static void pdfToPdf(String folder,String fileName) throws Exception {
PDFMergerUtility mergePdf = new PDFMergerUtility();
String[] filesInFolder = getFiles(folder);
for (int i = 0; i < filesInFolder.length; i++){
mergePdf.addSource(folder + File.separator + filesInFolder[i]);
System.out.println(filesInFolder[i]);
}
mergePdf.setDestinationFileName(folder + File.separator + fileName);
System.out.println(folder);
mergePdf.mergeDocuments();
System.out.print("done");
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
// String folder = "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\pdfFiles";
// String fileName = "mergedTest.pdf";
//pdfToPdf(folder, fileName);
String str = "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\4\\a.jpg";
//获得第一个点的位置
int index = str.indexOf("\\static");
//String result = str.substring(0,index+1);
//输出结果
System.out.println(str.substring(index, str.length()));
}
}

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
<process id="leave_process" name="某公司请假流程">
<startEvent id="leave" name="请假申请"></startEvent>
<userTask id="dept_manager" name="部门经理审批"></userTask>
<userTask id="boss" name="总经理审批"></userTask>
<userTask id="hr" name="HR审批"></userTask>
<sequenceFlow id="flow1" sourceRef="leave" targetRef="dept_manager"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="dept_manager" targetRef="boss">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day >= 3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow3" sourceRef="boss" targetRef="hr"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="dept_manager" targetRef="hr">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day < 3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow5" sourceRef="hr" targetRef="end"></sequenceFlow>
<endEvent id="end" name="结束"></endEvent>
</process>
</definitions>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:property-placeholder location="classpath:config/jdbc.properties" />
<!--<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">-->
<!--<property name="databaseSchemaUpdate" value="drop-create"/>-->
<!--&lt;!&ndash;<property name="jdbcUrl" value="jdbc:postgresql://127.0.0.1/db_cloud"/>-->
<!--<property name="jdbcDriver" value="org.postgresql.Driver"/>-->
<!--<property name="jdbcUsername" value="admin"/>-->
<!--<property name="jdbcPassword" value="root"/>&ndash;&gt;-->
<!--<property name="jdbcUrl" value="${jdbc.url}"/>-->
<!--<property name="jdbcDriver" value="${jdbc.driver}"/>-->
<!--<property name="jdbcUsername" value="${jdbc.username}"/>-->
<!--<property name="jdbcPassword" value="${jdbc.password}"/>-->
<!--<property name="jobExecutorActivate" value="true"/>-->
<!--</bean>-->
</beans>

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/index"/><!--登录页面,-->
<property name="successUrl" value="/index.jsp"/><!--登录成功页面,如果自己设置了返回页面,则不跳转-->
<property name="unauthorizedUrl" value="/error"/><!-- 没有权限跳转的地址 -->
<property name="filterChainDefinitions">
<value>
/toLogin=anon <!--表示都可以访问-->
/static/**=anon <!--表示都可以访问-->
/error=authc
/test=anon
/login=anon
/home=perms[home] <!--perms表示需要该权限才能访问的页面-->
/admin=roles["admin"] <!-- roles["admin,user"] 只有拥有admin角色的用户才可访问同时需要拥有多个角色的话用引号引起来中间用逗号隔开-->
<!--/admin=anon-->
/**=authc <!--authc表示需要认证才能访问的页面-->
</value>
</property>
</bean>
<!-- 自定义Realm -->
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="MyRealm"/>
</bean>
<!-- 注入到自定义Realm -->
<bean id="MyRealm" class="com.emr.shiro.MyRealm">
<!-- 定义凭证匹配器 -->
<!-- <property name="credentialsMatcher" ref="credentialsMatcher"></property>-->
</bean>
<!--第一步:直接配置一个 securityManager -->
<!--<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">-->
<!--&lt;!&ndash;刚配置时先把这条注释掉等后面写了MyRealm.java时再把它的注释去掉因为如果没有去掉就会在-->
<!--tomcat开启时报一个错误 &ndash;&gt;-->
<!--&lt;!&ndash;<property name="realm" ref="myRealm" /> &ndash;&gt;-->
<!--</bean>-->
<!--<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>-->
<!--&lt;!&ndash; 第三步:把请求路径拦截之后的处理 &ndash;&gt;-->
<!--<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">-->
<!--&lt;!&ndash;shiro整个的处理都由securityManger指定和决定 &ndash;&gt;-->
<!--<property name="securityManager" ref="securityManager"/>-->
<!--&lt;!&ndash; loginUrl==>如果登录成功,跳转到哪个页面,或者执行哪个请求 &ndash;&gt;-->
<!--<property name="loginUrl" value="/login.jsp"/>-->
<!--&lt;!&ndash; 验证通过执行的请求或者跳转 &ndash;&gt;-->
<!--<property name="successUrl" value="/home.jsp"/>-->
<!--&lt;!&ndash; 验证不通过执行的请求或者跳转 &ndash;&gt;-->
<!--<property name="unauthorizedUrl" value="/unauthorized.jsp"/>-->
<!--&lt;!&ndash; 具体的拦截路径和拦截的方式和角色和权限的范围 &ndash;&gt;-->
<!--<property name="filterChainDefinitions">-->
<!--<value>-->
<!--</value>-->
<!--</property>-->
<!--</bean>-->
</beans>

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd">
<!-- 开启注解扫描 -->
<mvc:annotation-driven/>
<!-- 注解扫面包路径 -->
<context:component-scan base-package="com.emr">
<!-- 制定扫包规则 ,不扫描@Controller注解的JAVA类 -->
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
<!--启动任务定时器-->
<task:annotation-driven/>
<context:property-placeholder location="classpath:config/jdbc.properties" />
<!--配置数据源-->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.driver}"/> <!--数据库连接驱动-->
<property name="jdbcUrl" value="${jdbc.url}"/> <!--数据库地址-->
<property name="user" value="${jdbc.username}"/> <!--用户名-->
<property name="password" value="${jdbc.password}"/> <!--密码-->
<property name="maxPoolSize" value="40"/> <!-- 最大连接数-->
<property name="minPoolSize" value="1"/> <!--最小连接数-->
<property name="initialPoolSize" value="10"/> <!-- 初始化连接池内的数据库连接-->
<property name="maxIdleTime" value="20"/> <!--最大空闲时间-->
</bean>
<!-- ====================== 配置和MyBatis的整合 ======================== -->
<!--配置session工厂MyBatis的整合-->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 指定mybatis全局配置文件的位置 -->
<property name="configLocation" value="classpath:config/mybatis-config.xml"></property>
<property name="dataSource" ref="dataSource"></property>
<!-- 指定mybatis,mapper文件的位置 -->
<property name="mapperLocations" value="classpath:mapper/*.xml"/>
</bean>
<!-- mapper扫描 -->
<!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
<property name="basePackage" value="com.emr.dao"></property>
</bean>-->
<!-- 配置扫描器将mybatis接口的实现加入到IOC容器中 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
<!-- 扫描所有的dao接口的实现加入到ioc容器 -->
<property name="basePackage" value="com.emr.dao"></property>
</bean>
<!-- 配置一个可以执行批量的sqlSession -->
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory"></constructor-arg>
<constructor-arg name="executorType" value="BATCH"></constructor-arg>
</bean>
<!-- ====================== 事物管理器配置 ======================== -->
<!-- 事物管理器配置 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- 开启基于注解的事务使用xml配置形式的事务必须主要的都是使用配置式 -->
<aop:config>
<!-- 切入表达式 -->
<aop:pointcut expression="execution(* com.emr.service..*(..))" id="txPoint"/>
<!-- 配置事务增强 -->
<aop:advisor advice-ref="txAdvice" pointcut-ref="txPoint"/>
</aop:config>
<!-- 配置事务增强 ,事务如何切入-->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<!-- 所有方法都是事务方法 -->
<tx:attributes>
<tx:method name="*"/>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="add*" propagation="REQUIRED"/>
<tx:method name="create*" propagation="REQUIRED"/>
<tx:method name="delete*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="find*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="select*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="get*" propagation="SUPPORTS" read-only="true"/>
</tx:attributes>
</tx:advice>
<!-- Spring配置文件的核心点数据源、与 mybatis的整合事务控制 -->
<!-- 事务扫描开始(开启@Tranctional) -->
<!-- <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> -->
<!-- 使用annotation定义事务 -->
<!-- <tx:annotation-driven transaction-manager="transactionManager"/> -->
<!-- 定义切面功能 -->
<!-- <aop:aspectj-autoproxy />-->
<!--<context:annotation-config></context:annotation-config>-->
<!-- 启用aop -->
<!--<aop:aspectj-autoproxy proxy-target-class="true"/>-->
<!-- 配置启用Shiro的注解功能 -->
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor">
<property name="proxyTargetClass" value="true"></property>
</bean>
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<!--<property name="realm" ref="userRealm"/>
<property name="sessionManager" ref="sessionManager"/>
<property name="rememberMeManager" ref="rememberMeManager"/>
<property name="cacheManager" ref="customShiroCacheManager"/>-->
</bean>
<!-- 上传文件 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="utf-8"/>
<!-- 最大内存大小 -->
<property name="maxInMemorySize" value="10240"/>
<!-- 最大文件大小,-1为不限制大小 -->
<property name="maxUploadSize" value="-1"/>
</bean>
<!-- 自定义拦截器 -->
<!--<bean id="login" class="com.common.shiro.filter.LoginFilter"/>-->
<!-- Shiro生命周期处理器-->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
</beans>

@ -0,0 +1,20 @@
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc\:mysql\://localhost\:3306/power?useUnicode\=true&characterEncoding\=utf-8
#jdbc.url=jdbc\:mysql\://120.27.212.36\:3306/power?useUnicode\=true&characterEncoding\=utf-8
#jdbc.username=root
#jdbc.password=docus702
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://120.27.212.36:1433;databaseName=emr_record
jdbc.username=sa
jdbc.password=docus@702
#jdbc.driverLocation=D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\WEB-INF\\lib\\sqljdbc4-2.0.jar
#\u6267\u884C:\u53F3\u952E Run As ---->Maven build ---->Goals:mybatis-generator:generate
#\u8F93\u51FA\u76EE\u5F55
targetProject=src/main/java
#modelPackage,sqlMapperPackage,daoMapperPackage \u901A\u5E38\u4E00\u81F4\u0090\u008D
modelPackage=com.emr.entity
daoMapperPackage=com.emr.dao
#\u8F93\u51FA\u76EE\u5F55
targetProject2=src/main/resources
sqlMapperPackage=mapper

@ -0,0 +1,34 @@
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc\:mysql\://localhost\:3306/emr_record?useUnicode\=true&characterEncoding\=utf-8
#jdbc.url=jdbc\:mysql\://120.27.212.36\:3306/emr_record?useUnicode\=true&characterEncoding\=utf-8
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://120.27.212.36:1433;databaseName=emr_record
#jdbc.url=jdbc\:sqlserver\://10.6.1.127:1433;databaseName=DB_PrivilegeManagement_GYFY
jdbc.username=sa
jdbc.password=docus@702
#hibernate config
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.hbm2ddl.auto=update
#hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
hibernate.current_session_context_class=thread
hibernate.jdbc.batch_size=50
hibernate.enable_lazy_load_no_trans=true
#\u56FE\u7247\u5730\u5740
pictureUrl=
#pictureUrl=src\\main\\webapp
#\u83DC\u5355\u63A5\u53E3http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag
#powerUrl=http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag
#POWER_URLHEAD=http://120.27.212.36:8888/power
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934\u5982\uFF1Ahttp://192.168.1.3:8081/power
powerUrl=http://192.168.1.102:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://192.168.1.102:8080/power
POWER_JSP=http://192.168.1.102:8080/power
recallReason=\u533B\u9662\u9700\u8981\u8FD9\u4EFD\u6587\u6863

@ -0,0 +1,37 @@
#Debug,info,warning,error
#log4j.rootLogger=debug,stdout,logfile
#log4j.addivity.org.apache=true
# \u5E94\u7528\u4E8E\u63A7\u5236\u53F0
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.Threshold=DEBUG
#log4j.appender.CONSOLE.Target=System.out
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %l %m%n
#log4j.appender.CONSOLE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} - %c -%-4r [%t] %-5p %c %x - %m%n
#log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %X{ClientIPAddress} %c{1}(%M) %L %m%n
#log4j.appender.FILE=org.apache.log4j.FileAppender
#log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.FILE.BufferSize=10
#log4j.appender.FILE.File=C\:\\Users\\WQ\\webApp-Logs\\log4j.Log
#log4j.appender.FILE.File=logs/customer.log
#log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
#log4j.appender.FILE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} - %c -%-4r [%t] %-5p %c %x - %m%n
#log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %X{ClientIPAddress} %l %m%n
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
#log4j.logger.com.ibatis=DEBUG
#log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
#log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
#log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
#log4j.logger.Java.sql.Connection=DEBUG
#log4j.logger.java.sql.Statement=DEBUG
#log4j.logger.java.sql.PreparedStatement=DEBUG
# General Apache libraries
#log4j.logger.org.apache=WARN
# Spring
#log4j.logger.org.springframework=WARN
# Default Shiro logging
#log4j.logger.org.apache.shiro=TRACE
# Disable verbose logging
#log4j.logger.org.apache.shiro.util.ThreadContext=WARN
#log4j.logger.org.apache.shiro.cache.ehcache.EhCache=WARN

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!-- 列自动映射 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<setting name="logImpl" value="STDOUT_LOGGING"/>
</settings>
<typeAliases>
<package name="com.emr.entity"/>
</typeAliases>
<plugins>
<!-- com.github.pagehelper为PageHelper类所在包名 -->
<plugin interceptor="com.github.pagehelper.PageInterceptor">
<!--分页参数合理化-->
<property name="reasonable" value="true"/>
</plugin>
</plugins>
</configuration>

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/index"/><!--登录页面,-->
<property name="successUrl" value="/index.jsp"/><!--登录成功页面,如果自己设置了返回页面,则不跳转-->
<property name="unauthorizedUrl" value="/error"/><!-- 没有权限跳转的地址 -->
<property name="filterChainDefinitions">
<value>
/toLogin=anon <!--表示都可以访问-->
/error=authc
/test=anon
/login=anon
/static/**=anon
/jspf/**=anon
/img/**=anon
/styles/**=anon
/batch/**=anon
/css/**=anon
/js/**=anon
/home=perms[home] <!--perms表示需要该权限才能访问的页面-->
/admin=roles["admin"] <!-- roles["admin,user"] 只有拥有admin角色的用户才可访问同时需要拥有多个角色的话用引号引起来中间用逗号隔开-->
<!--/admin=anon-->
/**=authc <!--authc表示需要认证才能访问的页面-->
</value>
</property>
</bean>
<!-- 自定义Realm -->
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="MyRealm"/>
</bean>
<!-- 注入到自定义Realm -->
<bean id="MyRealm" class="com.emr.shiro.MyRealm">
<!-- 定义凭证匹配器 -->
<!-- <property name="credentialsMatcher" ref="credentialsMatcher"></property>-->
</bean>
<!-- 凭证匹配器 org.apache.shiro.authc.credential.HashedCredentialsMatcher-->
<!-- <bean id="credentialsMatcher" class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
<property name="hashAlgorithmName" value="MD5"></property>
</bean>-->
</beans>

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 该配置文件说明插件需要如何生成,以及生成对应的包名,路径等信息。
还有重要的就是我们要生成的实体类所对应的的表或者试图 -->
<generatorConfiguration>
<properties resource="config/gennerator.properties" />
<classPathEntry location="${jdbc.driverLocation}"/>
<context id="MBG" targetRuntime="MyBatis3">
<!-- 注意以下标签的顺序:property*,plugin*,commentGenerator?,jdbcConnection,
javaTypeResolver?,javaModelGenerator,sqlMapGenerator?,
javaClientGenerator?,table+ -->
<!-- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin" /> -->
<!-- 这个插件给由MBG生成的Java模型对象增加了equals和hashCode方法 -->
<!-- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"/> -->
<!-- com.github.pagehelper为PageHelper类所在包名 -->
<!-- 该属性仅在确实需要进行合并而不是覆盖的情况下使用且值要求为true -->
<property name="mergeable" value="true"></property>
<commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="true"/>
<!-- 不希望生成的注释中包含时间戳 -->
<property name="suppressDate" value="true" />
<!-- 是否 自动为每一个生成的类创建一个构造方法-->
<property name="constructorBased" value="true"/>
<!--分页参数合理化-->
<!--<property name="reasonable" value="true"/> -->
<property name="validationQuery" value="select * from dual"/>
</commentGenerator>
<!-- 数据库连接 -->
<jdbcConnection
driverClass="${jdbc.driver}"
connectionURL="${jdbc.url}"
userId="${jdbc.username}"
password="${jdbc.password}">
</jdbcConnection>
<!-- 指定生成的类型为java类型避免数据库中number等类型字段 -->
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成model模型对应的包存放位置可以指定具体的路径,如/ProjectName/src也可以使用MAVEN来自动生成 -->
<javaModelGenerator targetPackage="${modelPackage}" targetProject="${targetProject}">
<!-- 在targetPackage的基础上根据数据库的schema再生成一层package最终生成的类放在这个package下默认为false -->
<property name="enableSubPackages" value="true"/>
<!-- 设置是否在getter方法中对String类型字段调用trim()方法 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!--对应的xml mapper文件 -->
<sqlMapGenerator targetPackage="${sqlMapperPackage}" targetProject="${targetProject2}" >
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 对应的dao接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="${daoMapperPackage}" targetProject="${targetProject}" >
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 表名对应生成的实体 -->
<!-- <table tableName="T_Role_Menu" domainObjectName="T_Role_Menu" /> -->
<!-- enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"> 指定是否生成操作数据库对应的方法 -->
<!--<table tableName="T_User" domainObjectName="T_User"/>-->
<!--<table tableName="T_Role" domainObjectName="T_Role"/>-->
<!-- <table tableName="T_User" domainObjectName="T_User" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Role_Menu" domainObjectName="T_Role_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Role" domainObjectName="T_Role" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Menu" domainObjectName="T_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>-->
<!-- <table tableName="T_Menu" domainObjectName="T_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>-->
<!--<table tableName="Paper" domainObjectName="Paper" enableCountByExample="false" enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Archive_Master" domainObjectName="Archive_Master" enableCountByExample="false" enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Archive_Detail" domainObjectName="Archive_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Archive_Detail" domainObjectName="Emr_Archive_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Fault_Detail" domainObjectName="Emr_Fault_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Picture" domainObjectName="Emr_Picture" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<table tableName="Emr_Fault_Type" domainObjectName="Emr_Fault_Type" enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
</context>
</generatorConfiguration>

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.emr.dao.Archive_DetailMapper">
<resultMap id="BaseResultMap" type="com.emr.entity.Archive_Detail">
<id column="id" jdbcType="NVARCHAR" property="id" />
<result column="PDF_PATH" jdbcType="NVARCHAR" property="pdfPath" />
<result column="MasterID" jdbcType="NVARCHAR" property="masterid" />
<result column="UpLoadDateTime" jdbcType="NVARCHAR" property="uploaddatetime" />
<result column="AssortID" jdbcType="NVARCHAR" property="assortid" />
<result column="Source" jdbcType="NVARCHAR" property="source" />
<result column="SubAssort" jdbcType="NVARCHAR" property="subassort" />
<result column="Title" jdbcType="NVARCHAR" property="title" />
<result column="flag" jdbcType="NVARCHAR" property="flag" />
<result column="Sys" jdbcType="NVARCHAR" property="sys" />
</resultMap>
<resultMap id="BaseResultMap2" type="com.emr.entity.Archive_Detail_Vo">
<result column="id" jdbcType="NVARCHAR" property="id"/>
<result column="PDF_PATH" jdbcType="NVARCHAR" property="pdfPath"/>
<result column="MasterID" jdbcType="NVARCHAR" property="masterid"/>
<result column="UpLoadDateTime" jdbcType="NVARCHAR" property="uploaddatetime"/>
<result column="AssortID" jdbcType="NVARCHAR" property="assortid"/>
<result column="Source" jdbcType="NVARCHAR" property="source"/>
<result column="SubAssort" jdbcType="NVARCHAR" property="subassort"/>
<result column="Title" jdbcType="NVARCHAR" property="title"/>
<result column="flag" jdbcType="NVARCHAR" property="flag"/>
<result column="Sys" jdbcType="NVARCHAR" property="sys"/>
<result column="patient_id" property="patientId" jdbcType="VARCHAR"/>
<result column="assort_id" property="assortId" jdbcType="VARCHAR"/>
<result column="scan_page" property="scanPage" jdbcType="VARCHAR"/>
<result column="assort_name" property="assortName" jdbcType="VARCHAR"/>
<result column="assort_sort" property="assortSort" jdbcType="SMALLINT"/>
<result column="print_flag" property="printFlag" jdbcType="VARCHAR"/>
<result column="pageNum" property="pageNum" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id, PDF_PATH, MasterID, UpLoadDateTime, AssortID, Source, SubAssort, Title, flag,
Sys
</sql>
<select id="selectByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">
SELECT z.assort_id,z.assort_name,z.assort_sort,z.print_flag,s.pageNum from(select AssortID,count(*) pageNum from
archive_detail
-- MasterID='a72163dd10e6443b90fb82384a1debf4'
where 1=1
<if test="patientId != null and patientId != ''">
and MasterID=#{patientId,jdbcType=VARCHAR}
</if>
<if test="assortId != null and assortId != ''">
and AssortID=#{assortId,jdbcType=VARCHAR}
</if>
GROUP BY AssortID) s
RIGHT JOIN zd_assort z
on s.AssortID=z.assort_id
where s.pageNum>0
ORDER BY z.assort_sort
</select>
<select id="detailByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">
select
t.MasterID,t.id,t.PDF_PATH,t.Source,t.UpLoadDateTime,t.SubAssort,t.Title,t.flag,z.assort_id,z.assort_name,z.assort_sort,z.print_flag
from zd_assort z
left join archive_detail t
on z.assort_id=t.AssortID
where 1=1
<if test="patientId != null">
and t.MasterID=#{patientId,jdbcType=VARCHAR}
</if>
<if test="assortId != null and assortId != ''">
and t.AssortID=#{assortId,jdbcType=VARCHAR}
</if>
ORDER BY z.assort_sort
</select>
<select id="selectByid" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from archive_detail
where id = #{id,jdbcType=NVARCHAR}
</select>
<select id="selectByColm" parameterType="com.emr.entity.Archive_Detail" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from archive_detail
where 1=1
<if test="pdfPath != null">
and PDF_PATH = #{pdfPath,jdbcType=NVARCHAR}
</if>
<if test="masterid != null">
and MasterID = #{masterid,jdbcType=NVARCHAR}
</if>
<if test="uploaddatetime != null">
and UpLoadDateTime = #{uploaddatetime,jdbcType=NVARCHAR}
</if>
<if test="assortid != null">
and AssortID = #{assortid,jdbcType=NVARCHAR}
</if>
<if test="source != null">
and Source = #{source,jdbcType=NVARCHAR}
</if>
<if test="subassort != null">
and SubAssort = #{subassort,jdbcType=NVARCHAR}
</if>
<if test="title != null">
and Title = #{title,jdbcType=NVARCHAR}
</if>
<if test="flag != null">
and flag = #{flag,jdbcType=NVARCHAR}
</if>
<if test="sys != null">
and Sys = #{sys,jdbcType=NVARCHAR}
</if>
order by UpLoadDateTime
</select>
<select id="selectByCol" parameterType="com.emr.entity.Archive_Detail" resultMap="BaseResultMap">
select d.*
from archive_detail d
LEFT JOIN zd_assort z
on d.assortId=z.assort_id
where 1=1
<if test="subassort != null">
and d.SubAssort = #{subassort,jdbcType=NVARCHAR}
</if>
<if test="flag != null">
and d.flag = #{flag,jdbcType=NVARCHAR}
</if>
<if test="title != null">
<if test="masterid != null">
and d.MasterID = #{masterid,jdbcType=NVARCHAR}
</if>
and d.AssortID in
<foreach item="item" collection="title.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
ORDER BY z.assort_sort,d.PDF_PATH
</select>
<delete id="deleteByClo" parameterType="com.emr.entity.Archive_Detail">
delete from archive_detail
where 1=1
<if test="masterid != null">
and MasterID = #{masterid,jdbcType=NVARCHAR}
</if>
<if test="assortid != null">
and AssortID = #{assortid,jdbcType=NVARCHAR}
</if>
</delete>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from archive_detail
where id = #{id,jdbcType=NVARCHAR}
</delete>
<insert id="insert" parameterType="com.emr.entity.Archive_Detail">
insert into archive_detail (id, PDF_PATH, MasterID,
UpLoadDateTime, AssortID, Source,
SubAssort, Title, flag,
Sys)
values ((select replace(newid(),'-','')), #{pdfPath,jdbcType=NVARCHAR}, #{masterid,jdbcType=NVARCHAR},
#{uploaddatetime,jdbcType=NVARCHAR}, #{assortid,jdbcType=NVARCHAR}, #{source,jdbcType=NVARCHAR},
#{subassort,jdbcType=NVARCHAR}, #{title,jdbcType=NVARCHAR}, #{flag,jdbcType=NVARCHAR},
#{sys,jdbcType=NVARCHAR})
</insert>
<insert id="insertSel" parameterType="com.emr.entity.Archive_Detail">
insert into archive_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<!--<if test="id != null and id!=''">-->
id,
<!--</if>-->
<if test="pdfPath != null">
PDF_PATH,
</if>
<if test="masterid != null">
MasterID,
</if>
<if test="uploaddatetime != null">
UpLoadDateTime,
</if>
<if test="assortid != null">
AssortID,
</if>
<if test="source != null">
Source,
</if>
<if test="subassort != null">
SubAssort,
</if>
<if test="title != null">
Title,
</if>
<if test="flag != null">
flag,
</if>
<if test="sys != null">
Sys,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<!--<if test="id != null and id!=''">-->
(select replace(newid(),'-','')),
<!--</if>-->
<if test="pdfPath != null">
#{pdfPath,jdbcType=NVARCHAR},
</if>
<if test="masterid != null">
#{masterid,jdbcType=NVARCHAR},
</if>
<if test="uploaddatetime != null">
#{uploaddatetime,jdbcType=NVARCHAR},
</if>
<if test="assortid != null">
#{assortid,jdbcType=NVARCHAR},
</if>
<if test="source != null">
#{source,jdbcType=NVARCHAR},
</if>
<if test="subassort != null">
#{subassort,jdbcType=NVARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=NVARCHAR},
</if>
<if test="flag != null">
#{flag,jdbcType=NVARCHAR},
</if>
<if test="sys != null">
#{sys,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateCloById" parameterType="com.emr.entity.Archive_Detail">
update archive_detail
<set>
<if test="pdfPath != null and pdfPath!=''">
PDF_PATH = #{pdfPath,jdbcType=NVARCHAR},
</if>
<if test="masterid != null and masterid!=''">
MasterID = #{masterid,jdbcType=NVARCHAR},
</if>
<if test="uploaddatetime != null and uploaddatetime!=''">
UpLoadDateTime = #{uploaddatetime,jdbcType=NVARCHAR},
</if>
<if test="assortid != null and assortid!=''">
AssortID = #{assortid,jdbcType=NVARCHAR},
</if>
<if test="source != null and source!=''">
Source = #{source,jdbcType=NVARCHAR},
</if>
<if test="subassort != null and subassort!=''">
SubAssort = #{subassort,jdbcType=NVARCHAR},
</if>
<if test="title != null and title!=''">
Title = #{title,jdbcType=NVARCHAR},
</if>
<if test="flag != null and pdfPath!=''">
flag = #{flag,jdbcType=NVARCHAR},
</if>
<if test="sys != null and sys!=''">
Sys = #{sys,jdbcType=NVARCHAR},
</if>
</set>
where id = #{id,jdbcType=NVARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.Archive_Detail">
update archive_detail
set PDF_PATH = #{pdfPath,jdbcType=NVARCHAR},
MasterID = #{masterid,jdbcType=NVARCHAR},
UpLoadDateTime = #{uploaddatetime,jdbcType=NVARCHAR},
AssortID = #{assortid,jdbcType=NVARCHAR},
Source = #{source,jdbcType=NVARCHAR},
SubAssort = #{subassort,jdbcType=NVARCHAR},
Title = #{title,jdbcType=NVARCHAR},
flag = #{flag,jdbcType=NVARCHAR},
Sys = #{sys,jdbcType=NVARCHAR}
where id = #{id,jdbcType=NVARCHAR}
</update>
</mapper>

@ -0,0 +1,652 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.emr.dao.Archive_MasterMapper">
<resultMap id="BaseResultMap" type="com.emr.entity.Archive_Master">
<id column="id" jdbcType="NVARCHAR" property="id" />
<result column="patient_id" jdbcType="NVARCHAR" property="patientId" />
<result column="inp_no" jdbcType="NVARCHAR" property="inpNo" />
<result column="visit_id" jdbcType="NVARCHAR" property="visitId" />
<result column="name" jdbcType="NVARCHAR" property="name" />
<result column="sex" jdbcType="NVARCHAR" property="sex" />
<result column="dept_name" jdbcType="NVARCHAR" property="deptName" />
<result column="discharge_date_time" jdbcType="NVARCHAR" property="dischargeDateTime" />
<result column="ArchiveState" jdbcType="NVARCHAR" property="archivestate" />
<result column="admission_date_time" jdbcType="NVARCHAR" property="admissionDateTime" />
<result column="dept_admission_to" jdbcType="NVARCHAR" property="deptAdmissionTo" />
<result column="check_doctor" jdbcType="NVARCHAR" property="checkDoctor" />
<result column="check_datetime" jdbcType="NVARCHAR" property="checkDatetime" />
<result column="checked_doctor" jdbcType="NVARCHAR" property="checkedDoctor" />
<result column="checked_datetime" jdbcType="NVARCHAR" property="checkedDatetime" />
<result column="LockInfo" jdbcType="NVARCHAR" property="lockinfo" />
<result column="DOCTOR_IN_CHARGE" jdbcType="NVARCHAR" property="doctorInCharge" />
<result column="ID_NO" jdbcType="NVARCHAR" property="idNo" />
<result column="DISCHARGE_DISPOSITION" jdbcType="NVARCHAR" property="dischargeDisposition" />
<result column="dept_code_lend" jdbcType="NVARCHAR" property="deptCodeLend" />
</resultMap>
<!--<resultMap id="BaseResultMap2" type="com.emr.entity.Archive_MasterVo">-->
<!--<id column="id" jdbcType="NVARCHAR" property="id"/>-->
<!--<result column="patient_id" jdbcType="NVARCHAR" property="patientId"/>-->
<!--<result column="inp_no" jdbcType="NVARCHAR" property="inpNo"/>-->
<!--<result column="visit_id" jdbcType="NVARCHAR" property="visitId"/>-->
<!--<result column="name" jdbcType="NVARCHAR" property="name"/>-->
<!--<result column="sex" jdbcType="NVARCHAR" property="sex"/>-->
<!--<result column="dept_name" jdbcType="NVARCHAR" property="deptName"/>-->
<!--<result column="discharge_date_time" jdbcType="NVARCHAR" property="dischargeDateTime"/>-->
<!--<result column="ArchiveState" jdbcType="NVARCHAR" property="archivestate"/>-->
<!--<result column="admission_date_time" jdbcType="NVARCHAR" property="admissionDateTime"/>-->
<!--<result column="dept_admission_to" jdbcType="NVARCHAR" property="deptAdmissionTo"/>-->
<!--<result column="check_doctor" jdbcType="NVARCHAR" property="checkDoctor"/>-->
<!--<result column="check_datetime" jdbcType="NVARCHAR" property="checkDatetime"/>-->
<!--<result column="checked_doctor" jdbcType="NVARCHAR" property="checkedDoctor"/>-->
<!--<result column="checked_datetime" jdbcType="NVARCHAR" property="checkedDatetime"/>-->
<!--<result column="LockInfo" jdbcType="NVARCHAR" property="lockinfo"/>-->
<!--<result column="DOCTOR_IN_CHARGE" jdbcType="NVARCHAR" property="doctorInCharge"/>-->
<!--<result column="ID_NO" jdbcType="NVARCHAR" property="idNo"/>-->
<!--<result column="DISCHARGE_DISPOSITION" jdbcType="NVARCHAR" property="dischargeDisposition"/>-->
<!--<result column="dept_code_lend" jdbcType="NVARCHAR" property="deptCodeLend"/>-->
<!--<result column="startDateTo" jdbcType="NVARCHAR" property="startDateTo"/>-->
<!--<result column="endDateTo" jdbcType="NVARCHAR" property="endDateTo"/>-->
<!--</resultMap>-->
<sql id="Base_Column_List">
id, patient_id, inp_no, visit_id, name, sex, dept_name, discharge_date_time, ArchiveState,
admission_date_time, dept_admission_to, check_doctor, check_datetime, checked_doctor,
checked_datetime, LockInfo, DOCTOR_IN_CHARGE, ID_NO, DISCHARGE_DISPOSITION, dept_code_lend
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from archive_master
where id = #{id,jdbcType=NVARCHAR}
</select>
<select id="selectByCol" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend
from archive_master m
LEFT JOIN emr_dictionary d
on m.dept_admission_to=d.code
LEFT JOIN emr_dictionary f
on m.dept_name=f.code
where 1=1
<if test="deptAdmissionTo!= null and deptAdmissionTo!= ''">
and m.dept_admission_to in
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate != null and archivestate != ''">
and m.ArchiveState=#{archivestate,jdbcType=NVARCHAR}
</if>
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="sex != null">
and m.sex = #{sex,jdbcType=NVARCHAR}
</if>
<if test="deptName != null and deptName != ''">
and m.dept_name = #{deptName,jdbcType=NVARCHAR}
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and m.admission_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and m.admission_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and m.admission_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkedDoctor != null">
and checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkDatetime != null">
and m.check_datetime = #{checkDatetime,jdbcType=NVARCHAR}
</if>
<if test="checkedDatetime != null">
and m.checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR}
</if>
<if test="lockinfo != null">
and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge != null">
and m.DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR}
</if>
<if test="dischargeDisposition != null">
and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR}
</if>
<if test="deptCodeLend != null">
and m.dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
</if>
</select>
<select id="selectByColumn" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
<!--select-->
<!--<include refid="Base_Column_List"/>-->
<!--from archive_master-->
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend
from archive_master m
LEFT JOIN emr_dictionary d
on m.dept_admission_to=d.code
LEFT JOIN emr_dictionary f
on m.dept_name=f.code
where 1=1 and ArchiveState in('归档中','复审退回','初审')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate != null and archivestate != ''">
and m.ArchiveState=#{archivestate,jdbcType=NVARCHAR}
</if>
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="sex != null">
and m.sex = #{sex,jdbcType=NVARCHAR}
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and m.discharge_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and m.discharge_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR}
</if>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkedDoctor != null">
and checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkDatetime != null">
and m.check_datetime = #{checkDatetime,jdbcType=NVARCHAR}
</if>
<if test="checkedDatetime != null">
and m.checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR}
</if>
<if test="lockinfo != null">
and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge != null">
and m.DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR}
</if>
<if test="dischargeDisposition != null">
and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR}
</if>
<if test="deptCodeLend != null">
and m.dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
</if>
</select>
<select id="selectByLast" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend
from archive_master m
LEFT JOIN emr_dictionary d
on m.dept_admission_to=d.code
LEFT JOIN emr_dictionary f
on m.dept_name=f.code
where 1=1 and ArchiveState in('初审')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate != null and archivestate != ''">
and m.ArchiveState in(#{archivestate,jdbcType=NVARCHAR})
</if>
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="sex != null">
and m.sex = #{sex,jdbcType=NVARCHAR}
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR}
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and m.discharge_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and m.discharge_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and m.admission_date_time between CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120) and
#{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDate != null and startDate != ''">
and m.admission_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and m.admission_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkDatetime != null">
and m.check_datetime = #{checkDatetime,jdbcType=NVARCHAR}
</if>
<if test="checkedDoctor != null">
and m.checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkedDatetime != null">
and m.checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR}
</if>
<if test="lockinfo != null">
and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge != null">
and m.DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR}
</if>
<if test="dischargeDisposition != null">
and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR}
</if>
<if test="deptCodeLend != null">
and m.dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
</if>
</select>
<select id="selectByUnfile" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend
from archive_master m
LEFT JOIN emr_dictionary d
on m.dept_admission_to=d.code
LEFT JOIN emr_dictionary f
on m.dept_name=f.code
where 1=1
and m.ArchiveState in('归档中','初审','复审退回')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate != null and archivestate != ''">
and m.ArchiveState in(#{archivestate,jdbcType=NVARCHAR})
</if>
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="sex != null">
and m.sex = #{sex,jdbcType=NVARCHAR}
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR}
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and m.discharge_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and m.discharge_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and m.admission_date_time between CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120) and
#{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDate != null and startDate != ''">
and m.admission_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and m.admission_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkedDoctor != null">
and m.checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkDatetime != null">
and m.check_datetime = #{checkDatetime,jdbcType=NVARCHAR}
</if>
<if test="checkedDatetime != null">
and m.checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR}
</if>
<if test="lockinfo != null">
and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge != null">
and m.DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR}
</if>
<if test="dischargeDisposition != null">
and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR}
</if>
<if test="deptCodeLend != null">
and m.dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from archive_master
where id = #{id,jdbcType=NVARCHAR}
</delete>
<insert id="insert" parameterType="com.emr.entity.Archive_Master">
insert into archive_master (id, patient_id, inp_no,
visit_id, name, sex,
dept_name, discharge_date_time, ArchiveState,
admission_date_time, dept_admission_to, check_doctor,
check_datetime, checked_doctor, checked_datetime,
LockInfo, DOCTOR_IN_CHARGE, ID_NO,
DISCHARGE_DISPOSITION, dept_code_lend)
values (#{id,jdbcType=NVARCHAR}, #{patientId,jdbcType=NVARCHAR}, #{inpNo,jdbcType=NVARCHAR},
#{visitId,jdbcType=NVARCHAR}, #{name,jdbcType=NVARCHAR}, #{sex,jdbcType=NVARCHAR},
#{deptName,jdbcType=NVARCHAR}, #{dischargeDateTime,jdbcType=NVARCHAR}, #{archivestate,jdbcType=NVARCHAR},
#{admissionDateTime,jdbcType=NVARCHAR}, #{deptAdmissionTo,jdbcType=NVARCHAR}, #{checkDoctor,jdbcType=NVARCHAR},
#{checkDatetime,jdbcType=NVARCHAR}, #{checkedDoctor,jdbcType=NVARCHAR}, #{checkedDatetime,jdbcType=NVARCHAR},
#{lockinfo,jdbcType=NVARCHAR}, #{doctorInCharge,jdbcType=NVARCHAR}, #{idNo,jdbcType=NVARCHAR},
#{dischargeDisposition,jdbcType=NVARCHAR}, #{deptCodeLend,jdbcType=NVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.Archive_Master">
insert into archive_master
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientId != null">
patient_id,
</if>
<if test="inpNo != null">
inp_no,
</if>
<if test="visitId != null">
visit_id,
</if>
<if test="name != null">
name,
</if>
<if test="sex != null">
sex,
</if>
<if test="deptName != null">
dept_name,
</if>
<if test="dischargeDateTime != null">
discharge_date_time,
</if>
<if test="archivestate != null">
ArchiveState,
</if>
<if test="admissionDateTime != null">
admission_date_time,
</if>
<if test="deptAdmissionTo != null">
dept_admission_to,
</if>
<if test="checkDoctor != null">
check_doctor,
</if>
<if test="checkDatetime != null">
check_datetime,
</if>
<if test="checkedDoctor != null">
checked_doctor,
</if>
<if test="checkedDatetime != null">
checked_datetime,
</if>
<if test="lockinfo != null">
LockInfo,
</if>
<if test="doctorInCharge != null">
DOCTOR_IN_CHARGE,
</if>
<if test="idNo != null">
ID_NO,
</if>
<if test="dischargeDisposition != null">
DISCHARGE_DISPOSITION,
</if>
<if test="deptCodeLend != null">
dept_code_lend,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=NVARCHAR},
</if>
<if test="patientId != null">
#{patientId,jdbcType=NVARCHAR},
</if>
<if test="inpNo != null">
#{inpNo,jdbcType=NVARCHAR},
</if>
<if test="visitId != null">
#{visitId,jdbcType=NVARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=NVARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=NVARCHAR},
</if>
<if test="deptName != null">
#{deptName,jdbcType=NVARCHAR},
</if>
<if test="dischargeDateTime != null">
#{dischargeDateTime,jdbcType=NVARCHAR},
</if>
<if test="archivestate != null">
#{archivestate,jdbcType=NVARCHAR},
</if>
<if test="admissionDateTime != null">
#{admissionDateTime,jdbcType=NVARCHAR},
</if>
<if test="deptAdmissionTo != null">
#{deptAdmissionTo,jdbcType=NVARCHAR},
</if>
<if test="checkDoctor != null">
#{checkDoctor,jdbcType=NVARCHAR},
</if>
<if test="checkDatetime != null">
#{checkDatetime,jdbcType=NVARCHAR},
</if>
<if test="checkedDoctor != null">
#{checkedDoctor,jdbcType=NVARCHAR},
</if>
<if test="checkedDatetime != null">
#{checkedDatetime,jdbcType=NVARCHAR},
</if>
<if test="lockinfo != null">
#{lockinfo,jdbcType=NVARCHAR},
</if>
<if test="doctorInCharge != null">
#{doctorInCharge,jdbcType=NVARCHAR},
</if>
<if test="idNo != null">
#{idNo,jdbcType=NVARCHAR},
</if>
<if test="dischargeDisposition != null">
#{dischargeDisposition,jdbcType=NVARCHAR},
</if>
<if test="deptCodeLend != null">
#{deptCodeLend,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateByClo" parameterType="com.emr.entity.Archive_Master">
update archive_master
<set>
<if test="patientId != null">
patient_id = #{patientId,jdbcType=NVARCHAR},
</if>
<if test="inpNo != null">
inp_no = #{inpNo,jdbcType=NVARCHAR},
</if>
<if test="visitId != null">
visit_id = #{visitId,jdbcType=NVARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=NVARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=NVARCHAR},
</if>
<if test="deptName != null">
dept_name = #{deptName,jdbcType=NVARCHAR},
</if>
<if test="dischargeDateTime != null">
discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR},
</if>
<if test="archivestate != null">
ArchiveState = #{archivestate,jdbcType=NVARCHAR},
</if>
<if test="admissionDateTime != null">
admission_date_time = #{admissionDateTime,jdbcType=NVARCHAR},
</if>
<if test="deptAdmissionTo != null">
dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR},
</if>
<if test="checkDoctor != null">
check_doctor = #{checkDoctor,jdbcType=NVARCHAR},
</if>
<if test="checkDatetime != null">
check_datetime = #{checkDatetime,jdbcType=NVARCHAR},
</if>
<if test="checkedDoctor != null">
checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR},
</if>
<if test="checkedDatetime != null">
checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR},
</if>
<if test="lockinfo != null">
LockInfo = #{lockinfo,jdbcType=NVARCHAR},
</if>
<if test="doctorInCharge != null">
DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR},
</if>
<if test="idNo != null">
ID_NO = #{idNo,jdbcType=NVARCHAR},
</if>
<if test="dischargeDisposition != null">
DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR},
</if>
<if test="deptCodeLend != null">
dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR},
</if>
</set>
where id = #{id,jdbcType=NVARCHAR}
</update>
<update id="updateById" parameterType="com.emr.entity.Archive_Master">
update archive_master
set patient_id = #{patientId,jdbcType=NVARCHAR},
inp_no = #{inpNo,jdbcType=NVARCHAR},
visit_id = #{visitId,jdbcType=NVARCHAR},
name = #{name,jdbcType=NVARCHAR},
sex = #{sex,jdbcType=NVARCHAR},
dept_name = #{deptName,jdbcType=NVARCHAR},
discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR},
ArchiveState = #{archivestate,jdbcType=NVARCHAR},
admission_date_time = #{admissionDateTime,jdbcType=NVARCHAR},
dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR},
check_doctor = #{checkDoctor,jdbcType=NVARCHAR},
check_datetime = #{checkDatetime,jdbcType=NVARCHAR},
checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR},
checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR},
LockInfo = #{lockinfo,jdbcType=NVARCHAR},
DOCTOR_IN_CHARGE = #{doctorInCharge,jdbcType=NVARCHAR},
ID_NO = #{idNo,jdbcType=NVARCHAR},
DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR},
dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
where id = #{id,jdbcType=NVARCHAR}
</update>
</mapper>

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.emr.dao.Emr_Archive_DetailMapper">
<resultMap id="BaseResultMap" type="com.emr.entity.Emr_Archive_Detail">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="archive_detail_id" jdbcType="NVARCHAR" property="archiveDetailId" />
<result column="assort_id" jdbcType="NVARCHAR" property="assortId" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="title" jdbcType="NVARCHAR" property="title" />
<result column="creater" jdbcType="NVARCHAR" property="creater" />
<result column="create_time" jdbcType="NCHAR" property="createTime" />
<result column="updater" jdbcType="NVARCHAR" property="updater" />
<result column="update_time" jdbcType="NCHAR" property="updateTime" />
<result column="remaker" jdbcType="NVARCHAR" property="remaker" />
</resultMap>
<sql id="Base_Column_List">
id, archive_detail_id, assort_id, parent_id, title, creater, create_time, updater,
update_time, remaker
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from emr_archive_detail
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from emr_archive_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.emr.entity.Emr_Archive_Detail">
insert into emr_archive_detail (id, archive_detail_id, assort_id,
parent_id, title, creater,
create_time, updater, update_time,
remaker)
values (#{id,jdbcType=INTEGER}, #{archiveDetailId,jdbcType=NVARCHAR}, #{assortId,jdbcType=NVARCHAR},
#{parentId,jdbcType=INTEGER}, #{title,jdbcType=NVARCHAR}, #{creater,jdbcType=NVARCHAR},
#{createTime,jdbcType=NCHAR}, #{updater,jdbcType=NVARCHAR}, #{updateTime,jdbcType=NCHAR},
#{remaker,jdbcType=NVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.Emr_Archive_Detail">
insert into emr_archive_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="archiveDetailId != null">
archive_detail_id,
</if>
<if test="assortId != null">
assort_id,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="title != null">
title,
</if>
<if test="creater != null">
creater,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remaker != null">
remaker,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="archiveDetailId != null">
#{archiveDetailId,jdbcType=NVARCHAR},
</if>
<if test="assortId != null">
#{assortId,jdbcType=NVARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=NVARCHAR},
</if>
<if test="creater != null">
#{creater,jdbcType=NVARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=NCHAR},
</if>
<if test="updater != null">
#{updater,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=NCHAR},
</if>
<if test="remaker != null">
#{remaker,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.Emr_Archive_Detail">
update emr_archive_detail
<set>
<if test="archiveDetailId != null">
archive_detail_id = #{archiveDetailId,jdbcType=NVARCHAR},
</if>
<if test="assortId != null">
assort_id = #{assortId,jdbcType=NVARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="title != null">
title = #{title,jdbcType=NVARCHAR},
</if>
<if test="creater != null">
creater = #{creater,jdbcType=NVARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=NCHAR},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=NCHAR},
</if>
<if test="remaker != null">
remaker = #{remaker,jdbcType=NVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.Emr_Archive_Detail">
update emr_archive_detail
set archive_detail_id = #{archiveDetailId,jdbcType=NVARCHAR},
assort_id = #{assortId,jdbcType=NVARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
title = #{title,jdbcType=NVARCHAR},
creater = #{creater,jdbcType=NVARCHAR},
create_time = #{createTime,jdbcType=NCHAR},
updater = #{updater,jdbcType=NVARCHAR},
update_time = #{updateTime,jdbcType=NCHAR},
remaker = #{remaker,jdbcType=NVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save