瀏覽代碼

再添加必要文件

tomatozq 5 年之前
父節點
當前提交
95ca7119b5
共有 100 個文件被更改,包括 11404 次插入0 次删除
  1. 29 0
      picc-admin-server/.gitignore
  2. 186 0
      picc-admin-server/pom.xml
  3. 25 0
      picc-admin-server/src/main/java/com/jpsoft/picc/PICCAdminServerApplication.java
  4. 121 0
      picc-admin-server/src/main/java/com/jpsoft/picc/advice/PermissionAdvice.java
  5. 73 0
      picc-admin-server/src/main/java/com/jpsoft/picc/config/SwaggerConfig.java
  6. 60 0
      picc-admin-server/src/main/java/com/jpsoft/picc/config/WebMvcConfig.java
  7. 85 0
      picc-admin-server/src/main/java/com/jpsoft/picc/interceptor/LoginInterceptor.java
  8. 104 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/admin/controller/JwtsUserController.java
  9. 223 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/ApprovalRecordController.java
  10. 55 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/AttachmentController.java
  11. 201 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/CompanyController.java
  12. 223 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/CompanyMemberController.java
  13. 238 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceAgentController.java
  14. 238 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceDefinitionController.java
  15. 224 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceDefinitionLimitController.java
  16. 247 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceJobsController.java
  17. 238 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/JobsController.java
  18. 242 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/MessageController.java
  19. 223 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/TransactionRecordController.java
  20. 72 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/ApplicationPolicyController.java
  21. 349 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsuranceApplicationController.java
  22. 433 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyController.java
  23. 225 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyMemberController.java
  24. 249 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyRecordController.java
  25. 29 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/ApiController.java
  26. 279 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/DataDictionaryController.java
  27. 285 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/MenuController.java
  28. 280 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/PermissionController.java
  29. 378 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/RoleController.java
  30. 284 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/UserController.java
  31. 23 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/DataDictionaryDAO.java
  32. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/MenuDAO.java
  33. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/PermissionDAO.java
  34. 18 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleDAO.java
  35. 22 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleMenuDAO.java
  36. 20 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RolePermissionDAO.java
  37. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserDAO.java
  38. 22 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserRoleDAO.java
  39. 24 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dto/RoleRelatedDTO.java
  40. 203 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/DataDictionary.java
  41. 199 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Menu.java
  42. 142 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Permission.java
  43. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Role.java
  44. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RoleMenu.java
  45. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RolePermission.java
  46. 160 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/User.java
  47. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/UserRole.java
  48. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/DataDictionaryService.java
  49. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/MenuService.java
  50. 19 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/PermissionService.java
  51. 19 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleMenuService.java
  52. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RolePermissionService.java
  53. 17 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleService.java
  54. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserRoleService.java
  55. 18 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserService.java
  56. 84 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/DataDictionaryServiceImpl.java
  57. 83 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/MenuServiceImpl.java
  58. 74 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/PermissionServiceImpl.java
  59. 79 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleMenuServiceImpl.java
  60. 79 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RolePermissionServiceImpl.java
  61. 69 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleServiceImpl.java
  62. 81 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserRoleServiceImpl.java
  63. 74 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserServiceImpl.java
  64. 13 0
      picc-admin-server/src/main/resources/application-dev.yml
  65. 50 0
      picc-admin-server/src/main/resources/application-production.yml
  66. 18 0
      picc-admin-server/src/main/resources/application-test.yml
  67. 99 0
      picc-admin-server/src/main/resources/application.yml
  68. 49 0
      picc-admin-server/src/main/resources/logback-spring.xml
  69. 150 0
      picc-admin-server/src/main/resources/mapper/sys/DataDictionary.xml
  70. 139 0
      picc-admin-server/src/main/resources/mapper/sys/Menu.xml
  71. 108 0
      picc-admin-server/src/main/resources/mapper/sys/Permission.xml
  72. 93 0
      picc-admin-server/src/main/resources/mapper/sys/Role.xml
  73. 97 0
      picc-admin-server/src/main/resources/mapper/sys/RoleMenu.xml
  74. 96 0
      picc-admin-server/src/main/resources/mapper/sys/RolePermission.xml
  75. 102 0
      picc-admin-server/src/main/resources/mapper/sys/User.xml
  76. 100 0
      picc-admin-server/src/main/resources/mapper/sys/UserRole.xml
  77. 38 0
      picc-admin-server/src/test/java/com/jpsoft/picc/test/CompanyTest.java
  78. 46 0
      picc-admin-server/src/test/java/com/jpsoft/picc/test/NewApiTest.java
  79. 23 0
      picc-admin-server/src/test/java/com/jpsoft/picc/test/PdfTest.java
  80. 29 0
      picc-common/.gitignore
  81. 24 0
      picc-common/pom.xml
  82. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/ApprovalRecordDAO.java
  83. 19 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyDAO.java
  84. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyMemberDAO.java
  85. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyUserDAO.java
  86. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceAgentDAO.java
  87. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceDefinitionDAO.java
  88. 19 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceDefinitionLimitDAO.java
  89. 20 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceJobsDAO.java
  90. 21 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/JobsDAO.java
  91. 19 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/MessageDAO.java
  92. 18 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/TransactionRecordDAO.java
  93. 157 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/ApprovalRecord.java
  94. 442 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/Company.java
  95. 262 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/CompanyMember.java
  96. 247 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/CompanyUser.java
  97. 148 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceAgent.java
  98. 178 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceDefinition.java
  99. 212 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceDefinitionLimit.java
  100. 188 0
      picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceJobs.java

+ 29 - 0
picc-admin-server/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 186 - 0
picc-admin-server/pom.xml

@@ -0,0 +1,186 @@
+<?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">
+    <parent>
+        <artifactId>picc</artifactId>
+        <groupId>com.jpsoft</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>picc-admin-server</artifactId>
+    <description>PICC投保管理系统-管理端</description>
+    <packaging>war</packaging>
+    <properties>
+        <jwts.version>0.10.5</jwts.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jpsoft</groupId>
+            <artifactId>picc-common</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+
+        <!--jwt start-->
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-api</artifactId>
+            <version>${jwts.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-impl</artifactId>
+            <version>${jwts.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-jackson</artifactId>
+            <version>${jwts.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <!--jwt end-->
+
+        <!--logging start-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.lazyluke</groupId>
+            <artifactId>log4jdbc-remix</artifactId>
+            <version>0.2.7</version>
+        </dependency>
+        <!--logging end-->
+
+        <!-- 数据库相关 start-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+        <!-- 数据库相关 end-->
+
+        <!--poi-->
+
+
+        <!--itext-->
+
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                    <addResources>true</addResources>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.16</version>
+                <configuration>
+                    <includes>
+                        <include>**/*TestForPack.java</include>
+                    </includes>
+                    <argLine>-Xmx256M</argLine>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>2.16</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </dependency>
+            </dependencies>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <active.profile>dev</active.profile>
+            </properties>
+        </profile>
+        <profile>
+            <id>test</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                    <scope>provided</scope>
+                </dependency>
+            </dependencies>
+            <properties>
+                <active.profile>test</active.profile>
+            </properties>
+        </profile>
+        <profile>
+            <id>production</id>
+            <properties>
+                <active.profile>production</active.profile>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+</project>

+ 25 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/PICCAdminServerApplication.java

@@ -0,0 +1,25 @@
+package com.jpsoft.picc;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableTransactionManagement
+@EnableScheduling
+@MapperScan("com.jpsoft.picc.**.dao")
+public class PICCAdminServerApplication extends SpringBootServletInitializer {
+	public static void main(String[] args) {
+		SpringApplication.run(PICCAdminServerApplication.class, args);
+	}
+
+	@Override
+	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+		return builder.sources(PICCAdminServerApplication.class);
+	}
+}

+ 121 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/advice/PermissionAdvice.java

@@ -0,0 +1,121 @@
+package com.jpsoft.picc.advice;
+
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import org.aspectj.lang.ProceedingJoinPoint;
+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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+
+@Aspect
+@Component
+public class PermissionAdvice {
+    private  Logger logger= LoggerFactory.getLogger("root");
+
+    @Autowired
+    private PermissionService permissionService;
+
+    @Pointcut("(execution(public * com.jpsoft.picc..controller.*.*(..)))")
+    public void pointcut(){
+
+    }
+
+    @Around("pointcut()")
+    public Object around(ProceedingJoinPoint point) throws Throwable {
+        long start = System.currentTimeMillis();
+
+        String classType = point.getTarget().getClass().getName();
+        Class<?> clazz = Class.forName(classType);
+        String clazzName = clazz.getName();
+        String clazzSimpleName = clazz.getSimpleName();
+        String methodName = point.getSignature().getName();
+
+        // 通过正则表达式判断当前url是否符合
+        //PathMatcher matcher = new AntPathMatcher();
+
+        StringBuilder pathBuilder = new StringBuilder();
+
+        //查询类的RequestMapping注解
+        RequestMapping classMapping = clazz.getAnnotation(RequestMapping.class);
+
+        if(classMapping != null && classMapping.value().length>0){
+            pathBuilder.append(classMapping.value()[0]);
+        }
+
+        //查询方法的RequestMapping注解
+        MethodSignature methodSignature = (MethodSignature)point.getSignature();
+        Method method = methodSignature.getMethod();
+
+        RequestMapping methodMapping = method.getAnnotation(RequestMapping.class);
+
+        if(methodMapping != null && methodMapping.value().length>0){
+            String subPath = methodMapping.value()[0];
+
+            if(!subPath.startsWith("/")){
+                pathBuilder.append("/");
+            }
+
+            pathBuilder.append(subPath);
+        }
+
+        ServletRequestAttributes requestAttrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+
+        Object obj = null;
+
+        if(requestAttrs!=null) {
+            HttpServletRequest request = requestAttrs.getRequest();
+            logger.warn("访问地址:" + request.getRequestURL().toString());
+
+            logger.warn("path=" + pathBuilder.toString());
+
+            String userId = (String)request.getAttribute("subject");
+
+            boolean existed = permissionService.exist(pathBuilder.toString(), request.getMethod());
+
+            // 查询该url是否加入到权限控制中,如果是则查询当前用户是否能访问该url
+            if (existed) {
+                logger.warn(pathBuilder.toString() + "已加入权限控制");
+
+                boolean permitted = permissionService.hasPermitted(userId, pathBuilder.toString(), request.getMethod());
+                logger.warn("是否许可当前用户访问:" + permitted);
+
+                if(permitted){
+                    // 执行切入方法
+                    obj = point.proceed();
+                }
+                else{
+                    MessageResult<String> msgResult = new MessageResult<>();
+                    msgResult.setCode(401);
+                    msgResult.setResult(false);
+                    msgResult.setMessage(pathBuilder.toString() + "未授权当前用户访问!");
+
+                    obj = msgResult;
+                }
+            }
+            else{
+                logger.warn(pathBuilder.toString() + "未加入权限控制");
+
+                // 执行切入方法
+                obj = point.proceed();
+            }
+        }
+
+        long elapse = System.currentTimeMillis() - start;
+
+        System.out.println(classType);
+        logger.warn(String.format("调用类%s方法%s耗时%s毫秒",clazzSimpleName,methodName,elapse));
+
+        return obj;
+    }
+}

+ 73 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/config/SwaggerConfig.java

@@ -0,0 +1,73 @@
+package com.jpsoft.picc.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+    @Bean
+    public Docket createRestApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
+                .paths(PathSelectors.any())
+                .build()
+                //添加登录认证
+                .securitySchemes(securitySchemes())
+                .securityContexts(securityContexts());
+    }
+
+    private List<ApiKey> securitySchemes() {
+        //设置请求头信息
+        List<ApiKey> result = new ArrayList<>();
+        ApiKey apiKey = new ApiKey("Authorization", "Authorization", "header");
+        result.add(apiKey);
+        return result;
+    }
+
+    private List<SecurityContext> securityContexts() {
+        //设置需要登录认证的路径
+        List<SecurityContext> result = new ArrayList<>();
+        result.add(getContextByPath("/*"));
+        return result;
+    }
+
+    private SecurityContext getContextByPath(String pathRegex){
+        return SecurityContext.builder()
+                .securityReferences(defaultAuth())
+                .forPaths(PathSelectors.regex(pathRegex))
+                .build();
+    }
+
+    private List<SecurityReference> defaultAuth() {
+        List<SecurityReference> result = new ArrayList<>();
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        result.add(new SecurityReference("Authorization", authorizationScopes));
+        return result;
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("后台接口文档")
+                .description("")
+                .termsOfServiceUrl("")
+                .version("1.0")
+                .build();
+    }
+}

+ 60 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/config/WebMvcConfig.java

@@ -0,0 +1,60 @@
+package com.jpsoft.picc.config;
+
+import com.jpsoft.picc.interceptor.LoginInterceptor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.*;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+	@Autowired
+	private LoginInterceptor loginInterceptor;
+
+	@Override
+	public void addCorsMappings(CorsRegistry registry) {
+		registry.addMapping("/**")
+				.allowedOrigins("*")
+				.allowedHeaders("*")
+				.allowedMethods("*")
+				.allowCredentials(false)
+				.exposedHeaders("access-control-allow-headers",
+						"access-control-allow-methods",
+						"access-control-allow-origin",
+						"access-control-max-age",
+						"X-Frame-Options",
+						"token-status")
+				.maxAge(3600);
+	}
+
+	@Override
+	public void addResourceHandlers(ResourceHandlerRegistry registry) {
+		registry.addResourceHandler("swagger-ui.html")
+				.addResourceLocations("classpath:/META-INF/resources/");
+
+		registry.addResourceHandler("/webjars/**")
+				.addResourceLocations("classpath:/META-INF/resources/webjars/");
+	}
+
+	@Override
+	public void addViewControllers(ViewControllerRegistry registry) {
+		// registry.addViewController("/login").setViewName("login");
+	}
+
+	@Override
+	public void addInterceptors(InterceptorRegistry registry) {
+		registry.addInterceptor(loginInterceptor)
+				.addPathPatterns("/**")
+                .excludePathPatterns("/login",
+				"/swagger-resources/**",
+				"/webjars/**",
+				"/swagger-ui.html",
+				"/v2/**",
+				"/mobileApi/**")
+				.excludePathPatterns("/wxPay/webPay")
+				.excludePathPatterns("/aliPay/tradePrecreatePay")
+				.excludePathPatterns("/aliPay/payNotify")
+				.excludePathPatterns("/wxPay/payNotify");
+
+
+	}
+}

+ 85 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/interceptor/LoginInterceptor.java

@@ -0,0 +1,85 @@
+package com.jpsoft.picc.interceptor;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.security.Keys;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.security.Key;
+import java.util.Base64;
+
+@Component
+public class LoginInterceptor implements HandlerInterceptor {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        if (request.getMethod().equals("OPTIONS")){
+            return true;
+        }
+
+        String token = request.getHeader("Authorization");
+
+        if (StringUtils.isEmpty(token)){
+            token = (String)request.getSession().getAttribute("token");
+        }
+
+        if (StringUtils.isEmpty(token)) {
+            token = request.getParameter("token");
+        }
+
+        boolean result = false;
+
+        try {
+            String prefix = "Bearer ";
+
+            if (token==null || token.length() < prefix.length()){
+                throw new Exception("未传递令牌或未带前缀Bearer!");
+            }
+
+            token = token.substring(prefix.length());
+
+            byte[] privateKey = Base64.getDecoder().decode(jwtSecret);
+
+            Key key = Keys.hmacShaKeyFor(privateKey);
+
+            Claims claims = Jwts.parser()
+                            .setSigningKey(key)
+                            .parseClaimsJws(token)
+                            .getBody();
+
+            String userId = claims.getSubject();
+
+            request.setAttribute("subject",userId);
+
+            result = true;
+        }
+        catch(Exception ex){
+            MessageResult<String> msgResult = new MessageResult<>();
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+            msgResult.setCode(415);
+
+            ObjectMapper mapper = new ObjectMapper();
+            String json = mapper.writeValueAsString(msgResult);
+
+            response.setContentType("application/json");
+            response.setCharacterEncoding("UTF-8");
+            response.setHeader("access-control-allow-origin","*");
+            response.getWriter().print(json);
+
+            result = false;
+        }
+
+        return result;
+    }
+}

+ 104 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/admin/controller/JwtsUserController.java

@@ -0,0 +1,104 @@
+package com.jpsoft.picc.modules.admin.controller;
+
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.DES3;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.security.Keys;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpSession;
+import java.security.Key;
+import java.util.Base64;
+import java.util.Date;
+
+@RestController
+@Api(description = "用户登录、登出")
+public class JwtsUserController {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Autowired
+    private UserService userService;
+
+    @PostMapping("/login")
+    @ApiOperation(value="登录获取token,在swagger ui中获取token时将写入session,调用其它接口时不用再设置header")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="userName", paramType="query", required=true, value="用户名"),
+            @ApiImplicitParam(name="password", paramType="query", required=true, value="密码")
+    })
+    public MessageResult<String> login(String userName, String password, @ApiIgnore HttpSession session){
+        MessageResult<String> messageResult = new MessageResult<>();
+
+        try {
+            User user = userService.findByUserName(userName);
+
+            DES3 des3 = new DES3();
+
+            String passwordEnc = des3.encrypt(jwtSecret,password);
+
+            if(user!=null && passwordEnc.equals(user.getPassword())){
+                //生成token
+                Date now = new Date();
+                long expiration = now.getTime() + 3600 * 6000; //6个小时后,该客户端的token过期
+
+                byte[] privateKey = Base64.getDecoder().decode(jwtSecret);
+
+                Key key = Keys.hmacShaKeyFor(privateKey);
+
+                String token = Jwts.builder()
+                        .setSubject(user.getId())
+                        //设置自定义claims后,setSubject值将失效
+//               .setClaims(extraInfo)
+                        .signWith(key)
+                        .setExpiration(new Date(expiration))
+                        .compact();
+
+                session.setAttribute("token","Bearer " + token);
+
+                messageResult.setResult(true);
+                messageResult.setData("Bearer " + token);
+            }
+            else{
+                messageResult.setResult(false);
+                messageResult.setMessage("用户不存在或密码错误!");
+            }
+
+        }
+        catch(Exception ex){
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @GetMapping("/userInfo")
+    public MessageResult<User> userInfo(@RequestAttribute String subject){
+        MessageResult<User> messageResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(subject);
+
+            messageResult.setResult(true);
+            messageResult.setData(user);
+        }
+        catch(Exception ex){
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+}

+ 223 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/ApprovalRecordController.java

@@ -0,0 +1,223 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.ApprovalRecord;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.ApprovalRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/approvalRecord")
+@Api(description = "企业历史投保记录")
+public class ApprovalRecordController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private ApprovalRecordService approvalRecordService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<ApprovalRecord> create(){
+        MessageResult<ApprovalRecord> msgResult = new MessageResult<>();
+
+        ApprovalRecord approvalRecord = new ApprovalRecord();
+
+        msgResult.setData(approvalRecord);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<ApprovalRecord> add(@RequestBody ApprovalRecord approvalRecord,@RequestAttribute String subject){
+        MessageResult<ApprovalRecord> msgResult = new MessageResult<>();
+
+        try {
+            approvalRecord.setId(UUID.randomUUID().toString());
+            approvalRecord.setDelFlag(false);
+            approvalRecord.setCreateBy(subject);
+            approvalRecord.setCreateTime(new Date());
+            
+            int affectCount = approvalRecordService.insert(approvalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(approvalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<ApprovalRecord> edit(@PathVariable("id") String id){
+        MessageResult<ApprovalRecord> msgResult = new MessageResult<>();
+
+        try {
+            ApprovalRecord approvalRecord = approvalRecordService.get(id);
+
+            if (approvalRecord != null) {
+                msgResult.setResult(true);
+                msgResult.setData(approvalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<ApprovalRecord> update(@RequestBody ApprovalRecord approvalRecord,@RequestAttribute String subject){
+        MessageResult<ApprovalRecord> msgResult = new MessageResult<>();
+
+        try {
+            approvalRecord.setUpdateBy(subject);
+            approvalRecord.setUpdateTime(new Date());
+            
+            int affectCount = approvalRecordService.update(approvalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(approvalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            ApprovalRecord approvalRecord = approvalRecordService.get(id);
+            approvalRecord.setDelFlag(true);
+            approvalRecord.setUpdateBy(subject);
+            approvalRecord.setUpdateTime(new Date());
+
+            int affectCount = approvalRecordService.update(approvalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                ApprovalRecord approvalRecord = approvalRecordService.get(id);
+                approvalRecord.setDelFlag(true);
+                approvalRecord.setUpdateBy(subject);
+                approvalRecord.setUpdateTime(new Date());
+
+                affectCount += approvalRecordService.update(approvalRecord);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<ApprovalRecord> page = approvalRecordService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 55 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/AttachmentController.java

@@ -0,0 +1,55 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.jpsoft.picc.modules.common.config.OSSConfig;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.Uploader;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+@Api(description="附件管理")
+@RestController
+@RequestMapping("/base/attachment")
+@Slf4j
+public class AttachmentController {
+    @Autowired
+    private OSSConfig ossConfig;
+
+    @PostMapping("upload")
+    @ApiOperation(value="附件上传")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "fileName",value = "文件名", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "subFolder",value = "子目录名(如/test)", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "uploadFile",value = "上传文件", required = true,paramType="form", dataType = "__file")
+    })
+    public MessageResult<String> upload(String fileName, String subFolder, MultipartFile uploadFile){
+        MessageResult<String> messageResult = new MessageResult<>();
+
+        try {
+            if (StringUtils.isEmpty(fileName)){
+                fileName = uploadFile.getOriginalFilename();
+            }
+
+            String retFileUrl = Uploader.ossUpload(ossConfig,subFolder,fileName,uploadFile.getInputStream());
+
+            messageResult.setResult(true);
+            messageResult.setData(retFileUrl);
+            messageResult.setCode(200);
+        } catch (Exception e) {
+            log.error(e.getMessage(),e);
+
+            messageResult.setResult(false);
+            messageResult.setMessage(e.getMessage());
+        }
+
+        return messageResult;
+    }
+}

+ 201 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/CompanyController.java

@@ -0,0 +1,201 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.Company;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.CompanyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/company")
+@Api(description = "企业信息")
+public class CompanyController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private CompanyService companyService;
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("detail")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "companyId",value = "企业编号", required = true, paramType = "query")
+    })
+    public MessageResult<Company> detail(String companyId){
+        MessageResult<Company> msgResult = new MessageResult<>();
+
+        try {
+            Company company = companyService.get(companyId);
+
+            if (company != null) {
+                msgResult.setResult(true);
+                msgResult.setData(company);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+//    @ApiOperation(value="更新企业信息")
+//    @PostMapping("update")
+    @Deprecated
+    public MessageResult<Company> update(@RequestBody Company company,@RequestAttribute String subject){
+        MessageResult<Company> msgResult = new MessageResult<>();
+
+        try {
+            company.setUpdateBy(subject);
+            company.setUpdateTime(new Date());
+            
+            int affectCount = companyService.update(company);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(company);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+//	@ApiOperation(value="删除")
+//  @PostMapping("delete/{id}")
+    @Deprecated
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Company company = companyService.get(id);
+            company.setDelFlag(true);
+            company.setUpdateBy(subject);
+            company.setUpdateTime(new Date());
+
+            int affectCount = companyService.update(company);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+//    @ApiOperation(value="批量删除")
+//    @PostMapping("batchDelete")
+    @Deprecated
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Company company = companyService.get(id);
+                company.setDelFlag(true);
+                company.setUpdateBy(subject);
+                company.setUpdateTime(new Date());
+
+                affectCount += companyService.update(company);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "name",value = "企业名称", paramType = "form"),
+            @ApiImplicitParam(name = "legalName",value = "法人代表", paramType = "form"),
+            @ApiImplicitParam(name = "usccCode",value = "证件编号", paramType = "form"),
+            @ApiImplicitParam(name = "subject",value = "当前用户编号(系统自动获取,不用填写)")
+    })
+    public MessageResult<Map> pageList(
+            String name,String legalName,String usccCode,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","asc"));
+
+        if (StringUtils.isNotEmpty(name)) {
+            searchParams.put("name","%" + name + "%");
+        }
+
+        if (StringUtils.isNotEmpty(legalName)) {
+            searchParams.put("legalName","%" + legalName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(usccCode)) {
+            searchParams.put("usccCode","%" + usccCode + "%");
+        }
+
+        Page<Company> page = companyService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 223 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/CompanyMemberController.java

@@ -0,0 +1,223 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.CompanyMember;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.CompanyMemberService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/companyMember")
+@Api(description = "企业人员信息")
+public class CompanyMemberController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private CompanyMemberService companyMemberService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<CompanyMember> create(){
+        MessageResult<CompanyMember> msgResult = new MessageResult<>();
+
+        CompanyMember companyMember = new CompanyMember();
+
+        msgResult.setData(companyMember);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<CompanyMember> add(@RequestBody CompanyMember companyMember,@RequestAttribute String subject){
+        MessageResult<CompanyMember> msgResult = new MessageResult<>();
+
+        try {
+            companyMember.setId(UUID.randomUUID().toString());
+            companyMember.setDelFlag(false);
+            companyMember.setCreateBy(subject);
+            companyMember.setCreateTime(new Date());
+            
+            int affectCount = companyMemberService.insert(companyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(companyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<CompanyMember> edit(@PathVariable("id") String id){
+        MessageResult<CompanyMember> msgResult = new MessageResult<>();
+
+        try {
+            CompanyMember companyMember = companyMemberService.get(id);
+
+            if (companyMember != null) {
+                msgResult.setResult(true);
+                msgResult.setData(companyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<CompanyMember> update(@RequestBody CompanyMember companyMember,@RequestAttribute String subject){
+        MessageResult<CompanyMember> msgResult = new MessageResult<>();
+
+        try {
+            companyMember.setUpdateBy(subject);
+            companyMember.setUpdateTime(new Date());
+            
+            int affectCount = companyMemberService.update(companyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(companyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            CompanyMember companyMember = companyMemberService.get(id);
+            companyMember.setDelFlag(true);
+            companyMember.setUpdateBy(subject);
+            companyMember.setUpdateTime(new Date());
+
+            int affectCount = companyMemberService.update(companyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                CompanyMember companyMember = companyMemberService.get(id);
+                companyMember.setDelFlag(true);
+                companyMember.setUpdateBy(subject);
+                companyMember.setUpdateTime(new Date());
+
+                affectCount += companyMemberService.update(companyMember);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<CompanyMember> page = companyMemberService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 238 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceAgentController.java

@@ -0,0 +1,238 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceAgent;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.InsuranceAgentService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/insuranceAgent")
+@Api(description = "保险代理人")
+public class InsuranceAgentController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsuranceAgentService insuranceAgentService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsuranceAgent> create(){
+        MessageResult<InsuranceAgent> msgResult = new MessageResult<>();
+
+        InsuranceAgent insuranceAgent = new InsuranceAgent();
+
+        msgResult.setData(insuranceAgent);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsuranceAgent> add(@RequestBody InsuranceAgent insuranceAgent,@RequestAttribute String subject){
+        MessageResult<InsuranceAgent> msgResult = new MessageResult<>();
+
+        try {
+            insuranceAgent.setId(UUID.randomUUID().toString());
+            insuranceAgent.setDelFlag(false);
+            insuranceAgent.setCreateBy(subject);
+            insuranceAgent.setCreateTime(new Date());
+            
+            int affectCount = insuranceAgentService.insert(insuranceAgent);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceAgent);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsuranceAgent> edit(@PathVariable("id") String id){
+        MessageResult<InsuranceAgent> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceAgent insuranceAgent = insuranceAgentService.get(id);
+
+            if (insuranceAgent != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceAgent);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsuranceAgent> update(@RequestBody InsuranceAgent insuranceAgent,@RequestAttribute String subject){
+        MessageResult<InsuranceAgent> msgResult = new MessageResult<>();
+
+        try {
+            insuranceAgent.setUpdateBy(subject);
+            insuranceAgent.setUpdateTime(new Date());
+            
+            int affectCount = insuranceAgentService.update(insuranceAgent);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceAgent);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceAgent insuranceAgent = insuranceAgentService.get(id);
+            insuranceAgent.setDelFlag(true);
+            insuranceAgent.setUpdateBy(subject);
+            insuranceAgent.setUpdateTime(new Date());
+
+            int affectCount = insuranceAgentService.update(insuranceAgent);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsuranceAgent insuranceAgent = insuranceAgentService.get(id);
+                insuranceAgent.setDelFlag(true);
+                insuranceAgent.setUpdateBy(subject);
+                insuranceAgent.setUpdateTime(new Date());
+
+                affectCount += insuranceAgentService.update(insuranceAgent);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsuranceAgent> page = insuranceAgentService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="所有代理人列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult<List<InsuranceAgent>> list(){
+
+        MessageResult<List<InsuranceAgent>> msgResult = new MessageResult<>();
+
+        List<InsuranceAgent> list = insuranceAgentService.list();
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 238 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceDefinitionController.java

@@ -0,0 +1,238 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinition;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.InsuranceDefinitionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/insuranceDefinition")
+@Api(description = "险种信息")
+public class InsuranceDefinitionController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsuranceDefinitionService insuranceDefinitionService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsuranceDefinition> create(){
+        MessageResult<InsuranceDefinition> msgResult = new MessageResult<>();
+
+        InsuranceDefinition insuranceDefinition = new InsuranceDefinition();
+
+        msgResult.setData(insuranceDefinition);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsuranceDefinition> add(@RequestBody InsuranceDefinition insuranceDefinition,@RequestAttribute String subject){
+        MessageResult<InsuranceDefinition> msgResult = new MessageResult<>();
+
+        try {
+            insuranceDefinition.setId(UUID.randomUUID().toString());
+            insuranceDefinition.setDelFlag(false);
+            insuranceDefinition.setCreateBy(subject);
+            insuranceDefinition.setCreateTime(new Date());
+            
+            int affectCount = insuranceDefinitionService.insert(insuranceDefinition);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinition);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsuranceDefinition> edit(@PathVariable("id") String id){
+        MessageResult<InsuranceDefinition> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceDefinition insuranceDefinition = insuranceDefinitionService.get(id);
+
+            if (insuranceDefinition != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinition);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsuranceDefinition> update(@RequestBody InsuranceDefinition insuranceDefinition,@RequestAttribute String subject){
+        MessageResult<InsuranceDefinition> msgResult = new MessageResult<>();
+
+        try {
+            insuranceDefinition.setUpdateBy(subject);
+            insuranceDefinition.setUpdateTime(new Date());
+            
+            int affectCount = insuranceDefinitionService.update(insuranceDefinition);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinition);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceDefinition insuranceDefinition = insuranceDefinitionService.get(id);
+            insuranceDefinition.setDelFlag(true);
+            insuranceDefinition.setUpdateBy(subject);
+            insuranceDefinition.setUpdateTime(new Date());
+
+            int affectCount = insuranceDefinitionService.update(insuranceDefinition);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsuranceDefinition insuranceDefinition = insuranceDefinitionService.get(id);
+                insuranceDefinition.setDelFlag(true);
+                insuranceDefinition.setUpdateBy(subject);
+                insuranceDefinition.setUpdateTime(new Date());
+
+                affectCount += insuranceDefinitionService.update(insuranceDefinition);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsuranceDefinition> page = insuranceDefinitionService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="所有险种列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult<List<InsuranceDefinition>> list(){
+
+        MessageResult<List<InsuranceDefinition>> msgResult = new MessageResult<>();
+
+        List<InsuranceDefinition> list = insuranceDefinitionService.list();
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 224 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceDefinitionLimitController.java

@@ -0,0 +1,224 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinition;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinitionLimit;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.InsuranceDefinitionLimitService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/insuranceDefinitionLimit")
+@Api(description = "险种限额信息")
+public class InsuranceDefinitionLimitController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsuranceDefinitionLimitService insuranceDefinitionLimitService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsuranceDefinitionLimit> create(){
+        MessageResult<InsuranceDefinitionLimit> msgResult = new MessageResult<>();
+
+        InsuranceDefinitionLimit insuranceDefinitionLimit = new InsuranceDefinitionLimit();
+
+        msgResult.setData(insuranceDefinitionLimit);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsuranceDefinitionLimit> add(@RequestBody InsuranceDefinitionLimit insuranceDefinitionLimit,@RequestAttribute String subject){
+        MessageResult<InsuranceDefinitionLimit> msgResult = new MessageResult<>();
+
+        try {
+            insuranceDefinitionLimit.setId(UUID.randomUUID().toString());
+            insuranceDefinitionLimit.setDelFlag(false);
+            insuranceDefinitionLimit.setCreateBy(subject);
+            insuranceDefinitionLimit.setCreateTime(new Date());
+            
+            int affectCount = insuranceDefinitionLimitService.insert(insuranceDefinitionLimit);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinitionLimit);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsuranceDefinitionLimit> edit(@PathVariable("id") String id){
+        MessageResult<InsuranceDefinitionLimit> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceDefinitionLimit insuranceDefinitionLimit = insuranceDefinitionLimitService.get(id);
+
+            if (insuranceDefinitionLimit != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinitionLimit);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsuranceDefinitionLimit> update(@RequestBody InsuranceDefinitionLimit insuranceDefinitionLimit,@RequestAttribute String subject){
+        MessageResult<InsuranceDefinitionLimit> msgResult = new MessageResult<>();
+
+        try {
+            insuranceDefinitionLimit.setUpdateBy(subject);
+            insuranceDefinitionLimit.setUpdateTime(new Date());
+            
+            int affectCount = insuranceDefinitionLimitService.update(insuranceDefinitionLimit);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceDefinitionLimit);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceDefinitionLimit insuranceDefinitionLimit = insuranceDefinitionLimitService.get(id);
+            insuranceDefinitionLimit.setDelFlag(true);
+            insuranceDefinitionLimit.setUpdateBy(subject);
+            insuranceDefinitionLimit.setUpdateTime(new Date());
+
+            int affectCount = insuranceDefinitionLimitService.update(insuranceDefinitionLimit);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsuranceDefinitionLimit insuranceDefinitionLimit = insuranceDefinitionLimitService.get(id);
+                insuranceDefinitionLimit.setDelFlag(true);
+                insuranceDefinitionLimit.setUpdateBy(subject);
+                insuranceDefinitionLimit.setUpdateTime(new Date());
+
+                affectCount += insuranceDefinitionLimitService.update(insuranceDefinitionLimit);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsuranceDefinitionLimit> page = insuranceDefinitionLimitService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 247 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/InsuranceJobsController.java

@@ -0,0 +1,247 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceJobs;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.InsuranceJobsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/insuranceJobs")
+@Api(description = "险种关联行业收费标准")
+public class InsuranceJobsController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsuranceJobsService insuranceJobsService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsuranceJobs> create(){
+        MessageResult<InsuranceJobs> msgResult = new MessageResult<>();
+
+        InsuranceJobs insuranceJobs = new InsuranceJobs();
+
+        msgResult.setData(insuranceJobs);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsuranceJobs> add(@RequestBody InsuranceJobs insuranceJobs,@RequestAttribute String subject){
+        MessageResult<InsuranceJobs> msgResult = new MessageResult<>();
+
+        try {
+            insuranceJobs.setId(UUID.randomUUID().toString());
+            insuranceJobs.setDelFlag(false);
+            insuranceJobs.setCreateBy(subject);
+            insuranceJobs.setCreateTime(new Date());
+            
+            int affectCount = insuranceJobsService.insert(insuranceJobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceJobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsuranceJobs> edit(@PathVariable("id") String id){
+        MessageResult<InsuranceJobs> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceJobs insuranceJobs = insuranceJobsService.get(id);
+
+            if (insuranceJobs != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceJobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsuranceJobs> update(@RequestBody InsuranceJobs insuranceJobs,@RequestAttribute String subject){
+        MessageResult<InsuranceJobs> msgResult = new MessageResult<>();
+
+        try {
+            insuranceJobs.setUpdateBy(subject);
+            insuranceJobs.setUpdateTime(new Date());
+            
+            int affectCount = insuranceJobsService.update(insuranceJobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceJobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceJobs insuranceJobs = insuranceJobsService.get(id);
+            insuranceJobs.setDelFlag(true);
+            insuranceJobs.setUpdateBy(subject);
+            insuranceJobs.setUpdateTime(new Date());
+
+            int affectCount = insuranceJobsService.update(insuranceJobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsuranceJobs insuranceJobs = insuranceJobsService.get(id);
+                insuranceJobs.setDelFlag(true);
+                insuranceJobs.setUpdateBy(subject);
+                insuranceJobs.setUpdateTime(new Date());
+
+                affectCount += insuranceJobsService.update(insuranceJobs);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsuranceJobs> page = insuranceJobsService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+
+    @ApiOperation(value="险种关联行业类型列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="definitionId",value = "险种信息ID",required = true,paramType = "query")
+    })
+    public MessageResult<List<InsuranceJobs>> list(String definitionId, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<List<InsuranceJobs>> msgResult = new MessageResult<>();
+
+        List<InsuranceJobs> list = insuranceJobsService.listByDefinitionId(definitionId);
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 238 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/JobsController.java

@@ -0,0 +1,238 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.Jobs;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.JobsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/jobs")
+@Api(description = "行业/职业类型信息")
+public class JobsController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private JobsService jobsService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Jobs> create(){
+        MessageResult<Jobs> msgResult = new MessageResult<>();
+
+        Jobs jobs = new Jobs();
+
+        msgResult.setData(jobs);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Jobs> add(@RequestBody Jobs jobs,@RequestAttribute String subject){
+        MessageResult<Jobs> msgResult = new MessageResult<>();
+
+        try {
+            jobs.setId(UUID.randomUUID().toString());
+            jobs.setDelFlag(false);
+            jobs.setCreateBy(subject);
+            jobs.setCreateTime(new Date());
+            
+            int affectCount = jobsService.insert(jobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(jobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Jobs> edit(@PathVariable("id") String id){
+        MessageResult<Jobs> msgResult = new MessageResult<>();
+
+        try {
+            Jobs jobs = jobsService.get(id);
+
+            if (jobs != null) {
+                msgResult.setResult(true);
+                msgResult.setData(jobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Jobs> update(@RequestBody Jobs jobs,@RequestAttribute String subject){
+        MessageResult<Jobs> msgResult = new MessageResult<>();
+
+        try {
+            jobs.setUpdateBy(subject);
+            jobs.setUpdateTime(new Date());
+            
+            int affectCount = jobsService.update(jobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(jobs);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Jobs jobs = jobsService.get(id);
+            jobs.setDelFlag(true);
+            jobs.setUpdateBy(subject);
+            jobs.setUpdateTime(new Date());
+
+            int affectCount = jobsService.update(jobs);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Jobs jobs = jobsService.get(id);
+                jobs.setDelFlag(true);
+                jobs.setUpdateBy(subject);
+                jobs.setUpdateTime(new Date());
+
+                affectCount += jobsService.update(jobs);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<Jobs> page = jobsService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="所有行业类型列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult<List<Jobs>> list(){
+
+        MessageResult<List<Jobs>> msgResult = new MessageResult<>();
+
+        List<Jobs> list = jobsService.list();
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 242 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/MessageController.java

@@ -0,0 +1,242 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.Message;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.MessageService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/message")
+@Api(description = "站内消息")
+public class MessageController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private MessageService messageService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Message> create(){
+        MessageResult<Message> msgResult = new MessageResult<>();
+
+        Message message = new Message();
+
+        msgResult.setData(message);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Message> add(@RequestBody Message message,@RequestAttribute String subject){
+        MessageResult<Message> msgResult = new MessageResult<>();
+
+        try {
+            message.setId(UUID.randomUUID().toString());
+            message.setDelFlag(false);
+            message.setCreateBy(subject);
+            message.setCreateTime(new Date());
+            
+            int affectCount = messageService.insert(message);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(message);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Message> edit(@PathVariable("id") String id){
+        MessageResult<Message> msgResult = new MessageResult<>();
+
+        try {
+            Message message = messageService.get(id);
+
+            if (message != null) {
+                msgResult.setResult(true);
+                msgResult.setData(message);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Message> update(@RequestBody Message message,@RequestAttribute String subject){
+        MessageResult<Message> msgResult = new MessageResult<>();
+
+        try {
+            message.setUpdateBy(subject);
+            message.setUpdateTime(new Date());
+            
+            int affectCount = messageService.update(message);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(message);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Message message = messageService.get(id);
+            message.setDelFlag(true);
+            message.setUpdateBy(subject);
+            message.setUpdateTime(new Date());
+
+            int affectCount = messageService.update(message);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Message message = messageService.get(id);
+                message.setDelFlag(true);
+                message.setUpdateBy(subject);
+                message.setUpdateTime(new Date());
+
+                affectCount += messageService.update(message);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<Message> page = messageService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="消息列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult<List<Message>> list(@RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<List<Message>> msgResult = new MessageResult<>();
+
+        List<Message> list = messageService.findByRecipientId(subject);
+
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 223 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/base/controller/TransactionRecordController.java

@@ -0,0 +1,223 @@
+package com.jpsoft.picc.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.TransactionRecord;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.base.service.TransactionRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/transactionRecord")
+@Api(description = "企业账户流水信息")
+public class TransactionRecordController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private TransactionRecordService transactionRecordService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<TransactionRecord> create(){
+        MessageResult<TransactionRecord> msgResult = new MessageResult<>();
+
+        TransactionRecord transactionRecord = new TransactionRecord();
+
+        msgResult.setData(transactionRecord);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<TransactionRecord> add(@RequestBody TransactionRecord transactionRecord,@RequestAttribute String subject){
+        MessageResult<TransactionRecord> msgResult = new MessageResult<>();
+
+        try {
+            transactionRecord.setId(UUID.randomUUID().toString());
+            transactionRecord.setDelFlag(false);
+            transactionRecord.setCreateBy(subject);
+            transactionRecord.setCreateTime(new Date());
+            
+            int affectCount = transactionRecordService.insert(transactionRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(transactionRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<TransactionRecord> edit(@PathVariable("id") String id){
+        MessageResult<TransactionRecord> msgResult = new MessageResult<>();
+
+        try {
+            TransactionRecord transactionRecord = transactionRecordService.get(id);
+
+            if (transactionRecord != null) {
+                msgResult.setResult(true);
+                msgResult.setData(transactionRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<TransactionRecord> update(@RequestBody TransactionRecord transactionRecord,@RequestAttribute String subject){
+        MessageResult<TransactionRecord> msgResult = new MessageResult<>();
+
+        try {
+            transactionRecord.setUpdateBy(subject);
+            transactionRecord.setUpdateTime(new Date());
+            
+            int affectCount = transactionRecordService.update(transactionRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(transactionRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            TransactionRecord transactionRecord = transactionRecordService.get(id);
+            transactionRecord.setDelFlag(true);
+            transactionRecord.setUpdateBy(subject);
+            transactionRecord.setUpdateTime(new Date());
+
+            int affectCount = transactionRecordService.update(transactionRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                TransactionRecord transactionRecord = transactionRecordService.get(id);
+                transactionRecord.setDelFlag(true);
+                transactionRecord.setUpdateBy(subject);
+                transactionRecord.setUpdateTime(new Date());
+
+                affectCount += transactionRecordService.update(transactionRecord);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<TransactionRecord> page = transactionRecordService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 72 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/ApplicationPolicyController.java

@@ -0,0 +1,72 @@
+package com.jpsoft.picc.modules.business.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.business.entity.ApplicationPolicy;
+import com.jpsoft.picc.modules.business.service.ApplicationPolicyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/applicationPolicy")
+@Api(description = "投保单和每月投保单关联表")
+public class ApplicationPolicyController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private ApplicationPolicyService applicationPolicyService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<ApplicationPolicy> create(){
+        MessageResult<ApplicationPolicy> msgResult = new MessageResult<>();
+
+        ApplicationPolicy applicationPolicy = new ApplicationPolicy();
+
+        msgResult.setData(applicationPolicy);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<ApplicationPolicy> page = applicationPolicyService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 349 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsuranceApplicationController.java

@@ -0,0 +1,349 @@
+package com.jpsoft.picc.modules.business.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinition;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinitionLimit;
+import com.jpsoft.picc.modules.base.entity.InsuranceJobs;
+import com.jpsoft.picc.modules.base.entity.Jobs;
+import com.jpsoft.picc.modules.base.service.InsuranceDefinitionLimitService;
+import com.jpsoft.picc.modules.base.service.InsuranceDefinitionService;
+import com.jpsoft.picc.modules.base.service.InsuranceJobsService;
+import com.jpsoft.picc.modules.base.service.JobsService;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.business.entity.InsuranceApplication;
+import com.jpsoft.picc.modules.business.service.InsuranceApplicationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/insuranceApplication")
+@Api(description = "投保单")
+public class InsuranceApplicationController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsuranceApplicationService insuranceApplicationService;
+
+    @Autowired
+    private InsuranceDefinitionService insuranceDefinitionService;
+
+    @Autowired
+    private InsuranceDefinitionLimitService insuranceDefinitionLimitService;
+
+    @Autowired
+    private JobsService jobsService;
+
+    @Autowired
+    private InsuranceJobsService insuranceJobsService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsuranceApplication> create(){
+        MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
+
+        InsuranceApplication insuranceApplication = new InsuranceApplication();
+
+        msgResult.setData(insuranceApplication);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsuranceApplication> add(@RequestBody InsuranceApplication insuranceApplication,@RequestAttribute String subject){
+        MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
+
+        try {
+            insuranceApplication.setId(UUID.randomUUID().toString());
+            insuranceApplication.setDelFlag(false);
+            insuranceApplication.setCreateBy(subject);
+            insuranceApplication.setCreateTime(new Date());
+            
+            int affectCount = insuranceApplicationService.insert(insuranceApplication);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceApplication);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsuranceApplication> edit(@PathVariable("id") String id){
+        MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceApplication insuranceApplication = insuranceApplicationService.get(id);
+
+            if (insuranceApplication != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceApplication);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="获取投保信息")
+    @GetMapping("insureDetail/{id}")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "投保信息ID",required = true,paramType = "query")
+    })
+    public MessageResult<InsuranceApplication> insureDetail(@PathVariable("id") String id){
+        MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceApplication insuranceApplication = insuranceApplicationService.get(id);
+
+            if (insuranceApplication != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceApplication);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsuranceApplication> update(@RequestBody InsuranceApplication insuranceApplication,@RequestAttribute String subject){
+        MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
+
+        try {
+            insuranceApplication.setUpdateBy(subject);
+            insuranceApplication.setUpdateTime(new Date());
+            
+            int affectCount = insuranceApplicationService.update(insuranceApplication);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insuranceApplication);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsuranceApplication insuranceApplication = insuranceApplicationService.get(id);
+            insuranceApplication.setDelFlag(true);
+            insuranceApplication.setUpdateBy(subject);
+            insuranceApplication.setUpdateTime(new Date());
+
+            int affectCount = insuranceApplicationService.update(insuranceApplication);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsuranceApplication insuranceApplication = insuranceApplicationService.get(id);
+                insuranceApplication.setDelFlag(true);
+                insuranceApplication.setUpdateBy(subject);
+                insuranceApplication.setUpdateTime(new Date());
+
+                affectCount += insuranceApplicationService.update(insuranceApplication);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsuranceApplication> page = insuranceApplicationService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+
+    @ApiOperation(value="获取承保信息")
+    @RequestMapping(value = "acceptDetail",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="definitionId",value = "险种ID",required = true,paramType = "query")
+    })
+    public MessageResult<Map> acceptDetail(String definitionId, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> map = new HashMap<String,Object>();
+
+        InsuranceDefinition insuranceDefinition = insuranceDefinitionService.get(definitionId);
+
+        map.put("id",insuranceDefinition.getId());
+        map.put("name",insuranceDefinition.getName());
+
+        List<InsuranceDefinitionLimit> insuranceDefinitionLimitList = insuranceDefinitionLimitService.findByDefinitionId(definitionId);
+
+        List<Map<String,Object>> mapList = new ArrayList<Map<String,Object>>();
+
+        for(InsuranceDefinitionLimit  insuranceDefinitionLimit:insuranceDefinitionLimitList){
+            Map<String,Object> map1 = new HashMap<String,Object>();
+            map1.put("id",insuranceDefinitionLimit.getId());
+            map1.put("name",insuranceDefinitionLimit.getName());
+            map1.put("limit",insuranceDefinitionLimit.getLimit());
+            map1.put("unit",insuranceDefinitionLimit.getUnit());
+            mapList.add(map1);
+        }
+
+        map.put("insuranceDefinitionLimitList",mapList);
+
+        List<Jobs> jobsList = jobsService.findByDefinitionId(definitionId);
+
+        List<Map<String,Object>> mapList1 = new ArrayList<Map<String,Object>>();
+
+        for (Jobs jobs:jobsList) {
+            Map<String,Object> map1 = new HashMap<String,Object>();
+            String jobId = jobs.getId();
+            map1.put("id",jobId);
+            map1.put("name",jobs.getName());
+            map1.put("content",jobs.getContent());
+
+            List<InsuranceJobs> insuranceJobsList = insuranceJobsService.findByDefinitionIdAndJobId(definitionId,jobId);
+
+            List<Map<String,Object>> mapList2 = new ArrayList<Map<String,Object>>();
+
+            for (InsuranceJobs insuranceJobs:insuranceJobsList) {
+                Map<String,Object> map2 = new HashMap<String,Object>();
+                map2.put("id",insuranceJobs.getId());
+                map2.put("charges",insuranceJobs.getCharges());
+
+                mapList2.add(map2);
+            }
+
+            map1.put("insuranceJobsList",mapList2);
+
+            mapList1.add(map1);
+        }
+
+        map.put("jobsList",mapList1);
+
+        msgResult.setResult(true);
+        msgResult.setData(map);
+
+        return msgResult;
+    }
+}

+ 433 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyController.java

@@ -0,0 +1,433 @@
+package com.jpsoft.picc.modules.business.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.base.entity.InsuranceAgent;
+import com.jpsoft.picc.modules.base.service.InsuranceAgentService;
+import com.jpsoft.picc.modules.business.entity.InsuranceApplication;
+import com.jpsoft.picc.modules.business.service.InsuranceApplicationService;
+import com.jpsoft.picc.modules.business.service.InsurancePolicyRecordService;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.business.entity.InsurancePolicy;
+import com.jpsoft.picc.modules.business.service.InsurancePolicyService;
+import com.jpsoft.picc.modules.business.entity.InsurancePolicyRecord;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/insurancePolicy")
+@Api(description = "每月投保单")
+public class InsurancePolicyController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsurancePolicyService insurancePolicyService;
+
+    @Autowired
+    private InsuranceAgentService insuranceAgentService;
+
+    @Autowired
+    private InsurancePolicyRecordService insurancePolicyRecordService;
+
+    @Autowired
+    private InsuranceApplicationService insuranceApplicationService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsurancePolicy> create(){
+        MessageResult<InsurancePolicy> msgResult = new MessageResult<>();
+
+        InsurancePolicy insurancePolicy = new InsurancePolicy();
+
+        msgResult.setData(insurancePolicy);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsurancePolicy> add(@RequestBody InsurancePolicy insurancePolicy,@RequestAttribute String subject){
+        MessageResult<InsurancePolicy> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicy.setId(UUID.randomUUID().toString());
+            insurancePolicy.setDelFlag(false);
+            insurancePolicy.setCreateBy(subject);
+            insurancePolicy.setCreateTime(new Date());
+            
+            int affectCount = insurancePolicyService.insert(insurancePolicy);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicy);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsurancePolicy> edit(@PathVariable("id") String id){
+        MessageResult<InsurancePolicy> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+
+            if (insurancePolicy != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicy);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsurancePolicy> update(@RequestBody InsurancePolicy insurancePolicy,@RequestAttribute String subject){
+        MessageResult<InsurancePolicy> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicy.setUpdateBy(subject);
+            insurancePolicy.setUpdateTime(new Date());
+            
+            int affectCount = insurancePolicyService.update(insurancePolicy);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicy);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+            insurancePolicy.setDelFlag(true);
+            insurancePolicy.setUpdateBy(subject);
+            insurancePolicy.setUpdateTime(new Date());
+
+            int affectCount = insurancePolicyService.update(insurancePolicy);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+                insurancePolicy.setDelFlag(true);
+                insurancePolicy.setUpdateBy(subject);
+                insurancePolicy.setUpdateTime(new Date());
+
+                affectCount += insurancePolicyService.update(insurancePolicy);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsurancePolicy> page = insurancePolicyService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="读取附件")
+    @RequestMapping(value = "attachmentList",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query")
+    })
+    public MessageResult<Map> attachmentList(String id, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,String> map = new HashMap<String,String>();
+
+        InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+
+        String file = insurancePolicy.getInsurancePolicyFile();
+
+        String[] files = file.split(";");
+
+        if(files.length==2){
+            map.put("file1",files[0]);
+            map.put("file2",files[1]);
+        }
+
+        msgResult.setResult(true);
+        msgResult.setData(map);
+
+        return msgResult;
+    }
+
+
+
+    @ApiOperation(value="读取推广信息")
+    @RequestMapping(value = "loadInsuranceAgent",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query")
+    })
+    public MessageResult<InsuranceAgent> loadInsuranceAgent(String id, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<InsuranceAgent> msgResult = new MessageResult<>();
+
+        InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+
+        String agentId = insurancePolicy.getAgentId();
+
+        InsuranceAgent insuranceAgent = insuranceAgentService.get(agentId);
+
+        msgResult.setResult(true);
+        msgResult.setData(insuranceAgent);
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="人才超市初审")
+    @RequestMapping(value = "firstApproval",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query"),
+            @ApiImplicitParam(name="processStatus",value = "流程审核状态(正常/回退)",required = true,paramType = "query"),
+            @ApiImplicitParam(name="opinion",value = "意见",required = true,paramType = "query")
+    })
+    public MessageResult<Integer> firstApproval(String id,String processStatus,String opinion, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        int affectCount1 = approval(id,processStatus,opinion,"50",subject);
+
+        msgResult.setResult(true);
+        msgResult.setData(affectCount1);
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="PICC复审")
+    @RequestMapping(value = "secondApproval",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query"),
+            @ApiImplicitParam(name="processStatus",value = "流程审核状态(正常/回退)",required = true,paramType = "query"),
+            @ApiImplicitParam(name="opinion",value = "意见",required = true,paramType = "query")
+    })
+    public MessageResult<Integer> secondApproval(String id,String processStatus,String opinion, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        int affectCount1 = approval(id,processStatus,opinion,"60",subject);
+
+        msgResult.setResult(true);
+        msgResult.setData(affectCount1);
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="PICC出单")
+    @RequestMapping(value = "issued",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query"),
+            @ApiImplicitParam(name="processStatus",value = "流程审核状态(正常/回退)",required = true,paramType = "query"),
+            @ApiImplicitParam(name="opinion",value = "意见",required = true,paramType = "query")
+    })
+    public MessageResult<Integer> issued(String id,String processStatus,String opinion, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        int affectCount1 = approval(id,processStatus,opinion,"70",subject);
+
+        msgResult.setResult(true);
+        msgResult.setData(affectCount1);
+
+        return msgResult;
+    }
+
+
+    private Integer approval(String id,String processStatus,String opinion,String status,String subject){
+
+        InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
+
+        insurancePolicy.setProcessStatus(processStatus);
+        insurancePolicy.setStatus(status);
+
+        int affectCount = insurancePolicyService.update(insurancePolicy);
+
+        int affectCount1 = 0;
+
+        if(affectCount > 0){
+            InsurancePolicyRecord insurancePolicyRecord = new InsurancePolicyRecord();
+            insurancePolicyRecord.setPolicyId(insurancePolicy.getId());
+            insurancePolicyRecord.setOpinion(opinion);
+            insurancePolicyRecord.setProcessStatus(processStatus);
+            insurancePolicyRecord.setId(UUID.randomUUID().toString());
+            insurancePolicyRecord.setDelFlag(false);
+            insurancePolicyRecord.setCreateBy(subject);
+            insurancePolicyRecord.setCreateTime(new Date());
+
+            affectCount1 = insurancePolicyRecordService.insert(insurancePolicyRecord);
+        }
+        return affectCount1;
+    }
+
+
+
+
+
+    @ApiOperation(value="企业缴费")
+    @RequestMapping(value = "pay",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="applicationId",value = "投保单ID",required = true,paramType = "query"),
+            @ApiImplicitParam(name="policyId",value = "每月投保单ID",required = true,paramType = "query")
+    })
+    public MessageResult<Integer> pay(String applicationId,String policyId, @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        InsuranceApplication insuranceApplication = insuranceApplicationService.get(applicationId);
+
+        insuranceApplication.setStatus("50");//状态改为待出单
+
+        int affectCount = insuranceApplicationService.update(insuranceApplication);
+
+        if(affectCount>0){
+            InsurancePolicy insurancePolicy = insurancePolicyService.get(policyId);
+
+        }
+
+        msgResult.setResult(true);
+        msgResult.setData(affectCount);
+
+        return msgResult;
+    }
+
+
+
+}

+ 225 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyMemberController.java

@@ -0,0 +1,225 @@
+package com.jpsoft.picc.modules.business.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.business.entity.InsurancePolicyMember;
+import com.jpsoft.picc.modules.business.service.InsurancePolicyMemberService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/insurancePolicyMember")
+@Api(description = "每月投保单花名册")
+public class InsurancePolicyMemberController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsurancePolicyMemberService insurancePolicyMemberService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsurancePolicyMember> create(){
+        MessageResult<InsurancePolicyMember> msgResult = new MessageResult<>();
+
+        InsurancePolicyMember insurancePolicyMember = new InsurancePolicyMember();
+
+        msgResult.setData(insurancePolicyMember);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsurancePolicyMember> add(@RequestBody InsurancePolicyMember insurancePolicyMember,@RequestAttribute String subject){
+        MessageResult<InsurancePolicyMember> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicyMember.setId(UUID.randomUUID().toString());
+            insurancePolicyMember.setDelFlag(false);
+            insurancePolicyMember.setCreateBy(subject);
+            insurancePolicyMember.setCreateTime(new Date());
+            
+            int affectCount = insurancePolicyMemberService.insert(insurancePolicyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsurancePolicyMember> edit(@PathVariable("id") String id){
+        MessageResult<InsurancePolicyMember> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicyMember insurancePolicyMember = insurancePolicyMemberService.get(id);
+
+            if (insurancePolicyMember != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsurancePolicyMember> update(@RequestBody InsurancePolicyMember insurancePolicyMember,@RequestAttribute String subject){
+        MessageResult<InsurancePolicyMember> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicyMember.setUpdateBy(subject);
+            insurancePolicyMember.setUpdateTime(new Date());
+            
+            int affectCount = insurancePolicyMemberService.update(insurancePolicyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyMember);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicyMember insurancePolicyMember = insurancePolicyMemberService.get(id);
+            insurancePolicyMember.setDelFlag(true);
+            insurancePolicyMember.setUpdateBy(subject);
+            insurancePolicyMember.setUpdateTime(new Date());
+
+            int affectCount = insurancePolicyMemberService.update(insurancePolicyMember);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsurancePolicyMember insurancePolicyMember = insurancePolicyMemberService.get(id);
+                insurancePolicyMember.setDelFlag(true);
+                insurancePolicyMember.setUpdateBy(subject);
+                insurancePolicyMember.setUpdateTime(new Date());
+
+                affectCount += insurancePolicyMemberService.update(insurancePolicyMember);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsurancePolicyMember> page = insurancePolicyMemberService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 249 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyRecordController.java

@@ -0,0 +1,249 @@
+package com.jpsoft.picc.modules.business.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.business.entity.InsurancePolicyRecord;
+import com.jpsoft.picc.modules.business.service.InsurancePolicyRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/insurancePolicyRecord")
+@Api(description = "每月投保单审核流水")
+public class InsurancePolicyRecordController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private InsurancePolicyRecordService insurancePolicyRecordService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<InsurancePolicyRecord> create(){
+        MessageResult<InsurancePolicyRecord> msgResult = new MessageResult<>();
+
+        InsurancePolicyRecord insurancePolicyRecord = new InsurancePolicyRecord();
+
+        msgResult.setData(insurancePolicyRecord);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<InsurancePolicyRecord> add(@RequestBody InsurancePolicyRecord insurancePolicyRecord,@RequestAttribute String subject){
+        MessageResult<InsurancePolicyRecord> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicyRecord.setId(UUID.randomUUID().toString());
+            insurancePolicyRecord.setDelFlag(false);
+            insurancePolicyRecord.setCreateBy(subject);
+            insurancePolicyRecord.setCreateTime(new Date());
+            
+            int affectCount = insurancePolicyRecordService.insert(insurancePolicyRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<InsurancePolicyRecord> edit(@PathVariable("id") String id){
+        MessageResult<InsurancePolicyRecord> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicyRecord insurancePolicyRecord = insurancePolicyRecordService.get(id);
+
+            if (insurancePolicyRecord != null) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<InsurancePolicyRecord> update(@RequestBody InsurancePolicyRecord insurancePolicyRecord,@RequestAttribute String subject){
+        MessageResult<InsurancePolicyRecord> msgResult = new MessageResult<>();
+
+        try {
+            insurancePolicyRecord.setUpdateBy(subject);
+            insurancePolicyRecord.setUpdateTime(new Date());
+            
+            int affectCount = insurancePolicyRecordService.update(insurancePolicyRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(insurancePolicyRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            InsurancePolicyRecord insurancePolicyRecord = insurancePolicyRecordService.get(id);
+            insurancePolicyRecord.setDelFlag(true);
+            insurancePolicyRecord.setUpdateBy(subject);
+            insurancePolicyRecord.setUpdateTime(new Date());
+
+            int affectCount = insurancePolicyRecordService.update(insurancePolicyRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                InsurancePolicyRecord insurancePolicyRecord = insurancePolicyRecordService.get(id);
+                insurancePolicyRecord.setDelFlag(true);
+                insurancePolicyRecord.setUpdateBy(subject);
+                insurancePolicyRecord.setUpdateTime(new Date());
+
+                affectCount += insurancePolicyRecordService.update(insurancePolicyRecord);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<InsurancePolicyRecord> page = insurancePolicyRecordService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+
+    @ApiOperation(value="企业投保审批历史记录")
+    @RequestMapping(value = "historyList",method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="policy_id",value = "每月投保单申请ID",required = true,paramType = "query")
+    })
+    public MessageResult<List<InsurancePolicyRecord>> historyList(String policy_id,@RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<List<InsurancePolicyRecord>> msgResult = new MessageResult<>();
+
+        List<InsurancePolicyRecord> list = insurancePolicyRecordService.historyList(policy_id);
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 29 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/ApiController.java

@@ -0,0 +1,29 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+import javax.servlet.http.HttpServletRequest;
+
+@RestController
+@RequestMapping("/sys/api")
+@Api(description = "后端api信息")
+public class ApiController {
+    @ApiOperation("获取后端api列表")
+    @GetMapping("selectAll")
+    public ResponseEntity<String> selectAll(HttpServletRequest request){
+        RestTemplate restTemplate = new RestTemplate();
+
+        String path = request.getContextPath();
+        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+
+        ResponseEntity<String> entity = restTemplate.getForEntity(basePath + "v2/api-docs",String.class);
+
+        return entity;
+    }
+}

+ 279 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/DataDictionaryController.java

@@ -0,0 +1,279 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import com.jpsoft.picc.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/dataDictionary")
+@Api(description = "数据字典")
+public class DataDictionaryController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<DataDictionary> create(){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        DataDictionary dataDictionary = new DataDictionary();
+
+        msgResult.setData(dataDictionary);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<DataDictionary> add(@RequestBody DataDictionary dataDictionary,@RequestAttribute String subject){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            dataDictionary.setId(UUID.randomUUID().toString());
+            dataDictionary.setDelFlag(false);
+            dataDictionary.setCreateBy(subject);
+            dataDictionary.setCreateDate(new Date());
+            
+            int affectCount = dataDictionaryService.insert(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage("添加失败");
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<DataDictionary> edit(@PathVariable("id") String id){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            DataDictionary dataDictionary = dataDictionaryService.get(id);
+
+            if (dataDictionary != null) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<DataDictionary> update(@RequestBody DataDictionary dataDictionary,@RequestAttribute String subject){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            dataDictionary.setUpdateBy(subject);
+            dataDictionary.setUpdateDate(new Date());
+            
+            int affectCount = dataDictionaryService.update(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage("更新失败");
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            DataDictionary dataDictionary = dataDictionaryService.get(id);
+            dataDictionary.setDelFlag(true);
+            dataDictionary.setUpdateBy(subject);
+            dataDictionary.setUpdateDate(new Date());
+
+            int affectCount = dataDictionaryService.update(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                DataDictionary dataDictionary = dataDictionaryService.get(id);
+                //dataDictionary.setDelFlag(true);
+                dataDictionary.setUpdateBy(subject);
+                dataDictionary.setUpdateDate(new Date());
+
+                affectCount += dataDictionaryService.update(dataDictionary);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            String name,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("sort_no","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id",id);
+        }
+
+        if (StringUtils.isNotEmpty(name)) {
+            searchParams.put("name","%" + name + "%");
+        }
+
+        Page<DataDictionary> page = dataDictionaryService.pageSearch(searchParams,pageIndex, pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "查询")
+    @RequestMapping(value = "query", method = RequestMethod.POST)
+    public MessageResult<List> query(
+            String keywords,
+            String excludeId,
+            @RequestParam(value = "dataType", defaultValue = "null") String dataType,
+            @RequestParam(value = "length", defaultValue = "20") int limit,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.sort_no", "asc"));
+
+        if (StringUtils.isNotEmpty(keywords)) {
+            searchParams.put("name", "%" + keywords + "%");
+        }
+
+        if (StringUtils.isNotEmpty(excludeId)) {
+            searchParams.put("excludeId", excludeId);
+        }
+
+        if (StringUtils.isNotEmpty(dataType)) {
+            //1查目录-2查值
+            searchParams.put("dataType", dataType);
+        }
+
+
+        Page<DataDictionary> page = dataDictionaryService.pageSearch(searchParams,0, limit,sortList);
+        List<DataDictionary> dataDictionaryList = page.getResult();
+        msgResult.setResult(true);
+        msgResult.setData(dataDictionaryList);
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value = "查询字典")
+    @RequestMapping(value = "queryChildren", method = RequestMethod.POST)
+    public MessageResult<List> queryChildren(
+            @RequestParam(value = "parentId", defaultValue = "") String parentId,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        List<Map<String, Object>> dataDictionaryList = dataDictionaryService.queryChildren(parentId);
+        msgResult.setResult(true);
+        msgResult.setData(dataDictionaryList);
+        return msgResult;
+    }
+}

+ 285 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/MenuController.java

@@ -0,0 +1,285 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.jpsoft.picc.modules.sys.service.MenuService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/menu")
+@Api(description = "系统菜单")
+public class MenuController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private MenuService menuService;
+
+    @ApiOperation(value = "创建空记录")
+    @GetMapping("create")
+    public MessageResult<Menu> create() {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        Menu menu = new Menu();
+
+        msgResult.setData(menu);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "添加信息")
+    @PostMapping("add")
+    public MessageResult<Menu> add(@RequestBody Menu menu, @RequestAttribute String subject) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            menu.setId(UUID.randomUUID().toString());
+            menu.setDelFlag(false);
+            menu.setCreateBy(subject);
+            menu.setCreateTime(new Date());
+
+            int affectCount = menuService.insert(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Menu> edit(@PathVariable("id") String id) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            Menu menu = menuService.get(id);
+
+            if (menu != null) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "更新用户")
+    @PostMapping("update")
+    public MessageResult<Menu> update(@RequestBody Menu menu, @RequestAttribute String subject) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            menu.setUpdateBy(subject);
+            menu.setUpdateTime(new Date());
+
+            int affectCount = menuService.update(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Menu menu = menuService.get(id);
+            menu.setDelFlag(true);
+            menu.setUpdateBy(subject);
+            menu.setUpdateTime(new Date());
+
+            int affectCount = menuService.update(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value = "批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject) {
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Menu menu = menuService.get(id);
+                menu.setDelFlag(true);
+                menu.setUpdateBy(subject);
+                menu.setUpdateTime(new Date());
+
+                affectCount += menuService.update(menu);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "查询")
+    @RequestMapping(value = "query", method = RequestMethod.POST)
+    public MessageResult<List> query(
+            String keywords,
+            String excludeId,
+            @RequestParam(value = "length", defaultValue = "20") int limit,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.create_time", "asc"));
+
+        if (StringUtils.isNotEmpty(keywords)) {
+            searchParams.put("menuName", "%" + keywords + "%");
+        }
+
+        if (StringUtils.isNotEmpty(excludeId)) {
+            searchParams.put("excludeId", excludeId);
+        }
+
+        List<Menu> menuList = menuService.query(searchParams, limit, sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(menuList);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "列表")
+    @RequestMapping(value = "pageList", method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String menuName,
+            String menuType,
+            String parentId,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject) {
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("sort_no", "asc"));
+
+        if (StringUtils.isNotEmpty(menuName)) {
+            searchParams.put("menuName", "%" + menuName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(menuType)) {
+            searchParams.put("menuType", menuType);
+        }
+
+        if (StringUtils.isNotEmpty(parentId)) {
+            searchParams.put("parentId", parentId);
+        }
+
+        Page<Menu> page = menuService.pageSearch(searchParams, pageIndex, pageSize, sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "获取授权菜单")
+    @GetMapping("tree")
+    public MessageResult<List> tree(@RequestAttribute("subject") String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        List<Menu> list = menuService.findAllocMenu(subject,null);
+
+        findChildrenLoop(list,subject,0,5);
+
+        msgResult.setData(list);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    private void findChildrenLoop(List<Menu> list, String subject,int deep,int max) {
+        if (deep<max) {
+            for (Menu menu : list) {
+                List<Menu> children = menuService.findAllocMenu(subject,menu.getId());
+
+                menu.setChildren(children);
+
+                findChildrenLoop(children,subject,deep+1,max);
+            }
+        }
+    }
+}

+ 280 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/PermissionController.java

@@ -0,0 +1,280 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/permission")
+@Api(description = "系统权限")
+public class PermissionController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private PermissionService permissionService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Permission> create(){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        Permission permission = new Permission();
+
+        msgResult.setData(permission);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="批量导入")
+    @PostMapping("batchImport")
+    public MessageResult<Integer> batchImport(@RequestBody List<Permission> permList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (Permission permission : permList) {
+                if(!permissionService.exist(permission.getPath(),permission.getMethod())){
+                    permission.setId(UUID.randomUUID().toString());
+                    permission.setDelFlag(false);
+                    permission.setCreateBy(subject);
+                    permission.setCreateTime(new Date());
+
+                    affectCount += permissionService.insert(permission);
+                }
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("未导入新记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Permission> add(@RequestBody Permission permission,@RequestAttribute String subject){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            permission.setId(UUID.randomUUID().toString());
+            permission.setDelFlag(false);
+            permission.setCreateBy(subject);
+            permission.setCreateTime(new Date());
+            
+            int affectCount = permissionService.insert(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Permission> edit(@PathVariable("id") String id){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            Permission permission = permissionService.get(id);
+
+            if (permission != null) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Permission> update(@RequestBody Permission permission,@RequestAttribute String subject){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            permission.setUpdateBy(subject);
+            permission.setUpdateTime(new Date());
+            
+            int affectCount = permissionService.update(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Permission permission = permissionService.get(id);
+            permission.setDelFlag(true);
+            permission.setUpdateBy(subject);
+            permission.setUpdateTime(new Date());
+
+            int affectCount = permissionService.update(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取所有权限")
+    @GetMapping(value = "selectAll")
+    public MessageResult<List> selectAll(){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<Permission> perms = permissionService.list();
+
+            msgResult.setResult(true);
+            msgResult.setData(perms);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Permission permission = permissionService.get(id);
+                permission.setDelFlag(true);
+                permission.setUpdateBy(subject);
+                permission.setUpdateTime(new Date());
+
+                affectCount += permissionService.update(permission);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String path,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("path_","asc"));
+
+        if (StringUtils.isNotEmpty(path)) {
+            searchParams.put("path","%" + path + "%");
+        }
+
+        Page<Permission> page = permissionService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 378 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/RoleController.java

@@ -0,0 +1,378 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.dto.RoleRelatedDTO;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.jpsoft.picc.modules.sys.service.RoleMenuService;
+import com.jpsoft.picc.modules.sys.service.RolePermissionService;
+import com.jpsoft.picc.modules.sys.service.RoleService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/role")
+@Api(description = "系统角色")
+public class RoleController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private RoleService roleService;
+
+    @Autowired
+    private RoleMenuService roleMenuService;
+
+    @Autowired
+    private RolePermissionService rolePermissionService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Role> create(){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        Role role = new Role();
+
+        msgResult.setData(role);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Role> add(@RequestBody Role role,@RequestAttribute String subject){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+            try {
+            role.setId(UUID.randomUUID().toString());
+            role.setDelFlag(false);
+            role.setCreateBy(subject);
+            role.setCreateTime(new Date());
+            
+            int affectCount = roleService.insert(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Role> edit(@PathVariable("id") String id){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        try {
+            Role role = roleService.get(id);
+
+            if (role != null) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Role> update(@RequestBody Role role,@RequestAttribute String subject){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        try {
+            role.setUpdateBy(subject);
+            role.setUpdateTime(new Date());
+            
+            int affectCount = roleService.update(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Role role = roleService.get(id);
+            role.setDelFlag(true);
+            role.setUpdateBy(subject);
+            role.setUpdateTime(new Date());
+
+            int affectCount = roleService.update(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Role role = roleService.get(id);
+                role.setDelFlag(true);
+                role.setUpdateBy(subject);
+                role.setUpdateTime(new Date());
+
+                affectCount += roleService.update(role);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取所有角色")
+    @GetMapping(value = "selectAll")
+    public MessageResult<List> selectAll(){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<Role> roles = roleService.list();
+
+            msgResult.setResult(true);
+            msgResult.setData(roles);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String roleName,
+            String roleDesc,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestParam(value="field",defaultValue="create_time") String field,
+            @RequestParam(value="direction",defaultValue="asc") String direction,
+            HttpServletRequest request){
+        String subject = (String)request.getAttribute("subject");
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort(field,direction));
+
+        if (StringUtils.isNotEmpty(roleName)) {
+            searchParams.put("roleName","%" + roleName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(roleDesc)) {
+            searchParams.put("roleDesc","%" + roleDesc + "%");
+        }
+
+        Page<Role> page = roleService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取已分配菜单列表")
+    @GetMapping(value = "queryRelatedMenuList")
+    public MessageResult<List> queryRelatedMenuList(String roleId){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<RoleMenu> list = roleMenuService.findByRoleId(roleId);
+
+            msgResult.setResult(true);
+            msgResult.setData(list);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="保存关联菜单")
+    @PostMapping(value = "saveRelatedMenu")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<Integer> saveRelatedMenu(@RequestBody RoleRelatedDTO dto,String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            roleMenuService.deleteByRoleId(dto.getRoleId());
+
+            int affectCount = 0;
+
+            for (String menuId : dto.getRelatedList()) {
+                RoleMenu rm = new RoleMenu();
+                rm.setId(UUID.randomUUID().toString());
+                rm.setRoleId(dto.getRoleId());
+                rm.setMenuId(menuId);
+                rm.setDelFlag(false);
+                rm.setCreateBy(subject);
+                rm.setCreateTime(new Date());
+
+                affectCount+= roleMenuService.insert(rm);
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(affectCount);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取已分配接口权限列表")
+    @GetMapping(value = "queryRelatedPerms")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<List> queryRelatedPerms(String roleId){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<RolePermission> list = rolePermissionService.findByRoleId(roleId);
+
+            msgResult.setResult(true);
+            msgResult.setData(list);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="保存关联接口权限")
+    @PostMapping(value = "saveRelatedPermission")
+    public MessageResult<Integer> saveRelatedPermission(@RequestBody RoleRelatedDTO dto,String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            rolePermissionService.deleteByRoleId(dto.getRoleId());
+
+            int affectCount = 0;
+
+            for (String permissionId : dto.getRelatedList()) {
+                RolePermission rp = new RolePermission();
+                rp.setId(UUID.randomUUID().toString());
+                rp.setRoleId(dto.getRoleId());
+                rp.setPermId(permissionId);
+                rp.setDelFlag(false);
+                rp.setCreateBy(subject);
+                rp.setCreateTime(new Date());
+
+                affectCount+= rolePermissionService.insert(rp);
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(affectCount);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+}

+ 284 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/UserController.java

@@ -0,0 +1,284 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.common.utils.DES3;
+import com.jpsoft.picc.modules.common.dto.MessageResult;
+import com.jpsoft.picc.modules.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.jpsoft.picc.modules.sys.service.UserRoleService;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping("/sys/user")
+@Api(description = "系统用户")
+public class UserController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private UserService userService;
+
+    @Autowired
+    private UserRoleService userRoleService;
+
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<User> create(){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        User user = new User();
+
+        msgResult.setData(user);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<User> add(@RequestBody User user, @RequestAttribute  String subject){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            if(StringUtils.isEmpty(user.getUserName())){
+                throw new Exception("用户名不能为空!");
+            }
+
+            if(StringUtils.isEmpty(user.getPassword())){
+                throw new Exception("密码不能为空!");
+            }
+
+            user.setId(UUID.randomUUID().toString());
+            DES3 des3 = new DES3();
+            user.setPassword(des3.encrypt(jwtSecret,user.getPassword()));
+            user.setCreateBy(subject);
+            user.setCreateTime(new Date());
+            user.setDelFlag(false);
+
+            int affectCount = userService.insert(user);
+
+            if (affectCount > 0) {
+                if(user.getRoles()!=null){
+                    for (String roleId : user.getRoles()) {
+                        UserRole ur = new UserRole();
+
+                        ur.setId(UUID.randomUUID().toString());
+                        ur.setUserId(user.getId());
+                        ur.setRoleId(roleId);
+                        ur.setCreateBy(subject);
+                        ur.setCreateTime(new Date());
+                        ur.setDelFlag(false);
+
+                        userRoleService.insert(ur);
+                    }
+                }
+
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<User> edit(@PathVariable("id") String id){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(id);
+
+            if (user != null) {
+                List<Role> roles = userRoleService.findRoleByUserId(user.getId());
+
+                user.setRoles(roles.stream().map((role)->role.getId()).collect(Collectors.toList()));
+
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<User> update(@RequestBody User user,@RequestAttribute String subject){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = userService.update(user);
+
+            user.setUpdateBy(subject);
+            user.setUpdateTime(new Date());
+
+            if(user.getRoles()!=null){
+                affectCount = userRoleService.deleteByUserId(user.getId());
+
+                for (String roleId : user.getRoles()) {
+                    UserRole ur = new UserRole();
+
+                    ur.setId(UUID.randomUUID().toString());
+                    ur.setUserId(user.getId());
+                    ur.setRoleId(roleId);
+                    ur.setCreateBy(subject);
+                    ur.setCreateTime(new Date());
+                    ur.setDelFlag(false);
+
+                    affectCount += userRoleService.insert(ur);
+                }
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="删除用户")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(id);
+            user.setDelFlag(true);
+            user.setUpdateBy(subject);
+            user.setUpdateTime(new Date());
+
+            int affectCount = userService.update(user);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                User user = userService.get(id);
+                user.setDelFlag(true);
+                user.setUpdateBy(subject);
+                user.setUpdateTime(new Date());
+
+                affectCount += userService.update(user);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String userName,String realName,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParms = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","asc"));
+
+        if (StringUtils.isNotEmpty(userName)) {
+            searchParms.put("userName","%" + userName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(realName)) {
+            searchParms.put("realName","%" + realName + "%");
+        }
+
+        Page<User> page = userService.pageSearch(searchParms,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 23 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/DataDictionaryDAO.java

@@ -0,0 +1,23 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Repository
+public interface DataDictionaryDAO {
+	int insert(DataDictionary entity);
+	int update(DataDictionary entity);
+	int exist(String id);
+	DataDictionary get(String id);
+	int delete(String id);
+	String getName(String id);
+	String getValue(String id);
+	List<DataDictionary> list();
+	List<Map<String, Object>> queryChildren(String parentId);
+	List<DataDictionary> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/MenuDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface MenuDAO {
+	int insert(Menu entity);
+	int update(Menu entity);
+	int exist(String id);
+	Menu get(String id);
+	int delete(String id);
+	List<Menu> list();
+	List<Menu> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<Menu> findAllocMenu(@Param("userId") String userId,@Param("parentId") String parentId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/PermissionDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface PermissionDAO {
+	int insert(Permission entity);
+	int update(Permission entity);
+	int exist(@Param("path") String path,@Param("method") String method);
+	Permission get(String id);
+	int delete(String id);
+	List<Permission> list();
+	List<Permission> search(Map<String,Object> searchParams,List<Sort> sortList);
+    int hasPermitted(@Param("userId") String userId,@Param("path") String path,@Param("method") String method);
+}

+ 18 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface RoleDAO {
+	int insert(Role entity);
+	int update(Role entity);
+	int exist(String id);
+	Role get(String id);
+	int delete(String id);
+	List<Role> list();
+	List<Role> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 22 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleMenuDAO.java

@@ -0,0 +1,22 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface RoleMenuDAO {
+	int insert(RoleMenu entity);
+	int update(RoleMenu entity);
+	int exist(String id);
+	RoleMenu get(String id);
+	int delete(String id);
+	List<RoleMenu> list();
+	List<RoleMenu> search(Map<String,Object> searchParams,List<Sort> sortList);
+
+	List<RoleMenu> findByRoleId(String roleId);
+
+	int deleteByRoleId(String roleId);
+}

+ 20 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RolePermissionDAO.java

@@ -0,0 +1,20 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface RolePermissionDAO {
+	int insert(RolePermission entity);
+	int update(RolePermission entity);
+	int exist(String id);
+	RolePermission get(String id);
+	int delete(String id);
+	List<RolePermission> list();
+	List<RolePermission> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<RolePermission> findByRoleId(String roleId);
+	int deleteByRoleId(String roleId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.User;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface UserDAO {
+	int insert(User entity);
+	int update(User entity);
+	int exist(String id);
+	User get(String id);
+	int delete(String id);
+	List<User> list();
+	List<User> search(Map<String,Object> searchParams,List<Sort> sortList);
+	User findByUserName(@Param("userName") String userName);
+}

+ 22 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserRoleDAO.java

@@ -0,0 +1,22 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface UserRoleDAO {
+	int insert(UserRole entity);
+	int update(UserRole entity);
+	int exist(String id);
+	UserRole get(String id);
+	int delete(String id);
+	List<UserRole> list();
+	List<UserRole> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<Role> findRoleByUserId(String userId);
+	int deleteByUserId(String userId);
+}

+ 24 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dto/RoleRelatedDTO.java

@@ -0,0 +1,24 @@
+package com.jpsoft.picc.modules.sys.dto;
+
+import java.util.List;
+
+public class RoleRelatedDTO {
+    private String roleId;
+    private List<String> relatedList;
+
+    public String getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(String roleId) {
+        this.roleId = roleId;
+    }
+
+    public List<String> getRelatedList() {
+        return relatedList;
+    }
+
+    public void setRelatedList(List<String> relatedList) {
+        this.relatedList = relatedList;
+    }
+}

+ 203 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/DataDictionary.java

@@ -0,0 +1,203 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_data_dictionary的实体类
+ */
+public class DataDictionary {
+	private String id;
+	private String name;
+	private String value;
+	private Integer sortNo;
+	private String parentName;
+	private String parentId;
+	private String dataType;
+	private String createBy;
+	private Date createDate;
+	private String updateBy;
+	private Date updateDate;
+	private Boolean activated;
+	private Boolean delFlag;
+	/*private List<DataDictionary> children;*/
+		/**
+	 *获取编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取名称
+	 */
+	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+		/**
+	 *获取数值
+	 */
+	public String getValue(){
+		return value;
+	}
+	
+	/**
+	 *设置数值
+	 */
+	public void setValue(String value){
+		this.value = value;
+	}
+		/**
+	 *获取显示序号
+	 */
+	public Integer getSortNo(){
+		return sortNo;
+	}
+	
+	/**
+	 *设置显示序号
+	 */
+	public void setSortNo(Integer sortNo){
+		this.sortNo = sortNo;
+	}
+		/**
+	 *获取所属目录
+	 */
+	public String getParentId(){
+		return parentId;
+	}
+	
+	/**
+	 *设置所属目录
+	 */
+	public void setParentId(String parentId){
+		this.parentId = parentId;
+	}
+		/**
+	 *获取1-字典目录,2-数据
+	 */
+	public String getDataType(){
+		return dataType;
+	}
+	
+	/**
+	 *设置1-字典目录,2-数据
+	 */
+	public void setDataType(String dataType){
+		this.dataType = dataType;
+	}
+		/**
+	 *获取
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getCreateDate(){
+		return createDate;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateDate(Date createDate){
+		this.createDate = createDate;
+	}
+		/**
+	 *获取
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getUpdateDate(){
+		return updateDate;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateDate(Date updateDate){
+		this.updateDate = updateDate;
+	}
+		/**
+	 *获取
+	 */
+	public Boolean getActivated(){
+		return activated;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setActivated(Boolean activated){
+		this.activated = activated;
+	}
+
+	/**
+	 *获取
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+
+	/**
+	 *设置
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/*public List<DataDictionary> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<DataDictionary> children) {
+		this.children = children;
+	}*/
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+}

+ 199 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Menu.java

@@ -0,0 +1,199 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_menu的实体类
+ */
+public class Menu {
+	private String id;
+	private String menuName;
+	private String parentId;
+	private Integer sortNo;
+	private String menuUrl;
+	private String menuType;
+	private Date createTime;
+	private String createBy;
+	private Date updateTime;
+	private String updateBy;
+	private Boolean delFlag;
+	private String parentName;
+	private List<Menu> children;
+	private String icon;
+
+		/**
+	 *获取菜单编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置菜单编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取菜单名称
+	 */
+	public String getMenuName(){
+		return menuName;
+	}
+	
+	/**
+	 *设置菜单名称
+	 */
+	public void setMenuName(String menuName){
+		this.menuName = menuName;
+	}
+		/**
+	 *获取上级菜单
+	 */
+	public String getParentId(){
+		return parentId;
+	}
+	
+	/**
+	 *设置上级菜单
+	 */
+	public void setParentId(String parentId){
+		this.parentId = parentId;
+	}
+		/**
+	 *获取排序号
+	 */
+	public Integer getSortNo(){
+		return sortNo;
+	}
+	
+	/**
+	 *设置排序号
+	 */
+	public void setSortNo(Integer sortNo){
+		this.sortNo = sortNo;
+	}
+		/**
+	 *获取菜单地址
+	 */
+	public String getMenuUrl(){
+		return menuUrl;
+	}
+	
+	/**
+	 *设置菜单地址
+	 */
+	public void setMenuUrl(String menuUrl){
+		this.menuUrl = menuUrl;
+	}
+		/**
+	 *获取菜单类型(1-后端、2-前端)
+	 */
+	public String getMenuType(){
+		return menuType;
+	}
+	
+	/**
+	 *设置菜单类型(1-后端、2-前端)
+	 */
+	public void setMenuType(String menuType){
+		this.menuType = menuType;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		/**
+	 *获取
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		/**
+	 *获取
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+
+	public List<Menu> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Menu> children) {
+		this.children = children;
+	}
+
+	public String getIcon() {
+		return icon;
+	}
+
+	public void setIcon(String icon) {
+		this.icon = icon;
+	}
+}

+ 142 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Permission.java

@@ -0,0 +1,142 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+ 描述:sys_permission的实体类
+ */
+public class Permission {
+	private String id;
+	private String path;
+	private String method;
+	private String summary;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+
+	/**
+	 *获取主键
+	 */
+	public String getId(){
+		return id;
+	}
+
+	/**
+	 *设置主键
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取访问路径
+	 */
+	public String getPath(){
+		return path;
+	}
+
+	/**
+	 *设置访问路径
+	 */
+	public void setPath(String path){
+		this.path = path;
+	}
+	/**
+	 *获取访问方式
+	 */
+	public String getMethod(){
+		return method;
+	}
+
+	/**
+	 *设置访问方式
+	 */
+	public void setMethod(String method){
+		this.method = method;
+	}
+	/**
+	 *获取简介
+	 */
+	public String getSummary(){
+		return summary;
+	}
+
+	/**
+	 *设置简介
+	 */
+	public void setSummary(String summary){
+		this.summary = summary;
+	}
+	/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+	/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Role.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role的实体类
+ */
+public class Role {
+	private String id;
+	private String name;
+	private String description;
+	private Date createTime;
+	private Date updateTime;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	
+		/**
+	 *获取角色编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置角色编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取角色名称
+	 */
+	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置角色名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+		/**
+	 *获取角色描述
+	 */
+	public String getDescription(){
+		return description;
+	}
+	
+	/**
+	 *设置角色描述
+	 */
+	public void setDescription(String description){
+		this.description = description;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取删除标示
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置删除标示
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RoleMenu.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role_menu的实体类
+ */
+public class RoleMenu {
+	private String id;
+	private String roleId;
+	private String menuId;
+	private Boolean delFlag;
+	private String createBy;
+	private Date createTime;
+	private String updateBy;
+	private Date updateTime;
+	
+		/**
+	 *获取
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取
+	 */
+	public String getMenuId(){
+		return menuId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setMenuId(String menuId){
+		this.menuId = menuId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RolePermission.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role_permission的实体类
+ */
+public class RolePermission {
+	private String id;
+	private String permId;
+	private String roleId;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+	
+		/**
+	 *获取
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取
+	 */
+	public String getPermId(){
+		return permId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setPermId(String permId){
+		this.permId = permId;
+	}
+		/**
+	 *获取
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 160 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/User.java

@@ -0,0 +1,160 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_user的实体类
+ */
+@ApiModel(value = "系统用户")
+public class User {
+	private String id;
+	private String userName;
+	private String password;
+	private String realName;
+	private Date createTime;
+	private Date updateTime;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private List<String> roles;
+	/**
+	 *获取用户编号
+	 */
+	@ApiModelProperty(value="用户编号")
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置用户编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取用户名
+	 */
+	@ApiModelProperty(value="用户名")
+	public String getUserName(){
+		return userName;
+	}
+	
+	/**
+	 *设置用户名
+	 */
+	public void setUserName(String userName){
+		this.userName = userName;
+	}
+		/**
+	 *获取密码
+	 */
+	@ApiModelProperty(value="密码")
+	public String getPassword(){
+		return password;
+	}
+	
+	/**
+	 *设置密码
+	 */
+	public void setPassword(String password){
+		this.password = password;
+	}
+		/**
+	 *获取真实名称
+	 */
+	@ApiModelProperty(value="真实名称")
+	public String getRealName(){
+		return realName;
+	}
+	
+	/**
+	 *设置真实名称
+	 */
+	public void setRealName(String realName){
+		this.realName = realName;
+	}
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取删除标示
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置删除标示
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+
+	public List<String> getRoles() {
+		return roles;
+	}
+
+	public void setRoles(List<String> roles) {
+		this.roles = roles;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/UserRole.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_user_role的实体类
+ */
+public class UserRole {
+	private String id;
+	private String roleId;
+	private String userId;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+	
+		/**
+	 *获取用户角色关联编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置用户角色关联编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取角色编号
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置角色编号
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取用户编号
+	 */
+	public String getUserId(){
+		return userId;
+	}
+	
+	/**
+	 *设置用户编号
+	 */
+	public void setUserId(String userId){
+		this.userId = userId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/DataDictionaryService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+
+import java.util.List;
+import java.util.Map;
+
+public interface DataDictionaryService {
+	DataDictionary get(String id);
+	boolean exist(String id);
+	int insert(DataDictionary model);
+	int update(DataDictionary model);
+	int delete(String id);
+	String getName(String id);
+	String getValue(String id);
+	List<DataDictionary> list();
+	List<Map<String, Object>> queryChildren(String parentId);
+	Page<DataDictionary> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/MenuService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface MenuService {
+	Menu get(String id);
+	boolean exist(String id);
+	int insert(Menu model);
+	int update(Menu model);
+	int delete(String id);
+	List<Menu> list();
+	Page<Menu> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    List<Menu> query(Map<String, Object> searchParams, int limit, List<Sort> sortList);
+
+    List<Menu> findAllocMenu(String subject, String parentId);
+}

+ 19 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/PermissionService.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface PermissionService {
+	Permission get(String id);
+	boolean exist(String path, String method);
+	int insert(Permission model);
+	int update(Permission model);
+	int delete(String id);
+	List<Permission> list();
+	Page<Permission> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    boolean hasPermitted(String userId, String path, String method);
+}

+ 19 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleMenuService.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface RoleMenuService {
+	RoleMenu get(String id);
+	boolean exist(String id);
+	int insert(RoleMenu model);
+	int update(RoleMenu model);
+	int delete(String id);
+	List<RoleMenu> list();
+	Page<RoleMenu> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+    List<RoleMenu> findByRoleId(String roleId);
+	int deleteByRoleId(String roleId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RolePermissionService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface RolePermissionService {
+	RolePermission get(String id);
+	boolean exist(String id);
+	int insert(RolePermission model);
+	int update(RolePermission model);
+	int delete(String id);
+	List<RolePermission> list();
+	Page<RolePermission> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    List<RolePermission> findByRoleId(String roleId);
+
+	int deleteByRoleId(String roleId);
+}

+ 17 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface RoleService {
+	Role get(String id);
+	boolean exist(String id);
+	int insert(Role model);
+	int update(Role model);
+	int delete(String id);
+	List<Role> list();
+	Page<Role> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserRoleService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface UserRoleService {
+	UserRole get(String id);
+	boolean exist(String id);
+	int insert(UserRole model);
+	int update(UserRole model);
+	int delete(String id);
+	List<UserRole> list();
+	Page<UserRole> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+    List<Role> findRoleByUserId(String userId);
+	int deleteByUserId(String userId);
+}

+ 18 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserService.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+public interface UserService {
+	User get(String id);
+	boolean exist(String id);
+	int insert(User model);
+	int update(User model);
+	int delete(String id);
+	List<User> list();
+	Page<User> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+	User findByUserName(String userName);
+}

+ 84 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/DataDictionaryServiceImpl.java

@@ -0,0 +1,84 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.dao.DataDictionaryDAO;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import com.jpsoft.picc.modules.sys.service.DataDictionaryService;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Transactional
+@Component(value="dataDictionaryService")
+public class DataDictionaryServiceImpl implements DataDictionaryService {
+	@Resource(name="dataDictionaryDAO")
+	private DataDictionaryDAO dataDictionaryDAO;
+
+	@Override
+	public DataDictionary get(String id) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.get(id);
+	}
+
+	@Override
+	public int insert(DataDictionary model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return dataDictionaryDAO.insert(model);
+	}
+
+	@Override
+	public int update(DataDictionary model) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = dataDictionaryDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+
+	@Override
+	public String getName(String id){
+		return dataDictionaryDAO.getName(id);
+	}
+	@Override
+	public String getValue(String id){
+		return dataDictionaryDAO.getValue(id);
+	}
+	
+	@Override
+	public List<DataDictionary> list() {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.list();
+	}
+
+	@Override
+	public List<Map<String, Object>> queryChildren(String parentId){
+		return dataDictionaryDAO.queryChildren(parentId);
+	}
+		
+	@Override
+	public Page<DataDictionary> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<DataDictionary> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            dataDictionaryDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 83 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/MenuServiceImpl.java

@@ -0,0 +1,83 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.MenuDAO;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.jpsoft.picc.modules.sys.service.MenuService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="menuService")
+public class MenuServiceImpl implements MenuService {
+	@Resource(name="menuDAO")
+	private MenuDAO menuDAO;
+
+	@Override
+	public Menu get(String id) {
+		// TODO Auto-generated method stub
+		return menuDAO.get(id);
+	}
+
+	@Override
+	public int insert(Menu model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return menuDAO.insert(model);
+	}
+
+	@Override
+	public int update(Menu model) {
+		// TODO Auto-generated method stub
+		return menuDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return menuDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = menuDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Menu> list() {
+		// TODO Auto-generated method stub
+		return menuDAO.list();
+	}
+		
+	@Override
+	public Page<Menu> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Menu> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            menuDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<Menu> query(Map<String, Object> searchParams, int limit, List<Sort> sortList) {
+		Page<Menu> page = PageHelper.startPage(1,limit,false).doSelectPage(()->{
+			menuDAO.search(searchParams,sortList);
+		});
+
+		return page.getResult();
+	}
+
+	@Override
+	public List<Menu> findAllocMenu(String subject, String parentId) {
+		return menuDAO.findAllocMenu(subject, parentId);
+	}
+}

+ 74 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/PermissionServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.PermissionDAO;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="permissionService")
+public class PermissionServiceImpl implements PermissionService {
+	@Resource(name="permissionDAO")
+	private PermissionDAO permissionDAO;
+
+	@Override
+	public Permission get(String id) {
+		// TODO Auto-generated method stub
+		return permissionDAO.get(id);
+	}
+
+	@Override
+	public int insert(Permission model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return permissionDAO.insert(model);
+	}
+
+	@Override
+	public int update(Permission model) {
+		// TODO Auto-generated method stub
+		return permissionDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return permissionDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String path, String method) {
+		// TODO Auto-generated method stub
+		int count = permissionDAO.exist(path,method);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Permission> list() {
+		// TODO Auto-generated method stub
+		return permissionDAO.list();
+	}
+		
+	@Override
+	public Page<Permission> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Permission> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            permissionDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public boolean hasPermitted(String userId, String path, String method) {
+		return permissionDAO.hasPermitted(userId,path,method)>0 ? true : false;
+	}
+}

+ 79 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleMenuServiceImpl.java

@@ -0,0 +1,79 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RoleMenuDAO;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.jpsoft.picc.modules.sys.service.RoleMenuService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="roleMenuService")
+public class RoleMenuServiceImpl implements RoleMenuService {
+	@Resource(name="roleMenuDAO")
+	private RoleMenuDAO roleMenuDAO;
+
+	@Override
+	public RoleMenu get(String id) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.get(id);
+	}
+
+	@Override
+	public int insert(RoleMenu model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return roleMenuDAO.insert(model);
+	}
+
+	@Override
+	public int update(RoleMenu model) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = roleMenuDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<RoleMenu> list() {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.list();
+	}
+		
+	@Override
+	public Page<RoleMenu> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<RoleMenu> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            roleMenuDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<RoleMenu> findByRoleId(String roleId) {
+		return roleMenuDAO.findByRoleId(roleId);
+	}
+
+	@Override
+	public int deleteByRoleId(String roleId) {
+		return roleMenuDAO.deleteByRoleId(roleId);
+	}
+}

+ 79 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RolePermissionServiceImpl.java

@@ -0,0 +1,79 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RolePermissionDAO;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.jpsoft.picc.modules.sys.service.RolePermissionService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="rolePermissionService")
+public class RolePermissionServiceImpl implements RolePermissionService {
+	@Resource(name="rolePermissionDAO")
+	private RolePermissionDAO rolePermissionDAO;
+
+	@Override
+	public RolePermission get(String id) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.get(id);
+	}
+
+	@Override
+	public int insert(RolePermission model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return rolePermissionDAO.insert(model);
+	}
+
+	@Override
+	public int update(RolePermission model) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = rolePermissionDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<RolePermission> list() {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.list();
+	}
+		
+	@Override
+	public Page<RolePermission> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<RolePermission> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            rolePermissionDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<RolePermission> findByRoleId(String roleId) {
+		return rolePermissionDAO.findByRoleId(roleId);
+	}
+
+	@Override
+	public int deleteByRoleId(String roleId) {
+		return rolePermissionDAO.deleteByRoleId(roleId);
+	}
+}

+ 69 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleServiceImpl.java

@@ -0,0 +1,69 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RoleDAO;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.service.RoleService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="roleService")
+public class RoleServiceImpl implements RoleService {
+	@Resource(name="roleDAO")
+	private RoleDAO roleDAO;
+
+	@Override
+	public Role get(String id) {
+		// TODO Auto-generated method stub
+		return roleDAO.get(id);
+	}
+
+	@Override
+	public int insert(Role model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return roleDAO.insert(model);
+	}
+
+	@Override
+	public int update(Role model) {
+		// TODO Auto-generated method stub
+		return roleDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return roleDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = roleDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Role> list() {
+		// TODO Auto-generated method stub
+		return roleDAO.list();
+	}
+		
+	@Override
+	public Page<Role> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Role> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            roleDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 81 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserRoleServiceImpl.java

@@ -0,0 +1,81 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.UserRoleDAO;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.jpsoft.picc.modules.sys.service.UserRoleService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="userRoleService")
+public class UserRoleServiceImpl implements UserRoleService {
+	@Resource(name="userRoleDAO")
+	private UserRoleDAO userRoleDAO;
+
+	@Override
+	public UserRole get(String id) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.get(id);
+	}
+
+	@Override
+	public int insert(UserRole model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return userRoleDAO.insert(model);
+	}
+
+	@Override
+	public int update(UserRole model) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = userRoleDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<UserRole> list() {
+		// TODO Auto-generated method stub
+		return userRoleDAO.list();
+	}
+		
+	@Override
+	public Page<UserRole> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<UserRole> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            userRoleDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<Role> findRoleByUserId(String userId) {
+		return userRoleDAO.findRoleByUserId(userId);
+	}
+
+	@Override
+	public int deleteByUserId(String userId) {
+		return userRoleDAO.deleteByUserId(userId);
+	}
+}

+ 74 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.UserDAO;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="userService")
+public class UserServiceImpl implements UserService {
+	@Resource(name="userDAO")
+	private UserDAO userDAO;
+
+	@Override
+	public User get(String id) {
+		// TODO Auto-generated method stub
+		return userDAO.get(id);
+	}
+
+	@Override
+	public int insert(User model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return userDAO.insert(model);
+	}
+
+	@Override
+	public int update(User model) {
+		// TODO Auto-generated method stub
+		return userDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return userDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = userDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<User> list() {
+		// TODO Auto-generated method stub
+		return userDAO.list();
+	}
+		
+	@Override
+	public Page<User> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<User> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            userDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public User findByUserName(String userName) {
+		return userDAO.findByUserName(userName);
+	}
+}

+ 13 - 0
picc-admin-server/src/main/resources/application-dev.yml

@@ -0,0 +1,13 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://127.0.0.1:3306/picc?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: root
+    password: root
+  devtools:
+    add-properties: false
+    restart:
+      enabled: true
+
+logger:
+  level: WARN
+  dir: D:\\Logs\\picc\\picc-admin-server\\

+ 50 - 0
picc-admin-server/src/main/resources/application-production.yml

@@ -0,0 +1,50 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://10.10.0.2:3306/electricity-payment?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: picc
+    password: picc
+  devtools:
+    restart:
+      enabled: true
+  redis:
+    # Redis数据库索引(默认为0)
+    database: 5
+    # Redis服务器地址
+    host: 127.0.0.1
+    # Redis服务器连接端口
+    port: 6379
+
+logger:
+  level: WARN
+  dir: E:\\picc\\logs
+
+netty:
+  port: 9966    #监听端口
+
+springfox:
+  documentation:
+    swagger:
+      v2:
+        host: www.wzgh.org
+
+wx:
+  pay:
+    appId: wxe598c699aa68cffe
+    appSecret: ea20d2e9a36aace26b4f7654218129af
+    mchId: 1500160622
+    subMchId: 1505070291
+    mchKey: jpsoft11111111111111111111111111
+    notifyUrl: http://www.wzgh.org/picc-server/wxPay/payNotify
+    ip: 122.228.31.242
+
+alipay:
+  serviceUrl: https://openapi.alipaydev.com/gateway.do
+  appId: 2016080600180410
+  publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzMBfmTqqpt4dMcuz8DpyrEtruu/G7+Gvkd0j99QX4mzcRLx4Wg9IicOIiZGSdgzLMKIxBmk0eKiqqbuBjOsrS/XU+SvsTNlT1O/ZY0w30HEWrb/pvmo58HSY76cevWqLqW19+fUax7HG811mF4lq4YkHNAWArqByEjoFYbKHbtqS0ReXFJ9SE5TaqZSVOieiu3bYPkw5HEGmnYZMhWH3Gvt6tK2peLSM8mEMY5qp3zlGew3sq1KtcDkvO2UCuAmEkAnCDZ1zoYYt45cvcmwaHozGKHGOtOe0EAitpZyLZW3dP5/yBFfWk+MdaA1kZe5gNr8ePY5ht+Sd+DizMEINiQIDAQAB
+  privateKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMwF+ZOqqm3h0xy7PwOnKsS2u678bv4a+R3SP31BfibNxEvHhaD0iJw4iJkZJ2DMswojEGaTR4qKqpu4GM6ytL9dT5K+xM2VPU79ljTDfQcRatv+m+ajnwdJjvpx69aoupbX359RrHscbzXWYXiWrhiQc0BYCuoHISOgVhsodu2pLRF5cUn1ITlNqplJU6J6K7dtg+TDkcQaadhkyFYfca+3q0ral4tIzyYQxjmqnfOUZ7DeyrUq1wOS87ZQK4CYSQCcINnXOhhi3jly9ybBoejMYocY6057QQCK2lnItlbd0/n/IEV9aT4x1oDWRl7mA2vx49jmG35J34OLMwQg2JAgMBAAECggEBALpSXSxdPKn4+ew0iJwVNAEh6PkF9ayZXWGJMY/2y31avt81+vdJbSMgcoFtnTAb2FN7ZM2Gsx8RrawjW3LXFmFbZeERXUlZg3YEhXhdBXWDU7XtLFIA7JSqJfn/xHNuH4Wgg8EQkLwkRP11gs/sVvzB63Ilh8Jhcyyu6/LJuYDfeXu/50sgkQn0xXjjJdwiez9iX//wraYYcWsSCCbwM3QZ0MRc3TCP04QfZsF+fnPM83/g2yzun8fmvB5zDtYhlHwau52CiZpTHOxCCkZx0tubVyPG9jmLJ8eg+/hIfOKzHi2HiNsOQlOgLj8inUkM2qW3JlU7VcHduB7MWjkDIAECgYEA6HLVEDDT61xQNIUbnBWQ0FpHBQjsG/388Uy/xKfchUkOfzA0kNId+Nrd3hhLtl3i7ta6KNu2vDNS5iEbg7SCVsgqBZ0enLLIrymyJ94pHbUeFTAqgP4pnoWglx3ttMsERCKcqt55NJY3gfLtVjBTgGgY1Kfxh9SYFC6CQ4v4V4kCgYEA4X8kv8vVg4ivoXk/gEsKXPYdXG6O3sClq7pf/kaecV0caV89rARXkDP324nLUMxvGKY0sNa373VhAFav4Hv3kGqrJ0NfEd/XiXXT3Zq3njN5V5xqjZZRsySimyFoBetYMTjN2dtPxTC/65OvQPC8BdHaSZDMQQQSFznKG9y4hgECgYEAieTFXIt6zB7BPcbQ8DEi7VcA1o3Kc3ii+wqKoMDr4u3J+c3BAUCEo0JDaCOFlrPvkbw0R1S//Ll9riNpzSHiSFUKCLaCmHa+8pqLo3b5cTQmmm8uZ8NfMTkYYU1R3HSrHThjNEIyKO4ME7zm6sBUaNJYGJ9gezG03hQRFr0MH/ECgYAKAXZD/Gtw9rO0WojyzGGdVl5fJ5i3UZ0ITbDMu510Mkl8c3ltFJQ+FdA9sZOP9kJHubhE0IJA4dh4B2CueVG22sTVbSvewyvxMYVBJAhZwLb1qD8iITVm2Y1NjOHswVCcfoTD0fNsMImTjm4MV6JAL9ubwA0QJXoYBbxuGBEoAQKBgDj0LpamjOv/gRDo96C8AKqACqWoHtVWvYaOrgsFVJWRsmkcrQu2nMHNyFlyJ1DcXbVkulILrUDth8+2jmbxrkmW+9Y8aX5vaKEmrNOOWiSgau3VxeJU+VedDYJl1IVpfs4k4ymMkkAGa1ZlMYHgeP20krHMzAn/NNeVvHUEXcR4
+  zfbPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlU5CIAwwMmDnDPUHQaxiqZh2y6VE11DFTYVZygLEUbZuSCATO2fGkY8hv3fhLj8Wj+QT4kRfJrK+/v1QKcZ7a5UaoaASOPOGEf8X9p+lfuA863luUPiD+k4W6QMjOXoPdY4G4JC9lFe5FT05NqVYHXGIIqXTWSIqLyWDlv7elj8D1HS06H+ArzAjbSyR47IaKJCMnpqLGHJ6ZQGM+6DEcOpdZAULjhguZ891eTtawVndDOaYToCDK4MpW9mEifpKRB8JZptqr2zQhFBm7iADyMsIM1xwko2N6mKJYyYZJ9QzhTindSQBGw0Pbt1480iqeoQOHo+z0HPmikIsuiu65QIDAQAB
+  inputCharset: UTF-8
+  mchId: 2088102170202580
+  # appAuthToken: 201906BBbc7d6558596f4bbc9f056c01b8aebX48
+  signType: RSA2
+  notifyUrl: http://www.wzgh.org/picc-server/aliPay/payNotify

+ 18 - 0
picc-admin-server/src/main/resources/application-test.yml

@@ -0,0 +1,18 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://10.100.145.22:3307/picc?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: root
+    password: jpsoft
+  devtools:
+    restart:
+      enabled: true
+
+logger:
+  level: WARN
+  dir: C:\\picc\\logs\\picc-admin-server\\
+
+springfox:
+  documentation:
+    swagger:
+      v2:
+        host: gyxm.jing-zhou.gov.cn

+ 99 - 0
picc-admin-server/src/main/resources/application.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8081
+  servlet:
+    context-path: /picc-admin-server
+
+spring:
+  http:
+    multipart:
+      max-request-size: 20MB
+      max-file-size: 20MB
+  datasource:
+    driver-class-name: net.sf.log4jdbc.DriverSpy
+    type: com.alibaba.druid.pool.DruidDataSource
+    druid:
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initial-size: 5
+      min-idle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters: stat,wall
+      # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+      connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      # 配置DruidStatFilter
+      web-stat-filter:
+        enabled: true
+        url-pattern: "/*"
+        exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
+      # 配置DruidStatViewServlet
+      stat-view-servlet:
+        url-pattern: "/druid/*"
+        # IP白名单(没有配置或者为空,则允许所有访问)
+        allow:
+        # IP黑名单 (存在共同时,deny优先于allow)
+        deny:
+        #  禁用HTML页面上的“Reset All”功能
+        reset-enable: false
+        # 登录名
+        login-username: admin
+        # 登录密码
+        login-password: jpsoft
+  devtools:
+    restart:
+      enabled: true
+  profiles:
+    active: @active.profile@
+  redis:
+    # Redis数据库索引(默认为0)
+    database: 1
+    # Redis服务器地址
+    host: 192.168.33.21
+    # Redis服务器连接端口
+    port: 6379
+    # Redis服务器连接密码(默认为空)
+    password:
+    # 连接池最大连接数(使用负值表示没有限制)
+    pool:
+      max-active: 8
+      # 连接池最大阻塞等待时间(使用负值表示没有限制)
+      max-wait: -1
+      # 连接池中的最大空闲连接
+      max-idle: 8
+      # 连接池中的最小空闲连接
+      min-idle: 0
+      # 连接超时时间(毫秒)
+      timeout: 0
+
+jwt:
+  secret: WJgLLiAktNj/vCNEoz6mfAmE0btwluCTk/TnJiZOIkQ=
+  header: Authorization
+
+mybatis:
+  typeAliasesPackage: com.jpsoft.picc.**.entity
+  mapperLocations: classpath*:mapper/**/*.xml
+  configuration:
+    default-statement-timeout: 60
+
+pagehelper:
+  helperDialect: mysql
+  reasonable: true
+  supportMethodsArguments: true
+  params: count=countSql
+
+
+
+

+ 49 - 0
picc-admin-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/base.xml"/>
+    <!--
+    官方文档指明,需要使用<springProperty>,才可使用application.properties(或application.yml)中的值
+    -->
+    <springProperty scope="context" name="loggerLevel" source="logger.level"/>
+    <springProperty scope="context" name="loggerPath" source="logger.dir"/>
+    <property name="pattern" value="%date %level [%thread] %logger{36} [%file : %line] %msg%n"></property>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${loggerPath}/logfile.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${loggerPath}/logfile.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <MaxHistory>30</MaxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <!--
+    直接用maven的变量是@...@,用spring的变量是${...}
+    -->
+    <springProfile name="dev">
+        <!--root的level不能用变量-->
+        <logger name="jdbc" additivity="false" level="WARN">
+            <appender-ref ref="STDOUT" />
+        </logger>
+        <logger name="jdbc.sqltiming" additivity="false" level="ON">
+            <appender-ref ref="STDOUT" />
+        </logger>
+    </springProfile>
+    <springProfile name="test">
+        <root level="WARN">
+            <appender-ref ref="STDOUT" />
+            <appender-ref ref="FILE" />
+        </root>
+    </springProfile>
+    <springProfile name="production">
+        <root level="WARN">
+            <appender-ref ref="STDOUT" />
+            <appender-ref ref="FILE" />
+        </root>
+    </springProfile>
+</configuration>

+ 150 - 0
picc-admin-server/src/main/resources/mapper/sys/DataDictionary.xml

@@ -0,0 +1,150 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.DataDictionaryDAO">
+	<resultMap id="DataDictionaryMap" type="com.jpsoft.picc.modules.sys.entity.DataDictionary">
+		<id property="id" column="id_" />
+			<result property="name" column="name_" />
+			<result property="value" column="value_" />
+			<result property="sortNo" column="sort_no" />
+			<result property="parentId" column="parent_id" />
+			<result property="parentName" column="parent_name"/>
+			<result property="dataType" column="data_type" />
+			<result property="createBy" column="create_by" />
+			<result property="createDate" column="create_date" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateDate" column="update_date" />
+			<result property="activated" column="activated_" />
+			<result property="delFlag" column="del_flag"/>
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.DataDictionary">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_data_dictionary
+	    (id_,name_,value_,sort_no,parent_id,data_type,create_by,create_date,update_by,update_date,activated_,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{name,jdbcType=VARCHAR}
+,#{value,jdbcType=VARCHAR}
+,#{sortNo,jdbcType= NUMERIC }
+,#{parentId,jdbcType=VARCHAR}
+,#{dataType,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createDate,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateDate,jdbcType= TIMESTAMP }
+,#{activated,jdbcType= NUMERIC }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_data_dictionary where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.DataDictionary">
+		update sys_data_dictionary
+		<set>
+				<if test="userName!=null">
+		name_=#{name,jdbcType=VARCHAR},
+		</if>
+				<if test="value!=null">
+		value_=#{value,jdbcType=VARCHAR},
+		</if>
+				<if test="sortNo!=null">
+		sort_no=#{sortNo,jdbcType= NUMERIC },
+		</if>
+				<if test="parentId!=null">
+		parent_id=#{parentId,jdbcType=VARCHAR},
+		</if>
+			<if test="dataType!=null">
+				data_type=#{dataType,jdbcType= NUMERIC },
+			</if>
+			<if test="createBy!=null">
+				create_by=#{createBy,jdbcType=VARCHAR},
+			</if>
+			<if test="createDate!=null">
+				create_date=#{createDate,jdbcType= TIMESTAMP },
+			</if>
+			<if test="updateBy!=null">
+				update_by=#{updateBy,jdbcType=VARCHAR},
+			</if>
+			<if test="updateDate!=null">
+				update_date=#{updateDate,jdbcType= TIMESTAMP },
+			</if>
+			<if test="activated!=null">
+				activated_=#{activated,jdbcType= NUMERIC },
+			</if>
+			<if test="delFlag!=null">
+				del_flag=#{delFlag,jdbcType= NUMERIC },
+			</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="DataDictionaryMap">
+		select a.*,b.name_ as parent_name
+		from sys_data_dictionary a left join sys_data_dictionary b on a.parent_id = b.id_
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_data_dictionary where id_=#{0} and del_flag = 0
+	</select>
+	<select id="list" resultMap="DataDictionaryMap">
+		select * from sys_data_dictionary where del_flag = 0
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="DataDictionaryMap">
+		<![CDATA[
+			SELECT
+				a.*,b.name_ AS parent_name
+			FROM
+				sys_data_dictionary a
+			LEFT JOIN sys_data_dictionary b ON a.parent_id = b.id_
+		]]>
+		<where>
+				a.del_flag = 0
+			<if test="searchParams.id != null">
+				and a.ID_ like #{searchParams.id}
+			</if>
+			<if test="searchParams.userName != null">
+				and a.name_ like #{searchParams.userName}
+			</if>
+			<if test="searchParams.excludeId != null">
+				<![CDATA[
+				and a.ID_ <> #{searchParams.excludeId}
+				]]>
+			</if>
+			<if test="searchParams.dataType != null">
+				and a.data_type = #{searchParams.dataType}
+			</if>
+
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+
+	<select id="queryChildren" resultType="java.util.HashMap" parameterType="string" >
+		SELECT
+		a.id_ as id,a.name_ as userName,a.value_ as value
+		FROM
+		sys_data_dictionary a where a.del_flag = 0
+		and data_type = 2
+		and a.parent_id = #{0}
+	</select>
+
+	<select id="getName" parameterType="string" resultType="string">
+		select a.name_ as userName
+		from sys_data_dictionary a
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+	<select id="getValue" parameterType="string" resultType="string">
+		select a.value_ as value
+		from sys_data_dictionary a
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+</mapper>

+ 139 - 0
picc-admin-server/src/main/resources/mapper/sys/Menu.xml

@@ -0,0 +1,139 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.MenuDAO">
+    <resultMap id="MenuMap" type="com.jpsoft.picc.modules.sys.entity.Menu">
+        <id property="id" column="id_"/>
+        <result property="menuName" column="menu_name"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="parentName" column="parent_name"/>
+        <result property="sortNo" column="sort_no"/>
+        <result property="menuUrl" column="menu_url"/>
+        <result property="icon" column="icon_"/>
+        <result property="menuType" column="menu_type"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.Menu">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_menu
+	    (id_,menu_name,parent_id,sort_no,menu_url,menu_type,create_time,create_by,update_time,update_by,del_flag,icon_)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{menuName,jdbcType=VARCHAR}
+            ,#{parentId,jdbcType=VARCHAR}
+            ,#{sortNo,jdbcType= NUMERIC }
+            ,#{menuUrl,jdbcType=VARCHAR}
+            ,#{menuType,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{icon,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_menu where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.Menu">
+        update sys_menu
+        <set>
+            <if test="menuName!=null">
+                menu_name=#{menuName,jdbcType=VARCHAR},
+            </if>
+            <if test="parentId!=null">
+                parent_id=#{parentId,jdbcType=VARCHAR},
+            </if>
+            <if test="sortNo!=null">
+                sort_no=#{sortNo,jdbcType= NUMERIC },
+            </if>
+            <if test="menuUrl!=null">
+                menu_url=#{menuUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="menuType!=null">
+                menu_type=#{menuType,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="icon!=null">
+                icon_=#{icon,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="MenuMap">
+        select a.*,b.menu_name as parent_name
+        from sys_menu a left join sys_menu b on a.parent_id = b.id_
+        where a.id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_menu where id_=#{0}
+    </select>
+    <select id="list" resultMap="MenuMap">
+        select * from sys_menu
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="MenuMap">
+        <![CDATA[
+			select a.*,b.menu_name as parent_name
+			from sys_menu a left join sys_menu b on a.parent_id = b.id_
+		]]>
+        where a.del_flag=0
+        <if test="searchParams.menuName != null">
+            and a.menu_name like #{searchParams.menuName}
+        </if>
+        <if test="searchParams.menuType != null">
+            and a.menu_type = #{searchParams.menuType}
+        </if>
+        <if test="searchParams.parentId != null">
+            and a.parent_id = #{searchParams.parentId}
+        </if>
+        <if test="searchParams.excludeId != null">
+            <![CDATA[
+                and a.id_ <> #{searchParams.excludeId}
+            ]]>
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="findAllocMenu"  parameterType="string" resultMap="MenuMap">
+        select * from sys_menu m,sys_role_menu rm,sys_user_role ur
+        where ur.user_id=#{userId}
+        and ur.role_id = rm.role_id
+        and rm.menu_id = m.id_
+        and m.menu_type = 2
+        and m.del_flag=0
+        <if test="parentId==null">
+            and m.parent_id is null
+        </if>
+        <if test="parentId!=null">
+            and m.parent_id = #{parentId}
+        </if>
+        order by m.sort_no asc
+    </select>
+</mapper>

+ 108 - 0
picc-admin-server/src/main/resources/mapper/sys/Permission.xml

@@ -0,0 +1,108 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.PermissionDAO">
+    <resultMap id="PermissionMap" type="com.jpsoft.picc.modules.sys.entity.Permission">
+        <id property="id" column="id_"/>
+        <result property="path" column="path_"/>
+        <result property="method" column="method_"/>
+        <result property="summary" column="summary_"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.Permission">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_permission
+	    (id_,path_,method_,summary_,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{path,jdbcType=VARCHAR}
+            ,#{method,jdbcType=VARCHAR}
+            ,#{summary,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_permission where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.Permission">
+        update sys_permission
+        <set>
+            <if test="path!=null">
+                path_=#{path,jdbcType=VARCHAR},
+            </if>
+            <if test="method!=null">
+                method_=#{method,jdbcType=VARCHAR},
+            </if>
+            <if test="summary!=null">
+                summary_=#{summary,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="PermissionMap">
+        select
+        id_,path_,method_,summary_,del_flag,create_by,update_by,create_time,update_time from sys_permission where
+        id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_permission where path_=#{path} and method_=#{method} and del_flag=0
+    </select>
+    <select id="list" resultMap="PermissionMap">
+        select * from sys_permission where del_flag=0
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="PermissionMap">
+        <![CDATA[
+			select * from sys_permission
+		]]>
+        where del_flag=0
+        <if test="searchParams.path != null">
+            and path_ like #{searchParams.path}
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="hasPermitted" parameterType="string" resultType="int">
+        <![CDATA[
+            select count(*) from
+            sys_user u,sys_user_role ur,sys_role_permission rp,sys_permission p
+            where u.id_=#{userId}
+            and u.id_=ur.user_id
+            and ur.role_id = rp.role_id
+            and rp.perm_id = p.id_
+            and p.path_ = #{path}
+            and p.method_ = #{method}
+        ]]>
+    </select>
+</mapper>

+ 93 - 0
picc-admin-server/src/main/resources/mapper/sys/Role.xml

@@ -0,0 +1,93 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleDAO">
+    <resultMap id="RoleMap" type="com.jpsoft.picc.modules.sys.entity.Role">
+        <id property="id" column="id_"/>
+        <result property="name" column="name_"/>
+        <result property="description" column="description_"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.Role">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_role
+	    (id_,name_,description_,create_time,update_time,del_flag,create_by,update_by)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{name,jdbcType=VARCHAR}
+            ,#{description,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_role where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.Role">
+        update sys_role
+        <set>
+            <if test="name!=null">
+                name_=#{name,jdbcType=VARCHAR},
+            </if>
+            <if test="description!=null">
+                description_=#{description,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="RoleMap">
+        select
+        id_,name_,description_,create_time,update_time,del_flag,create_by,update_by from sys_role where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_role where id_=#{0}
+    </select>
+    <select id="list" resultMap="RoleMap">
+        select * from sys_role  where del_flag=0 order by create_time asc
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="RoleMap">
+        <![CDATA[
+			select * from sys_role
+		]]>
+            where del_flag=0
+            <if test="searchParams.roleName != null">
+                and name_ like #{searchParams.roleName}
+            </if>
+            <if test="searchParams.roleDesc != null">
+                and description_ like #{searchParams.roleDesc}
+            </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 97 - 0
picc-admin-server/src/main/resources/mapper/sys/RoleMenu.xml

@@ -0,0 +1,97 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleMenuDAO">
+	<resultMap id="RoleMenuMap" type="com.jpsoft.picc.modules.sys.entity.RoleMenu">
+		<id property="id" column="id_" />
+			<result property="roleId" column="role_id" />
+			<result property="menuId" column="menu_id" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.RoleMenu">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_role_menu
+	    (id_,role_id,menu_id,del_flag,create_by,create_time,update_by,update_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{roleId,jdbcType=VARCHAR}
+,#{menuId,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_role_menu where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<delete id="deleteByRoleId" parameterType="string">
+		delete from sys_role_menu where role_id=#{0}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.RoleMenu">
+		update sys_role_menu
+		<set>
+				<if test="roleId!=null">
+		role_id=#{roleId,jdbcType=VARCHAR},
+		</if>
+				<if test="menuId!=null">
+		menu_id=#{menuId,jdbcType=VARCHAR},
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="RoleMenuMap">
+		select 
+id_,role_id,menu_id,del_flag,create_by,create_time,update_by,update_time		from sys_role_menu where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_role_menu where id_=#{0}
+	</select>
+	<select id="list" resultMap="RoleMenuMap">
+		select * from sys_role_menu
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="RoleMenuMap">
+		<![CDATA[
+			select * from sys_role_menu
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByRoleId" parameterType="string" resultMap="RoleMenuMap">
+		select * from sys_role_menu where role_id=#{0}
+	</select>
+</mapper>

+ 96 - 0
picc-admin-server/src/main/resources/mapper/sys/RolePermission.xml

@@ -0,0 +1,96 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RolePermissionDAO">
+	<resultMap id="RolePermissionMap" type="com.jpsoft.picc.modules.sys.entity.RolePermission">
+		<id property="id" column="id_" />
+			<result property="permId" column="perm_id" />
+			<result property="roleId" column="role_id" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="updateBy" column="update_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateTime" column="update_time" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.RolePermission">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_role_permission
+	    (id_,perm_id,role_id,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{permId,jdbcType=VARCHAR}
+,#{roleId,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_role_permission where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<delete id="deleteByRoleId" parameterType="string">
+		delete from sys_role_permission where role_id=#{0}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.RolePermission">
+		update sys_role_permission
+		<set>
+				<if test="permId!=null">
+		perm_id=#{permId,jdbcType=VARCHAR},
+		</if>
+				<if test="roleId!=null">
+		role_id=#{roleId,jdbcType=VARCHAR},
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="RolePermissionMap">
+		select * from sys_role_permission where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_role_permission where id_=#{0}
+	</select>
+	<select id="list" resultMap="RolePermissionMap">
+		select * from sys_role_permission
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="RolePermissionMap">
+		<![CDATA[
+			select * from sys_role_permission
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByRoleId" parameterType="string" resultMap="RolePermissionMap">
+		select * from sys_role_permission where role_id=#{0}
+	</select>
+</mapper>

+ 102 - 0
picc-admin-server/src/main/resources/mapper/sys/User.xml

@@ -0,0 +1,102 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.UserDAO">
+    <resultMap id="UserMap" type="com.jpsoft.picc.modules.sys.entity.User">
+        <id property="id" column="id_"/>
+        <result property="userName" column="user_name"/>
+        <result property="password" column="password_"/>
+        <result property="realName" column="real_name"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.User">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_user
+	    (id_,user_name,password_,real_name,create_time,update_time,del_flag,create_by,update_by)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{userName,jdbcType=VARCHAR}
+            ,#{password,jdbcType=VARCHAR}
+            ,#{realName,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_user where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.User">
+        update sys_user
+        <set>
+            <if test="userName!=null">
+                user_name=#{userName,jdbcType=VARCHAR},
+            </if>
+            <if test="password!=null">
+                password_=#{password,jdbcType=VARCHAR},
+            </if>
+            <if test="realName!=null">
+                real_name=#{realName,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="UserMap">
+        select
+        id_,user_name,password_,real_name,create_time,update_time,del_flag,create_by,update_by from sys_user where
+        id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_user where id_=#{0}
+    </select>
+    <select id="list" resultMap="UserMap">
+        select * from sys_user
+    </select>
+    <select id="findByUserName" parameterType="string" resultMap="UserMap">
+        select * from sys_user where user_name=#{userName} and del_flag=0 limit 1
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="UserMap">
+        <![CDATA[
+			select * from sys_user
+			where del_flag=0
+		]]>
+        <if test="searchParams.userName != null">
+            and user_name like #{searchParams.userName}
+        </if>
+        <if test="searchParams.realName != null">
+            and real_name like #{searchParams.realName}
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 100 - 0
picc-admin-server/src/main/resources/mapper/sys/UserRole.xml

@@ -0,0 +1,100 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.UserRoleDAO">
+    <resultMap id="UserRoleMap" type="com.jpsoft.picc.modules.sys.entity.UserRole">
+        <id property="id" column="id_"/>
+        <result property="roleId" column="role_id"/>
+        <result property="userId" column="user_id"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.sys.entity.UserRole">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_user_role
+	    (id_,role_id,user_id,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{roleId,jdbcType=VARCHAR}
+            ,#{userId,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_user_role where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteByUserId" parameterType="string">
+        delete from sys_user_role where user_id=#{0}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.sys.entity.UserRole">
+        update sys_user_role
+        <set>
+            <if test="roleId!=null">
+                role_id=#{roleId,jdbcType=VARCHAR},
+            </if>
+            <if test="userId!=null">
+                user_id=#{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="UserRoleMap">
+        select
+        id_,role_id,user_id,del_flag,create_by,update_by,create_time,update_time from sys_user_role where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_user_role where id_=#{0}
+    </select>
+    <select id="list" resultMap="UserRoleMap">
+        select * from sys_user_role
+    </select>
+    <select id="findRoleByUserId" parameterType="string" resultMap="com.jpsoft.picc.modules.sys.dao.RoleDAO.RoleMap">
+        select r.* from sys_user_role ur,sys_role r
+        where ur.role_id = r.id_
+        and ur.user_id = #{0}
+        order by ur.create_time asc
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="UserRoleMap">
+        <![CDATA[
+			select * from sys_user_role
+		]]>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 38 - 0
picc-admin-server/src/test/java/com/jpsoft/picc/test/CompanyTest.java

@@ -0,0 +1,38 @@
+package com.jpsoft.picc.test;
+
+import com.jpsoft.picc.modules.base.entity.Company;
+import com.jpsoft.picc.modules.base.service.CompanyService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.Date;
+import java.util.UUID;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class CompanyTest {
+    @Autowired
+    private CompanyService companyService;
+
+    @Test
+    public void list(){
+        System.out.println(companyService.list().size());
+    }
+
+    @Test
+    public void insert(){
+        Consumer<String> print = System.out::println;
+
+        Company company = new Company();
+        company.setId(UUID.randomUUID().toString());
+        company.setCreateBy("zq");
+        company.setCreateTime(new Date());
+
+        companyService.insert(company);
+    }
+}

+ 46 - 0
picc-admin-server/src/test/java/com/jpsoft/picc/test/NewApiTest.java

@@ -0,0 +1,46 @@
+package com.jpsoft.picc.test;
+
+import lombok.Data;
+import org.junit.Test;
+
+import java.util.Optional;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+public class NewApiTest {
+    @Data
+    private class Subject{
+        private Integer score;
+    }
+
+    @Data
+    private class Student{
+        private Subject subject;
+    }
+
+    @Test
+    public void testFunction(){
+        Function<Integer,Integer> func1 = i->i+2;
+        Function<Integer,Integer> func2 = i->i*3;
+
+        Consumer c = System.out::println;
+
+        c.accept(func2.andThen(func1).apply(2));
+    }
+
+    @Test
+    public void testOptional(){
+        Student student = new Student();
+        Subject subject = new Subject();
+        subject.setScore(100);
+
+        student.setSubject(subject);
+
+        Integer score = Optional.ofNullable(student)
+                        .map(Student::getSubject)
+                        .map(Subject::getScore)
+                        .orElse(null);
+
+        System.out.println(score);
+    }
+}

+ 23 - 0
picc-admin-server/src/test/java/com/jpsoft/picc/test/PdfTest.java

@@ -0,0 +1,23 @@
+package com.jpsoft.picc.test;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-2-4 13:10
+ */
+
+
+import com.jpsoft.picc.modules.common.utils.ItextPDFUtil;
+import java.util.ArrayList;
+
+/**
+ * 创建的pdf适合于桌面设备查看
+ */
+
+public class PdfTest {
+    public static void main(String[] args) throws Exception {
+
+        ItextPDFUtil.createPdf(new ArrayList());
+
+    }
+
+}

+ 29 - 0
picc-common/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 24 - 0
picc-common/pom.xml

@@ -0,0 +1,24 @@
+<?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">
+    <parent>
+        <artifactId>picc</artifactId>
+        <groupId>com.jpsoft</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>picc-common</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/ApprovalRecordDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.ApprovalRecord;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface ApprovalRecordDAO {
+	int insert(ApprovalRecord entity);
+	int update(ApprovalRecord entity);
+	int exist(String id);
+	ApprovalRecord get(String id);
+	int delete(String id);
+	List<ApprovalRecord> list();
+	List<ApprovalRecord> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 19 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyDAO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.Company;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface CompanyDAO {
+	int insert(Company entity);
+	int update(Company entity);
+	int exist(String id);
+	Company get(String id);
+	int delete(String id);
+	List<Company> list();
+	List<Company> search(Map<String, Object> searchParams, List<Sort> sortList);
+    Company findByCreateBy(String userId);
+}

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyMemberDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.CompanyMember;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface CompanyMemberDAO {
+	int insert(CompanyMember entity);
+	int update(CompanyMember entity);
+	int exist(String id);
+	CompanyMember get(String id);
+	int delete(String id);
+	List<CompanyMember> list();
+	List<CompanyMember> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/CompanyUserDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.CompanyUser;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface CompanyUserDAO {
+	int insert(CompanyUser entity);
+	int update(CompanyUser entity);
+	int exist(String id);
+	CompanyUser get(String id);
+	int delete(String id);
+	List<CompanyUser> list();
+	List<CompanyUser> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceAgentDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.InsuranceAgent;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface InsuranceAgentDAO {
+	int insert(InsuranceAgent entity);
+	int update(InsuranceAgent entity);
+	int exist(String id);
+	InsuranceAgent get(String id);
+	int delete(String id);
+	List<InsuranceAgent> list();
+	List<InsuranceAgent> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceDefinitionDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinition;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface InsuranceDefinitionDAO {
+	int insert(InsuranceDefinition entity);
+	int update(InsuranceDefinition entity);
+	int exist(String id);
+	InsuranceDefinition get(String id);
+	int delete(String id);
+	List<InsuranceDefinition> list();
+	List<InsuranceDefinition> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 19 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceDefinitionLimitDAO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinitionLimit;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface InsuranceDefinitionLimitDAO {
+	int insert(InsuranceDefinitionLimit entity);
+	int update(InsuranceDefinitionLimit entity);
+	int exist(String id);
+	InsuranceDefinitionLimit get(String id);
+	int delete(String id);
+	List<InsuranceDefinitionLimit> list();
+	List<InsuranceDefinitionLimit> findByDefinitionId(String definitionId);
+	List<InsuranceDefinitionLimit> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 20 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/InsuranceJobsDAO.java

@@ -0,0 +1,20 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.InsuranceJobs;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface InsuranceJobsDAO {
+	int insert(InsuranceJobs entity);
+	int update(InsuranceJobs entity);
+	int exist(String id);
+	InsuranceJobs get(String id);
+	int delete(String id);
+	List<InsuranceJobs> list();
+	List<InsuranceJobs> listByDefinitionId(String definitionId);
+	List<InsuranceJobs> findByDefinitionIdAndJobId(String definitionId, String jobId);
+	List<InsuranceJobs> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 21 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/JobsDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+
+import com.jpsoft.picc.modules.base.entity.InsuranceDefinitionLimit;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.Jobs;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface JobsDAO {
+	int insert(Jobs entity);
+	int update(Jobs entity);
+	int exist(String id);
+	Jobs get(String id);
+	int delete(String id);
+	List<Jobs> list();
+	List<Jobs> findByDefinitionId(String definitionId);
+	List<Jobs> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 19 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/MessageDAO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.Message;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface MessageDAO {
+	int insert(Message entity);
+	int update(Message entity);
+	int exist(String id);
+	Message get(String id);
+	int delete(String id);
+	List<Message> list();
+	List<Message> findByRecipientId(String recipientId);
+	List<Message> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 18 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/dao/TransactionRecordDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.base.entity.TransactionRecord;
+import java.util.Map;
+import com.jpsoft.picc.modules.common.dto.Sort;
+
+@Repository
+public interface TransactionRecordDAO {
+	int insert(TransactionRecord entity);
+	int update(TransactionRecord entity);
+	int exist(String id);
+	TransactionRecord get(String id);
+	int delete(String id);
+	List<TransactionRecord> list();
+	List<TransactionRecord> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 157 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/ApprovalRecord.java

@@ -0,0 +1,157 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_approval_record的实体类
+ */
+@ApiModel(value = "base_approval_record的实体类")
+public class ApprovalRecord {
+    @ApiModelProperty(value = "ID")
+	private String id;
+    @ApiModelProperty(value = "企业ID")
+	private String companyId;
+    @ApiModelProperty(value = "投保申请ID")
+	private String applicationId;
+    @ApiModelProperty(value = "投保状态")
+	private String status;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "更新人")
+	private String updateBy;
+    @ApiModelProperty(value = "更新时间")
+	private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+
+	/**
+	 *获取ID
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置ID
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取企业ID
+	 */
+    	public String getCompanyId(){
+		return companyId;
+	}
+	
+	/**
+	 *设置企业ID
+	 */
+	public void setCompanyId(String companyId){
+		this.companyId = companyId;
+	}
+	/**
+	 *获取投保申请ID
+	 */
+    	public String getApplicationId(){
+		return applicationId;
+	}
+	
+	/**
+	 *设置投保申请ID
+	 */
+	public void setApplicationId(String applicationId){
+		this.applicationId = applicationId;
+	}
+	/**
+	 *获取投保状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置投保状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	/**
+	 *获取更新人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取更新时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+}

+ 442 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/Company.java

@@ -0,0 +1,442 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_company的实体类
+ */
+@ApiModel(value = "base_company的实体类")
+public class Company {
+    @ApiModelProperty(value = "ID")
+	private String id;
+    @ApiModelProperty(value = "企业名称")
+	private String name;
+    @ApiModelProperty(value = "法人代表")
+	private String legalName;
+    @ApiModelProperty(value = "法人代表身份证")
+	private String legalCard;
+    @ApiModelProperty(value = "法人代表身份证附件")
+	private String legalCardFile;
+    @ApiModelProperty(value = "证件编号")
+	private String usccCode;
+    @ApiModelProperty(value = "证件附件(营业执照/企业代码)")
+	private String usccFiles;
+    @ApiModelProperty(value = "企业类型")
+	private String type;
+    @ApiModelProperty(value = "营业性质")
+	private String businessNature;
+    @ApiModelProperty(value = "营业范围")
+	private String businessScope;
+    @ApiModelProperty(value = "行业类型")
+	private String industryType;
+    @ApiModelProperty(value = "雇员人数")
+	private Integer employeesNumber;
+    @ApiModelProperty(value = "已投保人数")
+	private Integer insuredNumber;
+    @ApiModelProperty(value = "联系人")
+	private String person;
+    @ApiModelProperty(value = "联系电话")
+	private String tel;
+    @ApiModelProperty(value = "电子邮箱")
+	private String mail;
+    @ApiModelProperty(value = "邮政编码")
+	private String postal;
+    @ApiModelProperty(value = "地址")
+	private String address;
+    @ApiModelProperty(value = "企业公章(附件)")
+	private String companyStampFile;
+    @ApiModelProperty(value = "推广员账号")
+	private String promoter;
+    @ApiModelProperty(value = "近三年损失情况(时间、原因、损失金额)")
+	private String remark;
+    @ApiModelProperty(value = "云平台买方ID")
+	private String buyId;
+    @ApiModelProperty(value = "状态")
+	private String status;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "更新人")
+	private String updateBy;
+    @ApiModelProperty(value = "更新时间")
+	private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+
+	/**
+	 *获取ID
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置ID
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取企业名称
+	 */
+    	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置企业名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+	/**
+	 *获取法人代表
+	 */
+    	public String getLegalName(){
+		return legalName;
+	}
+	
+	/**
+	 *设置法人代表
+	 */
+	public void setLegalName(String legalName){
+		this.legalName = legalName;
+	}
+	/**
+	 *获取法人代表身份证
+	 */
+    	public String getLegalCard(){
+		return legalCard;
+	}
+	
+	/**
+	 *设置法人代表身份证
+	 */
+	public void setLegalCard(String legalCard){
+		this.legalCard = legalCard;
+	}
+	/**
+	 *获取法人代表身份证附件
+	 */
+    	public String getLegalCardFile(){
+		return legalCardFile;
+	}
+	
+	/**
+	 *设置法人代表身份证附件
+	 */
+	public void setLegalCardFile(String legalCardFile){
+		this.legalCardFile = legalCardFile;
+	}
+	/**
+	 *获取证件编号
+	 */
+    	public String getUsccCode(){
+		return usccCode;
+	}
+	
+	/**
+	 *设置证件编号
+	 */
+	public void setUsccCode(String usccCode){
+		this.usccCode = usccCode;
+	}
+	/**
+	 *获取证件附件(营业执照/企业代码)
+	 */
+    	public String getUsccFiles(){
+		return usccFiles;
+	}
+	
+	/**
+	 *设置证件附件(营业执照/企业代码)
+	 */
+	public void setUsccFiles(String usccFiles){
+		this.usccFiles = usccFiles;
+	}
+	/**
+	 *获取企业类型
+	 */
+    	public String getType(){
+		return type;
+	}
+	
+	/**
+	 *设置企业类型
+	 */
+	public void setType(String type){
+		this.type = type;
+	}
+	/**
+	 *获取营业性质
+	 */
+    	public String getBusinessNature(){
+		return businessNature;
+	}
+	
+	/**
+	 *设置营业性质
+	 */
+	public void setBusinessNature(String businessNature){
+		this.businessNature = businessNature;
+	}
+	/**
+	 *获取营业范围
+	 */
+    	public String getBusinessScope(){
+		return businessScope;
+	}
+	
+	/**
+	 *设置营业范围
+	 */
+	public void setBusinessScope(String businessScope){
+		this.businessScope = businessScope;
+	}
+	/**
+	 *获取行业类型
+	 */
+    	public String getIndustryType(){
+		return industryType;
+	}
+	
+	/**
+	 *设置行业类型
+	 */
+	public void setIndustryType(String industryType){
+		this.industryType = industryType;
+	}
+	/**
+	 *获取雇员人数
+	 */
+    	public Integer getEmployeesNumber(){
+		return employeesNumber;
+	}
+	
+	/**
+	 *设置雇员人数
+	 */
+	public void setEmployeesNumber(Integer employeesNumber){
+		this.employeesNumber = employeesNumber;
+	}
+	/**
+	 *获取已投保人数
+	 */
+    	public Integer getInsuredNumber(){
+		return insuredNumber;
+	}
+	
+	/**
+	 *设置已投保人数
+	 */
+	public void setInsuredNumber(Integer insuredNumber){
+		this.insuredNumber = insuredNumber;
+	}
+	/**
+	 *获取联系人
+	 */
+    	public String getPerson(){
+		return person;
+	}
+	
+	/**
+	 *设置联系人
+	 */
+	public void setPerson(String person){
+		this.person = person;
+	}
+	/**
+	 *获取联系电话
+	 */
+    	public String getTel(){
+		return tel;
+	}
+	
+	/**
+	 *设置联系电话
+	 */
+	public void setTel(String tel){
+		this.tel = tel;
+	}
+	/**
+	 *获取电子邮箱
+	 */
+    	public String getMail(){
+		return mail;
+	}
+	
+	/**
+	 *设置电子邮箱
+	 */
+	public void setMail(String mail){
+		this.mail = mail;
+	}
+	/**
+	 *获取邮政编码
+	 */
+    	public String getPostal(){
+		return postal;
+	}
+	
+	/**
+	 *设置邮政编码
+	 */
+	public void setPostal(String postal){
+		this.postal = postal;
+	}
+	/**
+	 *获取地址
+	 */
+    	public String getAddress(){
+		return address;
+	}
+	
+	/**
+	 *设置地址
+	 */
+	public void setAddress(String address){
+		this.address = address;
+	}
+	/**
+	 *获取企业公章(附件)
+	 */
+    	public String getCompanyStampFile(){
+		return companyStampFile;
+	}
+	
+	/**
+	 *设置企业公章(附件)
+	 */
+	public void setCompanyStampFile(String companyStampFile){
+		this.companyStampFile = companyStampFile;
+	}
+	/**
+	 *获取推广员账号
+	 */
+    	public String getPromoter(){
+		return promoter;
+	}
+	
+	/**
+	 *设置推广员账号
+	 */
+	public void setPromoter(String promoter){
+		this.promoter = promoter;
+	}
+	/**
+	 *获取近三年损失情况(时间、原因、损失金额)
+	 */
+    	public String getRemark(){
+		return remark;
+	}
+	
+	/**
+	 *设置近三年损失情况(时间、原因、损失金额)
+	 */
+	public void setRemark(String remark){
+		this.remark = remark;
+	}
+	/**
+	 *获取云平台买方ID
+	 */
+    	public String getBuyId(){
+		return buyId;
+	}
+	
+	/**
+	 *设置云平台买方ID
+	 */
+	public void setBuyId(String buyId){
+		this.buyId = buyId;
+	}
+	/**
+	 *获取状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	/**
+	 *获取更新人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取更新时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+}

+ 262 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/CompanyMember.java

@@ -0,0 +1,262 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_company_member的实体类
+ */
+@ApiModel(value = "base_company_member的实体类")
+public class CompanyMember {
+    @ApiModelProperty(value = "ID")
+	private String id;
+    @ApiModelProperty(value = "企业ID")
+	private String companyId;
+    @ApiModelProperty(value = "姓名")
+	private String name;
+    @ApiModelProperty(value = "证件类型")
+	private String cardType;
+    @ApiModelProperty(value = "证件编号")
+	private String cardNo;
+    @ApiModelProperty(value = "性别")
+	private Boolean sex;
+    @ApiModelProperty(value = "年龄")
+	private Integer age;
+    @ApiModelProperty(value = "行业ID")
+	private String jobsId;
+    @ApiModelProperty(value = "健康状态")
+	private String healthStatus;
+    @ApiModelProperty(value = "身份证附件")
+	private String cardFiles;
+    @ApiModelProperty(value = "状态")
+	private String status;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "更新人")
+	private String updateBy;
+    @ApiModelProperty(value = "更新时间")
+	private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+
+	/**
+	 *获取ID
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置ID
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取企业ID
+	 */
+    	public String getCompanyId(){
+		return companyId;
+	}
+	
+	/**
+	 *设置企业ID
+	 */
+	public void setCompanyId(String companyId){
+		this.companyId = companyId;
+	}
+	/**
+	 *获取姓名
+	 */
+    	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置姓名
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+	/**
+	 *获取证件类型
+	 */
+    	public String getCardType(){
+		return cardType;
+	}
+	
+	/**
+	 *设置证件类型
+	 */
+	public void setCardType(String cardType){
+		this.cardType = cardType;
+	}
+	/**
+	 *获取证件编号
+	 */
+    	public String getCardNo(){
+		return cardNo;
+	}
+	
+	/**
+	 *设置证件编号
+	 */
+	public void setCardNo(String cardNo){
+		this.cardNo = cardNo;
+	}
+	/**
+	 *获取性别
+	 */
+    	public Boolean getSex(){
+		return sex;
+	}
+	
+	/**
+	 *设置性别
+	 */
+	public void setSex(Boolean sex){
+		this.sex = sex;
+	}
+	/**
+	 *获取年龄
+	 */
+    	public Integer getAge(){
+		return age;
+	}
+	
+	/**
+	 *设置年龄
+	 */
+	public void setAge(Integer age){
+		this.age = age;
+	}
+	/**
+	 *获取行业ID
+	 */
+    	public String getJobsId(){
+		return jobsId;
+	}
+	
+	/**
+	 *设置行业ID
+	 */
+	public void setJobsId(String jobsId){
+		this.jobsId = jobsId;
+	}
+	/**
+	 *获取健康状态
+	 */
+    	public String getHealthStatus(){
+		return healthStatus;
+	}
+	
+	/**
+	 *设置健康状态
+	 */
+	public void setHealthStatus(String healthStatus){
+		this.healthStatus = healthStatus;
+	}
+	/**
+	 *获取身份证附件
+	 */
+    	public String getCardFiles(){
+		return cardFiles;
+	}
+	
+	/**
+	 *设置身份证附件
+	 */
+	public void setCardFiles(String cardFiles){
+		this.cardFiles = cardFiles;
+	}
+	/**
+	 *获取状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	/**
+	 *获取更新人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取更新时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+}

+ 247 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/CompanyUser.java

@@ -0,0 +1,247 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_company_user的实体类
+ */
+@ApiModel(value = "base_company_user的实体类")
+public class CompanyUser {
+    @ApiModelProperty(value = "ID")
+	private String id;
+    @ApiModelProperty(value = "用户名")
+	private String userName;
+    @ApiModelProperty(value = "密码")
+	private String password;
+    @ApiModelProperty(value = "用户头像地址")
+	private String avatar;
+    @ApiModelProperty(value = "用户注册手机号")
+	private String phone;
+    @ApiModelProperty(value = "微信openID")
+	private String openId;
+    @ApiModelProperty(value = "职业介绍")
+	private String profession;
+    @ApiModelProperty(value = "简介")
+	private String summary;
+    @ApiModelProperty(value = "关联企业编号")
+	private String companyId;
+    @ApiModelProperty(value = "状态")
+	private String status;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "更新人")
+	private String updateBy;
+    @ApiModelProperty(value = "更新时间")
+	private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+
+	/**
+	 *获取ID
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置ID
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取用户名
+	 */
+    	public String getUserName(){
+		return userName;
+	}
+	
+	/**
+	 *设置用户名
+	 */
+	public void setUserName(String userName){
+		this.userName = userName;
+	}
+	/**
+	 *获取密码
+	 */
+    	public String getPassword(){
+		return password;
+	}
+	
+	/**
+	 *设置密码
+	 */
+	public void setPassword(String password){
+		this.password = password;
+	}
+	/**
+	 *获取用户头像地址
+	 */
+    	public String getAvatar(){
+		return avatar;
+	}
+	
+	/**
+	 *设置用户头像地址
+	 */
+	public void setAvatar(String avatar){
+		this.avatar = avatar;
+	}
+	/**
+	 *获取用户注册手机号
+	 */
+    	public String getPhone(){
+		return phone;
+	}
+	
+	/**
+	 *设置用户注册手机号
+	 */
+	public void setPhone(String phone){
+		this.phone = phone;
+	}
+	/**
+	 *获取微信openID
+	 */
+    	public String getOpenId(){
+		return openId;
+	}
+	
+	/**
+	 *设置微信openID
+	 */
+	public void setOpenId(String openId){
+		this.openId = openId;
+	}
+	/**
+	 *获取职业介绍
+	 */
+    	public String getProfession(){
+		return profession;
+	}
+	
+	/**
+	 *设置职业介绍
+	 */
+	public void setProfession(String profession){
+		this.profession = profession;
+	}
+	/**
+	 *获取简介
+	 */
+    	public String getSummary(){
+		return summary;
+	}
+	
+	/**
+	 *设置简介
+	 */
+	public void setSummary(String summary){
+		this.summary = summary;
+	}
+	/**
+	 *获取关联企业编号
+	 */
+    	public String getCompanyId(){
+		return companyId;
+	}
+	
+	/**
+	 *设置关联企业编号
+	 */
+	public void setCompanyId(String companyId){
+		this.companyId = companyId;
+	}
+	/**
+	 *获取状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	/**
+	 *获取更新人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取更新时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+}

+ 148 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceAgent.java

@@ -0,0 +1,148 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_insurance_agent的实体类
+ */
+@ApiModel(value = "base_insurance_agent的实体类")
+public class InsuranceAgent {
+    @ApiModelProperty(value = "编号")
+	private String id;
+    @ApiModelProperty(value = "姓名")
+	private String name;
+    @ApiModelProperty(value = "审核状态")
+	private String status;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "修改人")
+	private String updateBy;
+    @ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+
+    /**
+	 *获取编号
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+
+	/**
+	 *获取姓名
+	 */
+    	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置姓名
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+
+	/**
+	 *获取审核状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置审核状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+
+
+	/**
+	 *获取修改人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置修改人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取修改时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置修改时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 178 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceDefinition.java

@@ -0,0 +1,178 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_insurance_definition的实体类
+ */
+@ApiModel(value = "base_insurance_definition的实体类")
+public class InsuranceDefinition {
+    @ApiModelProperty(value = "编号")
+	private String id;
+    @ApiModelProperty(value = "险种")
+	private String name;
+    @ApiModelProperty(value = "投保声明")
+	private String insuranceDescription;
+    @ApiModelProperty(value = "雇主责任险条款")
+	private String clause;
+    @ApiModelProperty(value = "状态")
+	private String status;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "修改人")
+	private String updateBy;
+    @ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+
+    /**
+	 *获取编号
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+
+	/**
+	 *获取险种
+	 */
+    	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置险种
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+	/**
+	 *获取投保声明
+	 */
+    	public String getInsuranceDescription(){
+		return insuranceDescription;
+	}
+	
+	/**
+	 *设置投保声明
+	 */
+	public void setInsuranceDescription(String insuranceDescription){
+		this.insuranceDescription = insuranceDescription;
+	}
+
+	/**
+	 *获取雇主责任险条款
+	 */
+    	public String getClause(){
+		return clause;
+	}
+	
+	/**
+	 *设置雇主责任险条款
+	 */
+	public void setClause(String clause){
+		this.clause = clause;
+	}
+
+	/**
+	 *获取状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+
+	/**
+	 *获取修改人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置修改人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取修改时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置修改时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 212 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceDefinitionLimit.java

@@ -0,0 +1,212 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_insurance_definition_limit的实体类
+ */
+@ApiModel(value = "base_insurance_definition_limit的实体类")
+public class InsuranceDefinitionLimit {
+    @ApiModelProperty(value = "编号")
+	private String id;
+	@ApiModelProperty(value = "险种信息ID")
+	private String definitionId;
+    @ApiModelProperty(value = "险种信息")
+	private InsuranceDefinition definition;
+    @ApiModelProperty(value = "限额名称")
+	private String name;
+    @ApiModelProperty(value = "责任限额/免赔额")
+	private String limit;
+    @ApiModelProperty(value = "计算单位(次/元/人/万)")
+	private String unit;
+    @ApiModelProperty(value = "状态")
+	private String status;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "修改人")
+	private String updateBy;
+    @ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+
+
+    /**
+	 *获取编号
+	 */
+    	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+
+	/**
+	 *获取险种信息
+	 */
+	public String getDefinitionId(){
+		return definitionId;
+	}
+
+	/**
+	 *获取险种信息
+	 */
+	public void setDefinitionId(String definitionId){
+		this.definitionId = definitionId;
+	}
+
+	/**
+	 *获取险种信息
+	 */
+    	public InsuranceDefinition getDefinition(){
+		return definition;
+	}
+	
+	/**
+	 *设置险种信息
+	 */
+	public void setDefinition(InsuranceDefinition definition){
+		this.definition = definition;
+	}
+
+	/**
+	 *获取限额名称
+	 */
+    	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置限额名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+
+	/**
+	 *获取责任限额/免赔额
+	 */
+    	public String getLimit(){
+		return limit;
+	}
+	
+	/**
+	 *设置责任限额/免赔额
+	 */
+	public void setLimit(String limit){
+		this.limit = limit;
+	}
+
+	/**
+	 *获取计算单位(次/元/人/万)
+	 */
+    	public String getUnit(){
+		return unit;
+	}
+	
+	/**
+	 *设置计算单位(次/元/人/万)
+	 */
+	public void setUnit(String unit){
+		this.unit = unit;
+	}
+
+	/**
+	 *获取状态
+	 */
+    	public String getStatus(){
+		return status;
+	}
+	
+	/**
+	 *设置状态
+	 */
+	public void setStatus(String status){
+		this.status = status;
+	}
+
+	/**
+	 *获取是否删除
+	 */
+    	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/**
+	 *获取创建人
+	 */
+    	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+
+	/**
+	 *获取修改人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置修改人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	/**
+	 *获取修改时间
+	 */
+    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置修改时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 188 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceJobs.java

@@ -0,0 +1,188 @@
+package com.jpsoft.picc.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+
+/**
+  描述:base_insurance_jobs的实体类
+ */
+@ApiModel(value = "base_insurance_jobs的实体类")
+public class InsuranceJobs {
+    @ApiModelProperty(value = "编号")
+	private String id;
+	@ApiModelProperty(value = "行业ID")
+	private String jobsId;
+	@ApiModelProperty(value = "险种信息ID")
+	private String definitionId;
+    @ApiModelProperty(value = "行业实体")
+	private Jobs jobs;
+	@ApiModelProperty(value = "险种信息实体")
+	private InsuranceDefinition definition;
+    @ApiModelProperty(value = "收费标准(月)")
+	private BigDecimal charges;
+    @ApiModelProperty(value = "是否删除")
+	private Boolean delFlag;
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+    @ApiModelProperty(value = "修改人")
+	private String updateBy;
+    @ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+
+    /**
+	 *获取编号
+	 */
+    public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+
+	/**
+	 *获取行业ID
+	 */
+	public Jobs getJobs(){
+		return jobs;
+	}
+	
+	/**
+	 *设置行业ID
+	 */
+	public void setJobs(Jobs jobs){
+		this.jobs = jobs;
+	}
+
+	/**
+	 *获取险种信息ID
+	 */
+	public InsuranceDefinition getDefinition(){
+		return definition;
+	}
+
+	/**
+	 *设置险种信息ID
+	 */
+	public void setDefinition(InsuranceDefinition definition){
+		this.definition = definition;
+	}
+
+	/**
+	 *设置行业ID
+	 */
+	public String getJobsId(){
+		return jobsId;
+	}
+	public void setJobsId(String jobsId){
+		this.jobsId = jobsId;
+	}
+
+	/**
+	 *获取险种信息ID
+	 */
+	public void setDefinitionId(String definitionId) {
+		this.definitionId = definitionId;
+	}
+	public String getDefinitionId() {
+		return definitionId;
+	}
+
+	/**
+	 *获取收费标准(月)
+	 */
+	public BigDecimal getCharges(){
+		return charges;
+	}
+	
+	/**
+	 *设置收费标准(月)
+	 */
+	public void setCharges(BigDecimal charges){
+		this.charges = charges;
+	}
+
+	/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取创建时间
+	 */
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+
+	/**
+	 *获取修改人
+	 */
+    	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置修改人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+
+	/**
+	 *获取修改时间
+	 */
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		public Date getUpdateTime(){
+		return updateTime;
+	}
+
+	/**
+	 *设置修改时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

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