sunyadv il y a 5 ans
Parent
commit
c8e9f3fb4f
34 fichiers modifiés avec 1878 ajouts et 0 suppressions
  1. 58 0
      target/classes/main/resources/application-prod.properties
  2. 32 0
      target/classes/main/resources/application-prod.yml
  3. 58 0
      target/classes/main/resources/application.properties
  4. 30 0
      target/classes/main/resources/application.yml
  5. BIN
      target/classes/main/resources/lib/jodconverter-2.2.2.jar
  6. BIN
      target/classes/main/resources/lib/jodconverter-cli-2.2.2.jar
  7. BIN
      target/classes/main/resources/lib/jodconverter-core-3.0.jar
  8. 19 0
      target/classes/main/resources/mapper/AppVersionMapper.xml
  9. 18 0
      target/classes/main/resources/mapper/AssetCustomCompanyMapper.xml
  10. 151 0
      target/classes/main/resources/mapper/CompanyMapper.xml
  11. 19 0
      target/classes/main/resources/mapper/CustomCompanyMapper.xml
  12. 20 0
      target/classes/main/resources/mapper/DictionaryDataMapper.xml
  13. 20 0
      target/classes/main/resources/mapper/FactoryMapper.xml
  14. 22 0
      target/classes/main/resources/mapper/InvitationRecordMapper.xml
  15. 19 0
      target/classes/main/resources/mapper/LngLatCompanyMapper.xml
  16. 88 0
      target/classes/main/resources/mapper/MouldEquipmentMapper.xml
  17. 231 0
      target/classes/main/resources/mapper/MouldFileMapper.xml
  18. 38 0
      target/classes/main/resources/mapper/MouldMaintainMapper.xml
  19. 244 0
      target/classes/main/resources/mapper/MouldMapper.xml
  20. 73 0
      target/classes/main/resources/mapper/MouldOperationDynamicsMapper.xml
  21. 22 0
      target/classes/main/resources/mapper/NewsNoticeMapper.xml
  22. 26 0
      target/classes/main/resources/mapper/NewsNoticeUserMapper.xml
  23. 72 0
      target/classes/main/resources/mapper/PartMapper.xml
  24. 21 0
      target/classes/main/resources/mapper/PdfFileMapper.xml
  25. 20 0
      target/classes/main/resources/mapper/PowerMapper.xml
  26. 21 0
      target/classes/main/resources/mapper/ProjectApproveMapper.xml
  27. 23 0
      target/classes/main/resources/mapper/ProjectFileMapper.xml
  28. 295 0
      target/classes/main/resources/mapper/ProjectMapper.xml
  29. 21 0
      target/classes/main/resources/mapper/ProjectOperationDynamicsMapper.xml
  30. 20 0
      target/classes/main/resources/mapper/ProjectUserMapper.xml
  31. 19 0
      target/classes/main/resources/mapper/UserCompanyMapper.xml
  32. 133 0
      target/classes/main/resources/mapper/UserMapper.xml
  33. 25 0
      target/classes/main/resources/mapper/VnoticeUserMapper.xml
  34. 20 0
      target/classes/main/resources/static/logout.html

+ 58 - 0
target/classes/main/resources/application-prod.properties

@@ -0,0 +1,58 @@
+# ####################################################################################################
+# 服务端配置
+server.port=9099
+server.servlet.context-path=/
+server.tomcat.uri-encoding=UTF-8
+server.tomcat.max-http-post-size=-1
+server.connection-timeout=18000000s
+# ####################################################################################################
+# thymeleaf 配置
+spring.thymeleaf.cache=false
+spring.thymeleaf.jackson.time-zone=GMT+8
+spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
+# ####################################################################################################
+# 数据源配置
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+spring.datasource.username=root
+spring.datasource.password=p011430seya1026
+#spring.datasource.druid.test-on-borrow=true
+#spring.datasource.druid.test-while-idle=true
+# ####################################################################################################
+# MyBatis 配置
+mybatis.mapper-locations=mappers/*Mapper.xml
+mybatis.type-aliases-package=com.hssx.cloudmodel.entity/*
+# 控制台输出SQL语句
+logging.level.com.hssx.cloudmodel.mapper = debug
+# ####################################################################################################
+#配置Session
+spring.session.store-type=none
+# ####################################################################################################
+#成功页面跳转
+spring.thymeleaf.prefix=classpath:/static/
+######################################################################################################
+## redis 配置
+#spring.redis.host=localhost
+#spring.redis.port=6379
+######################################################################################################
+# 文件上传路径
+upload.path=E:/staticproject/cloudmodel/upload/
+# 备用密码
+sysPwd=yunmo
+######################################################################################################
+# 邀请人员链接前缀
+invitation.url.prefix=http://118.190.47.230:9098/#/invite/
+#######################################################################################################
+# 配置上传文件的大小设置
+# Single file max size  即单个文件大小
+spring.servlet.multipart.max-file-size=1000MB
+spring.servlet.multipart.max-request-size=10000MB
+##################SpringBoot连接池配置########
+spring.datasource.hikari.minimum-idle=3
+spring.datasource.hikari.maximum-pool-size=10
+spring.datasource.hikari.max-lifetime =30000
+spring.datasource.hikari.connection-test-query=SELECT 1
+########################################################################################################
+# 日志
+logging.path=E:/staticproject/cloudmodel/
+

+ 32 - 0
target/classes/main/resources/application-prod.yml

@@ -0,0 +1,32 @@
+
+##########
+logging:
+  level:
+    root: info
+    org.mybatis: debug
+    java.sql: debug
+    org.springframework.web: trace
+    #打印sql语句
+    com.example.plus.mapper: debug
+##########
+mybatis-plus:
+#  mapper-locations: classpath:mapper/*/*.xml
+#  #实体扫描,多个package用逗号或者分号分隔
+#  typeAliasesPackage: com.hssx.cloudmodel
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 0
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    db-column-underline: true
+    refresh-mapper:
+#################插入和更新非null判断
+    db-config:
+      insert-strategy: not_null
+      update-strategy: not_null
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+########################
+
+

+ 58 - 0
target/classes/main/resources/application.properties

@@ -0,0 +1,58 @@
+# ####################################################################################################
+# 服务端配置
+server.port=8099
+server.servlet.context-path=/
+server.tomcat.uri-encoding=UTF-8
+server.tomcat.max-http-post-size=-1
+server.connection-timeout=18000000s
+# ####################################################################################################
+# thymeleaf 配置
+spring.thymeleaf.cache=false
+spring.thymeleaf.jackson.time-zone=GMT+8
+spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
+# ####################################################################################################
+# 数据源配置
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.url=jdbc:mysql://118.190.47.230:3306/new_cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+spring.datasource.username=root
+spring.datasource.password=p011430seya1026
+#spring.datasource.druid.test-on-borrow=true
+#spring.datasource.druid.test-while-idle=true
+# ####################################################################################################
+# MyBatis 配置
+mybatis.mapper-locations=mappers/*Mapper.xml
+mybatis.type-aliases-package=com.hssx.cloudmodel.entity/*
+# 控制台输出SQL语句
+logging.level.com.hssx.cloudmodel.mapper = debug
+# ####################################################################################################
+#配置Session
+spring.session.store-type=none
+# ####################################################################################################
+#成功页面跳转
+spring.thymeleaf.prefix=classpath:/static/
+######################################################################################################
+## redis 配置
+#spring.redis.host=localhost
+#spring.redis.port=6379
+######################################################################################################
+# 文件上传路径
+upload.path=D:/mould/upload/
+######################################################################################################
+# 文件下载路径
+download.path=D:/mould/download/
+# 邀请人员链接前缀
+invitation.url.prefix=https://localhost:8090/#/invite/
+# 备用密码
+sysPwd=yunmo
+#######################################################################################################
+# 配置上传文件的大小设置
+# Single file max size  即单个文件大小
+spring.servlet.multipart.max-file-size=10000MB
+spring.servlet.multipart.max-request-size=10000MB
+##################SpringBoot连接池配置########
+spring.datasource.hikari.minimum-idle=3
+spring.datasource.hikari.maximum-pool-size=10
+spring.datasource.hikari.max-lifetime =30000
+spring.datasource.hikari.connection-test-query=SELECT 1
+logging.path=E:/
+

+ 30 - 0
target/classes/main/resources/application.yml

@@ -0,0 +1,30 @@
+
+##########
+logging:
+  level:
+    root: info
+    org.mybatis: debug
+    java.sql: debug
+    org.springframework.web: trace
+    #打印sql语句
+    com.example.plus.mapper: debug
+##########
+mybatis-plus:
+#  mapper-locations: classpath:mapper/*/*.xml
+#  #实体扫描,多个package用逗号或者分号分隔
+#  typeAliasesPackage: com.hssx.cloudmodel
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 0
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    db-column-underline: true
+    refresh-mapper:
+#################插入和更新非null判断
+    db-config:
+      insert-strategy: not_null
+      update-strategy: not_null
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+

BIN
target/classes/main/resources/lib/jodconverter-2.2.2.jar


BIN
target/classes/main/resources/lib/jodconverter-cli-2.2.2.jar


BIN
target/classes/main/resources/lib/jodconverter-core-3.0.jar


+ 19 - 0
target/classes/main/resources/mapper/AppVersionMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.AppVersionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.AppVersion">
+        <id column="id" property="id" />
+        <result column="platform" property="platform" />
+        <result column="version" property="version" />
+        <result column="update_time" property="updateTime" />
+        <result column="url" property="url" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, platform, version, update_time, url
+    </sql>
+
+</mapper>

+ 18 - 0
target/classes/main/resources/mapper/AssetCustomCompanyMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.AssetCustomCompanyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.AssetCustomCompany">
+        <id column="id" property="id" />
+        <result column="assert_id" property="assertId" />
+        <result column="custom_id" property="customId" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, assert_id, custom_id, indate
+    </sql>
+
+</mapper>

+ 151 - 0
target/classes/main/resources/mapper/CompanyMapper.xml

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.CompanyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Company">
+        <id column="id" property="id" />
+        <result column="company_name" property="companyName" />
+        <result column="company_address" property="companyAddress" />
+        <result column="company_type" property="companyType" />
+        <result column="administrator_id" property="administratorId" />
+        <result column="administrator" property="administrator" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_name, company_address, company_type, administrator_id, administrator
+    </sql>
+
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
+        <id column="id" property="id" />
+        <result column="company_name" property="companyName" />
+        <result column="company_address" property="companyAddress" />
+        <result column="companytype" property="companyType" />
+        <result column="administrator_id" property="administratorId" />
+        <result column="administrator" property="administrator" />
+        <result column="y_lng" property="yLng" />
+        <result column="x_lat" property="xLat" />
+        <collection property="relateCompanyList" javaType="java.util.List" select="selectRelateCompanyList"
+                    column="{Id=id,companyType = companytype}"
+                    ofType="com.hssx.cloudmodel.entity.Company"/>
+    </resultMap>
+    <resultMap id="BaseResultMapMouldVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
+        <id column="id" property="id" />
+        <result column="company_name" property="companyName" />
+        <result column="company_address" property="companyAddress" />
+        <result column="company_type" property="companyType" />
+        <result column="y_lng" property="yLng" />
+        <result column="x_lat" property="xLat" />
+        <collection property="list" javaType="java.util.List" select="selectMouldsList" column="id"
+                    ofType="com.hssx.cloudmodel.entity.Mould"/>
+    </resultMap>
+
+
+    <!--<select id="getListByKeyName" resultMap="BaseResultMapVO">-->
+        <!--select-->
+        <!--<include refid="Base_Column_List"/>-->
+        <!--from-->
+        <!--tb_company-->
+        <!--<where>-->
+            <!--<if test="keyName != null and keyName != ''">-->
+                <!--and company_name like concat('%',#{keyName},'%')-->
+            <!--</if>-->
+            <!--<if test="companyType != null">-->
+                <!--and company_type = #{companyType}-->
+            <!--</if>-->
+        <!--</where>-->
+    <!--</select>-->
+    <select id="getCustomerListByKeyName" resultMap="BaseResultMapVO">
+        select
+        t.id, t.company_name, t.company_address, t.company_type companytype,t.administrator_id,t.administrator,tc.y_lng, tc.x_lat
+        from
+        tb_company t
+        left join
+        tb_lng_lat_company tc
+        on tc.company_id = t.id
+        <where>
+            <if test="keyName != null and keyName != ''">
+                and t.company_name like concat('%',#{keyName},'%')
+            </if>
+            <if test="companyType != null">
+                and t.company_type = #{companyType}
+            </if>
+        </where>
+    </select>
+    <select id="selectRelateCompanyList" resultType="com.hssx.cloudmodel.entity.Company" parameterType="java.util.Map">
+      SELECT
+        t.id, t.company_name,t.company_type
+        from
+        tb_asset_custom_company tbcc
+        left join
+        tb_company t
+        <if test="companyType == 0">
+            on t.id = tbcc.custom_id
+        </if>
+        <if test="companyType == 1">
+            on t.id = tbcc.assert_id
+        </if>
+        <where>
+          <if test="companyType == 0">
+              tbcc.assert_id = #{Id}
+          </if>
+          <if test="companyType == 1">
+              tbcc.custom_id = #{Id}
+          </if>
+        </where>
+
+    </select>
+
+    <select id="getListMould" resultMap="BaseResultMapMouldVO">
+        select
+        t.id, t.company_name, t.company_address, t.company_type,tbc.y_lng, tbc.x_lat
+        from
+        tb_mould tm
+        LEFT JOIN
+        tb_company t
+        on
+        tm.produce_company_id = t.id
+        LEFT JOIN
+        tb_lng_lat_company tbc
+        ON
+        tbc.company_id = t.id
+        where  t.id IS NOT NULL AND tm.id in
+        <foreach item="item" index="index" collection="mouldIds"
+                 open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
+    <resultMap id="BaseResultMouldMap" type="com.hssx.cloudmodel.entity.Mould">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo" />
+        <result column="model_name" property="modelName" />
+        <result column="water_gap" property="waterGap" />
+        <result column="tonnage" property="tonnage" />
+        <result column="oc_cycle" property="ocCycle" />
+        <result column="daily_output" property="dailyOutput" />
+        <result column="company_id" property="companyId" />
+        <result column="current_version_id" property="currentVersionId" />
+        <result column="state" property="state" />
+        <result column="is_delete" property="isDelete" />
+        <result column="creator_id" property="creatorId" />
+        <result column="project_id" property="projectId" />
+        <result column="rfid" property="rfid" />
+        <result column="setting_life" property="settingLife" />
+        <result column="area" property="area" />
+        <result column="initial_modulus" property="initialModulus" />
+        <result column="equipment_id" property="equipmentId" />
+        <result column="belong_project_grade" property="belongProjectGrade" />
+        <result column="produce_company_id" property="produceCompanyId" />
+        <result column="run_times" property="runTimes" />
+    </resultMap>
+    <select id="selectMouldsList" resultMap="BaseResultMouldMap">
+    select
+      id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area,
+      initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times
+    from
+      tb_mould
+    where
+      produce_company_id = #{id}
+    </select>
+</mapper>

+ 19 - 0
target/classes/main/resources/mapper/CustomCompanyMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.CustomCompanyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.CustomCompany">
+        <id column="id" property="id" />
+        <result column="company_id" property="companyId" />
+        <result column="company_name" property="companyName" />
+        <result column="project_id" property="projectId" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_id, company_name, project_id, indate
+    </sql>
+
+</mapper>

+ 20 - 0
target/classes/main/resources/mapper/DictionaryDataMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.DictionaryDataMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.DictionaryData">
+        <id column="id" property="id" />
+        <result column="dict_code" property="dictCode" />
+        <result column="data_name" property="dataName" />
+        <result column="dict_value" property="dictValue" />
+        <result column="dict_order" property="dictOrder" />
+        <result column="disabled" property="disabled" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, dict_code, data_name, dict_value, dict_order, disabled
+    </sql>
+
+</mapper>

+ 20 - 0
target/classes/main/resources/mapper/FactoryMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.FactoryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Factory">
+        <id column="id" property="id" />
+        <result column="factory_name" property="factoryName" />
+        <result column="factory_area" property="factoryArea" />
+        <result column="y_lng" property="yLng" />
+        <result column="x_lat" property="xLat" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, factory_name, factory_area, y_lng, x_lat, indate
+    </sql>
+
+</mapper>

+ 22 - 0
target/classes/main/resources/mapper/InvitationRecordMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.InvitationRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.InvitationRecord">
+        <result column="id" property="id" />
+        <result column="operator_id" property="operatorId" />
+        <result column="operator" property="operator" />
+        <result column="invitee_id" property="inviteeId" />
+        <result column="invitee" property="invitee" />
+        <result column="address_url" property="addressUrl" />
+        <result column="indate" property="indate" />
+        <result column="project_id" property="projectId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, operator_id, operator, invitee_id, invitee, address_url, indate, project_id
+    </sql>
+
+</mapper>

+ 19 - 0
target/classes/main/resources/mapper/LngLatCompanyMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.LngLatCompanyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.LngLatCompany">
+        <id column="id" property="id" />
+        <result column="y_lng" property="yLng" />
+        <result column="x_lat" property="xLat" />
+        <result column="indate" property="indate" />
+        <result column="company_id" property="companyId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, y_lng, x_lat, indate, company_id
+    </sql>
+
+</mapper>

+ 88 - 0
target/classes/main/resources/mapper/MouldEquipmentMapper.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.MouldEquipmentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.MouldEquipment">
+        <id column="id" property="id" />
+        <result column="equipment_name" property="equipmentName" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="use_life" property="useLife" />
+        <result column="belong_company_id" property="belongCompanyId" />
+        <result column="equipment_no" property="equipmentNo" />
+        <result column="is_use" property="isUse" />
+        <result column="hill_number" property="hillNumber" />
+        <result column="lng" property="lng" />
+        <result column="lat" property="lat" />
+        <result column="temperature" property="temperature" />
+        <result column="agent" property="agent" />
+        <result column="stage" property="stage" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number, lng, lat, temperature, agent,stage
+    </sql>
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldEquipmentVO">
+        <id column="id" property="id" />
+        <result column="equipment_name" property="equipmentName" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="use_life" property="useLife" />
+        <result column="belong_company_id" property="belongCompanyId" />
+        <result column="companyName" property="companyName" />
+        <result column="equipment_no" property="equipmentNo" />
+        <result column="is_use" property="isUse" />
+        <result column="hill_number" property="hillNumber" />
+        <result column="modelNo" property="modelNo" />
+        <result column="agent" property="agent" />
+        <result column="modelName" property="modelName" />
+        <result column="stage" property="stage" />
+    </resultMap>
+
+    <select id="getListByCompanyId" resultMap="BaseResultMapVO">
+        select
+        tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
+        tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
+        tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent,tbme.stage
+        from
+        tb_mould_equipment tbme
+        left join
+        tb_company tbc
+        on
+        tbme.belong_company_id = tbc.id
+        where
+        tbme.belong_company_id = #{belongCompanyId}
+        and
+        tbme.id in
+        <foreach item="item" index="index" collection="list"
+                 open="(" separator="," close=")">
+            #{item}
+        </foreach>
+        and tbme.is_use = 0
+    </select>
+    <select id="getList" resultMap="BaseResultMapVO">
+        select
+        tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,tbme.agent,
+        tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
+        tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbm.model_no modelNo,tbm.model_name modelName,tbme.stage
+        from
+        tb_mould_equipment tbme
+        left join
+        tb_mould tbm
+        on tbme.id = tbm.equipment_id
+        left join
+        tb_company tbc
+        on
+        tbme.belong_company_id = tbc.id
+        <where>
+            <if test="companyId != null">
+                and tbme.belong_company_id = #{companyId}
+            </if>
+            <if test="keyName != null and keyName != ''">
+                and tbme.equipment_no like concat('%',#{keyName},'%')
+            </if>
+        </where>
+    </select>
+</mapper>

+ 231 - 0
target/classes/main/resources/mapper/MouldFileMapper.xml

@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.MouldFileMapper">
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.MouldFile">
+        <id column="id" property="id" />
+        <result column="uplodtor_id" property="uplodtorId" />
+        <result column="uploadtor" property="uploadtor" />
+        <result column="indate" property="indate" />
+        <result column="model_id" property="modelId" />
+        <result column="sparepart_id" property="sparepartId" />
+        <result column="project_id" property="projectId" />
+        <result column="file_url" property="fileUrl" />
+        <result column="file_name" property="fileName" />
+        <result column="blong_type" property="blongType" />
+        <result column="content" property="content" />
+        <result column="state" property="state" />
+        <result column="file_type" property="fileType" />
+        <result column="file_size" property="fileSize" />
+        <result column="file_url_2" property="fileUrl2" />
+        <result column="file_name_2" property="fileName2" />
+        <result column="file_type_2" property="fileType2" />
+        <result column="file_size_2" property="fileSize2" />
+        <result column="dwg_type" property="dwgType" />
+        <result column="part_id" property="partId" />
+        <result column="is_update" property="isUpdate" />
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldFileVO">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo"/>
+        <result column="model_name" property="modelName"/>
+        <collection property="mould2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryMould2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="mould3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryMould3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="querySparepart2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="querySparepart3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="maintainFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryMaintainFilesByMouldId" column="id">
+        </collection>
+    </resultMap>
+    <resultMap id="BaseResultMapApprovedVO" type="com.hssx.cloudmodel.entity.vo.MouldFileVO">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo"/>
+        <result column="model_name" property="modelName"/>
+        <collection property="mould2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMould2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="mould3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMould3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedSparepart2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedSparepart3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="maintainFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMaintainFilesByMouldId" column="id">
+        </collection>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, uplodtor_id, uploadtor, indate, model_id, sparepart_id, project_id, file_url, file_name, blong_type, content, state, file_type, file_size, file_url_2, file_name_2, file_type_2, file_size_2, dwg_type,part_id
+    </sql>
+
+    <select id="getFileListByProjectId" resultMap="BaseResultMapVO">
+        select
+        id,model_no,model_name
+        from
+        tb_mould
+        <where>
+            project_id in
+            <foreach collection="list" index="index" open="(" item="item" close=")" separator=",">
+                #{item}
+            </foreach>
+            <if test="userVO.keyName != null and userVO.keyName != ''">
+                and model_name like concat('%',#{userVO.keyName},'%')
+            </if>
+        </where>
+    </select>
+    <select id="getFileListByMouldId" resultMap="BaseResultMapApprovedVO">
+        select
+        id,model_no,model_name
+        from
+        tb_mould
+        <where>
+            id  = #{id}
+        </where>
+    </select>
+    <select id="querySparepart3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 1
+    </select>
+    <select id="queryApprovedSparepart3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 1
+        and
+            state = 3
+    </select>
+    <select id="querySparepart2DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 0
+    </select>
+    <select id="queryApprovedSparepart2DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 0
+        and
+            state = 3
+    </select>
+    <select id="queryMould3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 0
+        and
+            dwg_type = 1
+    </select>
+    <select id="queryApprovedMould3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 0
+        and
+            dwg_type = 1
+        and
+            state = 3
+    </select>
+    <select id="queryMould2DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 0
+        and
+            dwg_type = 0
+    </select>
+    <select id="queryMaintainFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 3
+    </select>
+    <select id="queryApprovedMaintainFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 3
+        and
+            state = 3
+    </select>
+
+</mapper>

+ 38 - 0
target/classes/main/resources/mapper/MouldMaintainMapper.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.MouldMaintainMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.MouldMaintain">
+        <id column="id" property="id" />
+        <result column="mould_id" property="mouldId" />
+        <result column="maintain_type" property="maintainType" />
+        <result column="ways" property="ways" />
+        <result column="file_name" property="fileName" />
+        <result column="file_url" property="fileUrl" />
+        <result column="maintain_user_id" property="maintainUserId" />
+        <result column="maintain_user_name" property="maintainUserName" />
+        <result column="indate" property="indate" />
+        <result column="file_size" property="fileSize" />
+        <result column="project_id" property="projectId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, mould_id, maintain_type, ways, file_name, file_url, maintain_user_id, maintain_user_name, indate, file_size, project_id
+    </sql>
+
+    <select id="selectListByProject" resultMap="BaseResultMap">
+        select
+          id, mould_id, maintain_type, ways, file_name, file_url,
+          maintain_user_id, maintain_user_name, indate, file_size, project_id
+        from
+          tb_mould_maintain
+        <where>
+            project_id in
+            <foreach collection="list" separator="," close=")" item="item" open="(" index="index">
+                #{item}
+            </foreach>
+        </where>
+    </select>
+</mapper>

+ 244 - 0
target/classes/main/resources/mapper/MouldMapper.xml

@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.MouldMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Mould">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo" />
+        <result column="model_name" property="modelName" />
+        <result column="water_gap" property="waterGap" />
+        <result column="tonnage" property="tonnage" />
+        <result column="oc_cycle" property="ocCycle" />
+        <result column="daily_output" property="dailyOutput" />
+        <result column="company_id" property="companyId" />
+        <result column="current_version_id" property="currentVersionId" />
+        <result column="state" property="state" />
+        <result column="is_delete" property="isDelete" />
+        <result column="creator_id" property="creatorId" />
+        <result column="project_id" property="projectId" />
+        <result column="rfid" property="rfid" />
+        <result column="setting_life" property="settingLife" />
+        <result column="area" property="area" />
+        <result column="produce_company_name" property="produceCompanyName" />
+        <result column="initial_modulus" property="initialModulus" />
+        <result column="equipment_id" property="equipmentId" />
+        <result column="belong_project_grade" property="belongProjectGrade" />
+        <result column="produce_company_id" property="produceCompanyId" />
+        <result column="run_times" property="runTimes" />
+        <result column="is_maintain" property="isMaintain" />
+        <result column="maintain_count" property="maintainCount" />
+        <result column="holes" property="holes" />
+        <result column="pre_update_id" property="preUpdateId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id
+    </sql>
+
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldVO">
+        <id column="id" property="id"/>
+        <result column="maintain_count" property="maintainCount" />
+        <result column="model_no" property="modelNo"/>
+        <result column="model_name" property="modelName"/>
+        <result column="oc_cycle" property="ocCycle"/>
+        <result column="daily_output" property="dailyOutput"/>
+        <result column="company_id" property="companyId"/>
+        <result column="current_version_id" property="currentVersionId"/>
+        <result column="state" property="state"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="creator_id" property="creatorId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="projectName" property="projectName"/>
+        <result column="rfid" property="rfid"/>
+        <result column="setting_life" property="settingLife"/>
+        <result column="area" property="area"/>
+        <result column="produce_company_name" property="produceCompanyName"/>
+        <result column="initial_modulus" property="initialModulus"/>
+        <result column="equipment_id" property="equipmentId"/>
+        <result column="belong_project_grade" property="belongProjectGrade"/>
+        <result column="produce_company_id" property="produceCompanyId"/>
+        <result column="produceCompany" property="produceCompany"/>
+        <result column="run_times" property="runTimes" />
+        <result column="projectName" property="projectName"/>
+        <result column="managerId" property="managerId" />
+        <result column="mangerName" property="mangerName"/>
+        <result column="equipmentNo" property="equipmentNo"/>
+        <result column="stage" property="stage"/>
+        <result column="endTime" property="endTime"/>
+        <result column="hillNumber" property="hillNumber"/>
+        <result column="ownerCompanyName" property="ownerCompanyName"/>
+        <result column="companyName" property="companyName"/>
+        <result column="is_maintain" property="isMaintain" />
+        <result column="holes" property="holes" />
+        <result column="lng" property="lng" />
+        <result column="lat" property="lat" />
+        <result column="pre_update_id" property="preUpdateId" />
+    </resultMap>
+
+    <update id="updateMouldByProjectId">
+        update tb_mould set project_id = null ,belong_project_grade = 0 where project_id = #{project.id}
+    </update>
+
+    <select id="selectListByCondition" resultMap="BaseResultMapVO">
+        select
+        tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbm.creator_id creator_id,tbm.equipment_id equipment_id,tbm.is_maintain,tbm.holes,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,tbm.pre_update_id,
+        tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
+        tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
+        tbmp.lng,tbmp.lat,tbmp.stage
+        from
+        tb_mould tbm
+        left join
+        tb_mould_equipment tbmp
+        on
+        tbm.equipment_id = tbmp.id
+        left join
+        tb_project tbp
+        on tbp.id = tbm.project_id
+        left join
+        tb_company tbc
+        on
+        tbc.id = tbm.company_id
+        left join
+        tb_company tbco
+        on
+        tbco.id = tbm.produce_company_id
+        <where>
+            <if test="userVO.parentId != 0">
+                tbm.company_id = #{userVO.companyId}
+            </if>
+            <if test="userVO.searchType == 0 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbm.model_no like concat('%',#{userVO.keyName},'%')
+            </if>
+            <if test="userVO.searchType == 1 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbm.model_name like concat('%',#{userVO.keyName},'%')
+            </if>
+            <if test="userVO.projectId != -1">
+                AND tbm.project_id = #{userVO.projectId}
+            </if>
+            <if test="userVO.type == 0">
+                AND tbm.equipment_id is not null
+                AND tbm.state != 4
+            </if>
+            <if test="userVO.mouleMap == -1">
+                AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+            </if>
+        </where>
+    </select>
+    <select id="selectListByConditionByProject" resultMap="BaseResultMapVO">
+        select
+        tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbp.manager_id managerId,tbm.equipment_id equipment_id,is_maintain,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,tbco.company_name produceCompany,
+        tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,
+        tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
+        tbmp.lng,tbmp.lat,tbmp.stage
+        from
+        tb_mould tbm
+        left join
+        tb_mould_equipment tbmp
+        on
+        tbm.equipment_id = tbmp.id
+        left join
+        tb_project tbp
+        on
+        tbp.id = tbm.project_id
+        left join
+        tb_company tbc
+        on
+        tbc.id = tbm.company_id
+        left join
+        tb_company tbco
+        on
+        tbco.id = tbm.produce_company_id
+        <where>
+            <if test="userVO.searchType == 0 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbm.model_no like concat('%',#{userVO.keyName},'%')
+            </if>
+            <if test="userVO.searchType == 1 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbm.model_name like concat('%',#{userVO.keyName},'%')
+            </if>
+            <if test="userVO.mouleMap == -1">
+                AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+            </if>
+            <if test="userVO.type == 0">
+                AND tbm.equipment_id is not null
+                AND tbm.state != 4
+            </if>
+            AND tbm.project_id in
+            <foreach item="item" index="index" collection="list"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </where>
+    </select>
+
+    <select id="getDetailById" resultMap="BaseResultMapVO">
+    select
+        tbm.project_id project_id, tbm.setting_life setting_life,tbm.equipment_id equipment_id,tbm.maintain_count maintain_count,is_maintain,
+        tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
+        tbp.manager mangerName,tbco.company_address area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,
+        tbmp.equipment_no equipmentNo,tbmp.hill_number hillNumber,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
+        from
+        tb_mould tbm
+        left join
+        tb_mould_equipment tbmp
+        on
+        tbm.equipment_id = tbmp.id
+        left join
+        tb_project  tbp
+        on tbp.id = tbm.project_id
+        left join
+        tb_company tbco
+        on
+        tbco.id = tbm.produce_company_id
+        left join
+        tb_company tbc
+        on
+        tbc.id = tbm.company_id
+        where
+        tbm.id = #{mouldVO.id}
+    </select>
+
+    <select id="selectListByCompanyId" resultMap="BaseResultMapVO">
+select
+        tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbm.creator_id creator_id,tbm.equipment_id equipment_id,tbm.is_maintain,tbm.holes,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.pre_update_id,tbm.company_id,tbco.company_name produce_company_name,tbm.produce_company_id,
+        tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
+        tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
+        tbmp.lng,tbmp.lat,tbmp.stage
+        from
+        tb_mould tbm
+        left join
+        tb_mould_equipment tbmp
+        on
+        tbm.equipment_id = tbmp.id
+        left join
+        tb_project tbp
+        on tbp.id = tbm.project_id
+        left join
+        tb_company tbc
+        on
+        tbc.id = tbm.company_id
+        left join
+        tb_company tbco
+        on
+        tbco.id = tbm.produce_company_id
+        where
+          tbm.company_id = #{companyId}
+          AND tbm.equipment_id is not null
+          AND tbm.project_id is null
+        <if test="projectId != null">
+          OR tbm.project_id = #{projectId}
+        </if>
+    </select>
+    
+    <update id="updateModelProjectIdAndEquipmentIdToNullById">
+        update
+          tb_mould
+          SET /*project_id = NULL , */equipment_id = NULL
+          where id = #{model.id}
+    </update>
+</mapper>

+ 73 - 0
target/classes/main/resources/mapper/MouldOperationDynamicsMapper.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.MouldOperationDynamicsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.MouldOperationDynamics">
+        <id column="id" property="id"/>
+        <result column="file_id" property="fileId"/>
+        <result column="operator_id" property="operatorId"/>
+        <result column="operator_name" property="operatorName"/>
+        <result column="indate" property="indate"/>
+        <result column="file_name" property="fileName"/>
+        <result column="belong_type" property="belongType"/>
+        <result column="content" property="content"/>
+        <result column="mould_id" property="mouldId"/>
+        <result column="is_pass" property="isPass"/>
+        <result column="applicant_id" property="applicantId"/>
+        <result column="applicant_name" property="applicantName"/>
+    </resultMap>
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldOperationDynamicsVO">
+        <id column="id" property="id"/>
+        <result column="file_id" property="fileId"/>
+        <result column="operator_id" property="operatorId"/>
+        <result column="operator_name" property="operatorName"/>
+        <result column="indate" property="indate"/>
+        <result column="file_name" property="fileName"/>
+        <result column="belong_type" property="belongType"/>
+        <result column="content" property="content"/>
+        <result column="mould_id" property="mouldId"/>
+        <result column="is_pass" property="isPass"/>
+        <result column="applicant_id" property="applicantId"/>
+        <result column="applicant_name" property="applicantName"/>
+        <result column="mouldNo" property="mouldNo"/>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, file_id, operator_id, operator_name, indate, file_name, belong_type, content, mould_id, is_pass, applicant_id, applicant_name
+    </sql>
+    <select id="selectOperationDynamicsList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from
+        tb_mould_operation_dynamics
+        <where>
+            mould_id = #{userVO.mouldId}
+            and content = '下载'
+            <if test="userVO.startTime != null and userVO.endTime != null">
+                and DATE_FORMAT(indate,'%Y-%m-%d') between #{userVO.startTime} and #{userVO.endTime}
+            </if>
+        </where>
+    </select>
+    <select id="getlist" resultMap="BaseResultMapVO">
+        select
+        tmod.id, tmod.file_id, tmod.operator_id, tmod.operator_name, tmod.indate, tmod.file_name, tmod.belong_type,
+        tmod.content, tmod.mould_id, tmod.is_pass, tmod.applicant_id, tmod.applicant_name,tbm.model_no mouldNo
+        from
+          tb_mould_operation_dynamics tmod
+        left join
+          tb_mould tbm
+        on
+          tmod.mould_id = tbm.id
+        <where>
+            tmod.mould_id in
+            <foreach collection="list" index="index" open="(" item="item" close=")" separator=",">
+                #{item}
+            </foreach>
+            and tmod.belong_type = #{mouldOperationDynamics.belongType}
+            Order By tmod.id desc
+        </where>
+</select>
+</mapper>

+ 22 - 0
target/classes/main/resources/mapper/NewsNoticeMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.NewsNoticeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.NewsNotice">
+        <id column="id" property="id" />
+        <result column="project_id" property="projectId" />
+        <result column="project_name" property="projectName" />
+        <result column="ref_id" property="refId" />
+        <result column="notice_type" property="noticeType" />
+        <result column="content" property="content" />
+        <result column="indate" property="indate" />
+        <result column="belong_type" property="belongType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, project_id, project_name, ref_id, notice_type, content, indate, belong_type
+    </sql>
+
+</mapper>

+ 26 - 0
target/classes/main/resources/mapper/NewsNoticeUserMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.NewsNoticeUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.NewsNoticeUser">
+        <id column="id" property="id" />
+        <result column="user_id" property="userId" />
+        <result column="is_read" property="isRead" />
+        <result column="news_id" property="newsId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, user_id, is_read, news_id
+    </sql>
+    
+    <update id="updateNewsNoticeUserByNewsNoticeId">
+        update
+          tb_news_notice_user
+        set
+          is_read=0
+        where
+           news_id = #{id}
+    </update>
+</mapper>

+ 72 - 0
target/classes/main/resources/mapper/PartMapper.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.PartMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Part">
+        <id column="id" property="id" />
+        <result column="part_no" property="partNo" />
+        <result column="part_name" property="partName" />
+        <result column="indate" property="indate" />
+        <result column="part_life" property="partLife" />
+        <result column="is_vulnerable" property="isVulnerable" />
+        <result column="creator_id" property="creatorId" />
+        <result column="creator" property="creator" />
+        <result column="mould_id" property="mouldId" />
+    </resultMap>
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.PartVO">
+        <id column="id" property="id" />
+        <result column="part_no" property="partNo" />
+        <result column="part_name" property="partName" />
+        <result column="indate" property="indate" />
+        <result column="part_life" property="partLife" />
+        <result column="is_vulnerable" property="isVulnerable" />
+        <result column="creator_id" property="creatorId" />
+        <result column="creator" property="creator" />
+        <result column="mould_id" property="mouldId" />
+        <result column="state" property="state" />
+        <association property="part2dFile" javaType="com.hssx.cloudmodel.entity.MouldFile" column="id" select="getPart2dFileByPartId">
+        </association>
+        <association property="part3dFile" javaType="com.hssx.cloudmodel.entity.MouldFile" column="id" select="getPart3dFileByPartId">
+        </association>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, part_no, part_name, indate, part_life, is_vulnerable, creator_id, creator, mould_id
+    </sql>
+    <select id="selectPartFileByMouldId" resultMap="BaseResultMapVO">
+        select
+          tbp.id, tbp.part_no, tbp.part_name, tbmf.indate, tbp.part_life, tbp.is_vulnerable, tbp.creator_id, tbp.creator, tbp.mould_id,tbmf.state
+        from
+          tb_part tbp
+        left join
+          tb_mould_file tbmf
+        on  tbmf.part_id = tbp.id
+        where
+          mould_id = #{userVO.mouldId}
+          group by tbp.id
+    </select>
+    <select id="getPart2dFileByPartId" resultType="com.hssx.cloudmodel.entity.MouldFile">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type, part_id
+        from
+            tb_mould_file
+        where
+            part_id = #{id}
+            and dwg_type = 0
+    </select>
+    <select id="getPart3dFileByPartId" resultType="com.hssx.cloudmodel.entity.MouldFile">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type, part_id
+        from
+            tb_mould_file
+        where
+            part_id = #{id}
+        and dwg_type = 1
+    </select>
+</mapper>

+ 21 - 0
target/classes/main/resources/mapper/PdfFileMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.PdfFileMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.PdfFile">
+        <id column="id" property="id" />
+        <result column="type" property="type" />
+        <result column="pdf_url" property="pdfUrl" />
+        <result column="file_id" property="fileId" />
+        <result column="indate" property="indate" />
+        <result column="raf_id" property="rafId" />
+        <result column="source_file_url" property="sourceFileUrl" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, type, pdf_url, file_id, indate, raf_id, source_file_url
+    </sql>
+
+</mapper>

+ 20 - 0
target/classes/main/resources/mapper/PowerMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.PowerMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Power">
+        <id column="id" property="id" />
+        <result column="power_type" property="powerType" />
+        <result column="user_id" property="userId" />
+        <result column="project_id" property="projectId" />
+        <result column="indate" property="indate" />
+        <result column="operating_documents_type" property="operatingDocumentsType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, power_type, user_id, project_id, indate, operating_documents_type
+    </sql>
+
+</mapper>

+ 21 - 0
target/classes/main/resources/mapper/ProjectApproveMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.ProjectApproveMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.ProjectApprove">
+        <id column="id" property="id" />
+        <result column="approver_id" property="approverId" />
+        <result column="approver_name" property="approverName" />
+        <result column="company_id" property="companyId" />
+        <result column="company_name" property="companyName" />
+        <result column="subordinate_type" property="subordinateType" />
+        <result column="project_id" property="projectId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, approver_id, approver_name, company_id, company_name, subordinate_type, project_id
+    </sql>
+
+</mapper>

+ 23 - 0
target/classes/main/resources/mapper/ProjectFileMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.ProjectFileMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.ProjectFile">
+        <id column="id" property="id" />
+        <result column="project_id" property="projectId" />
+        <result column="uploader_id" property="uploaderId" />
+        <result column="uploader" property="uploader" />
+        <result column="file_name" property="fileName" />
+        <result column="url" property="url" />
+        <result column="file_type" property="fileType" />
+        <result column="file_size" property="fileSize" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, project_id, uploader_id, uploader, file_name, url, file_type, file_size, indate
+    </sql>
+
+</mapper>

+ 295 - 0
target/classes/main/resources/mapper/ProjectMapper.xml

@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.ProjectMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Project">
+        <id column="id" property="id" />
+        <result column="project_name" property="projectName" />
+        <result column="project_no" property="projectNo" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="content" property="content" />
+        <result column="creator_id" property="creatorId" />
+        <result column="creator" property="creator" />
+        <result column="is_delete" property="isDelete" />
+        <result column="owner_company" property="ownerCompany" />
+        <result column="owner_company_name" property="ownerCompanyName" />
+        <result column="indate" property="indate" />
+        <result column="manager_id" property="managerId" />
+        <result column="manager" property="manager" />
+    </resultMap>
+    <resultMap id="BaseResultMapList" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
+        <id column="id" property="id" />
+        <result column="project_name" property="projectName" />
+        <result column="project_no" property="projectNo" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="content" property="content" />
+        <result column="creator_id" property="creatorId" />
+        <result column="creator" property="creator" />
+        <result column="is_delete" property="isDelete" />
+        <result column="owner_company" property="ownerCompany" />
+        <result column="owner_company_name" property="ownerCompanyName" />
+        <result column="indate" property="indate" />
+        <result column="manager_id" property="managerId" />
+        <result column="manager" property="manager" />
+        <!--以下是分页插件的一对多-->
+        <collection property="customCompanies" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.CustomCompany"
+                    select="queryCustomCompaniesId" column="id">
+        </collection>
+    </resultMap>
+<!-- 以上一对多的映射-->
+    <resultMap id="getCustomCompany" type="com.hssx.cloudmodel.entity.CustomCompany">
+        <result column="company_id" property="companyId" />
+        <result column="company_name" property="companyName" />
+    </resultMap>
+    <select id="getProjectListByUid" resultMap="BaseResultMapList">
+        select
+        p.id id,p.project_name project_name, p.creator creator,p.owner_company owner_company,
+        p.owner_company_name owner_company_name,p.manager_id manager_id,p.manager manager,
+        p.indate indate
+        from
+        tb_project p
+        left join tb_project_user pu
+        on p.id = pu.project_id
+        left join tb_project_approve tpa
+        on tpa.project_id = p.id
+        <where>
+            <!--<if test="currentUser.id != 1">
+                pu.user_id = #{currentUser.id} OR p.`creator_id` = #{currentUser.id} OR p.`manager_id` = #{currentUser.id} OR tpa.approver_id = #{currentUser.id}
+            </if>-->
+            <if test="keyName != null and keyName != ''">
+                AND p.project_name like concat('%',#{keyName},'%')
+            </if>
+        </where>
+        GROUP BY p.id
+        order by p.id desc
+    </select>
+    <select id="getProjectListByUidInProjectIds" resultMap="BaseResultMapList">
+        select
+        p.id id,p.project_name project_name, p.creator creator,p.owner_company owner_company,
+        p.owner_company_name owner_company_name,p.manager_id manager_id,p.manager manager,
+        p.indate indate
+        from
+        tb_project p
+        left join tb_project_user pu
+        on p.id = pu.project_id
+        left join tb_project_approve tpa
+        on tpa.project_id = p.id
+        <where>
+            p.id in <foreach collection="list" separator="," close=")" item="item" open="(" index="index">
+            #{item}
+        </foreach>
+            <!--<if test="currentUser.id != 1">
+                pu.user_id = #{currentUser.id} OR p.`creator_id` = #{currentUser.id} OR p.`manager_id` = #{currentUser.id} OR tpa.approver_id = #{currentUser.id}
+            </if>-->
+            <if test="keyName != null and keyName != ''">
+                AND p.project_name like concat('%',#{keyName},'%')
+            </if>
+        </where>
+        GROUP BY p.id
+        order by p.id desc
+    </select>
+    <!--一对多的子查询 queryCustomCompaniesId-->
+    <select id="queryCustomCompaniesId" resultMap="getCustomCompany">
+    SELECT
+     c.company_id company_id,c.company_name company_name
+    from
+      tb_project p
+    RIGHT JOIN
+      tb_custom_company c
+    on
+      c.project_id = p.id
+    WHERE
+      p.id = #{id}
+    GROUP BY c.company_id
+    </select>
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, project_name, project_no, start_time, end_time, content, creator_id, creator, is_delete, owner_company, owner_company_name, indate, manager_id, manager
+    </sql>
+
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
+        <id column="id" property="id" />
+        <result column="project_name" property="projectName" />
+        <result column="project_no" property="projectNo" />
+        <result column="creator_id" property="creatorId" />
+        <result column="creator" property="creator" />
+        <result column="is_delete" property="isDelete" />
+        <result column="pindate" property="indate" />
+        <result column="manager_id" property="managerId" />
+        <result column="manager" property="manager" />
+        <result column="owner_company" property="ownerCompany" />
+        <result column="owner_company_name" property="ownerCompanyName" />
+        <collection property="models" ofType="com.hssx.cloudmodel.entity.Mould">
+            <id column="model_id" property="id" />
+            <result column="model_no" property="modelNo" />
+            <result column="model_name" property="modelName" />
+            <result column="produce_company_id" property="produceCompanyId" />
+            <result column="belong_project_grade" property="belongProjectGrade" />
+            <result column="produce_company_name" property="produceCompanyName" />
+        </collection>
+        <collection property="approves" ofType="com.hssx.cloudmodel.entity.ProjectApprove">
+            <result column="approver_id" property="approverId" />
+            <result column="approver_name" property="approverName" />
+            <result column="company_id" property="companyId" />
+            <result column="company_name" property="companyName" />
+            <result column="subordinate_type" property="subordinateType" />
+            <result column="project_id" property="projectId" />
+        </collection>
+        <collection property="customCompanies" ofType="com.hssx.cloudmodel.entity.CustomCompany">
+            <result column="companyid" property="companyId" />
+            <result column="companyname" property="companyName" />
+        </collection>
+    </resultMap>
+
+    <select id="getProjectById" resultMap="BaseResultMapVO">
+    select
+        p.id id, p.project_name project_name, p.project_no project_no, p.creator_id creator_id,p.manager_id manager_id,p.manager manager,
+        p.creator creator, p.owner_company owner_company,p.owner_company_name owner_company_name,p.indate pindate,m.belong_project_grade,
+        m.id model_id, m.model_no model_no,m.model_name model_name,a.approver_id approver_id,a.approver_name approver_name,a.subordinate_type subordinate_type,
+        c.company_id companyid,c.company_name companyname,tbc.company_name produce_company_name,tbc.id produce_company_id
+    from
+        tb_project p
+    left join tb_mould m
+    on p.id = m.project_id
+    left join tb_project_approve a
+    on p.id = a.project_id
+    left join tb_custom_company c
+    on c.project_id = p.id
+    LEFT JOIN tb_company tbc
+    ON tbc.`id` = m.`produce_company_id`
+    where
+      p.id = #{id}
+    </select>
+
+    <resultMap id="UserResultMap" type="com.hssx.cloudmodel.entity.User">
+        <id column="id" property="id" />
+        <result column="username" property="username" />
+        <result column="role_type" property="roleType" />
+        <result column="company_id" property="companyId" />
+        <result column="head_imgurl" property="headImgurl" />
+        <result column="subordinate_type" property="subordinateType" />
+    </resultMap>
+
+    <select id="getProjectUserById" resultMap="UserResultMap">
+        select
+          u.id id, u.username username, u.indate indate, u.head_imgurl head_imgurl, u.subordinate_type subordinate_type
+        from
+          tb_project_user pu
+        RIGHT join
+          tb_user u
+        on
+          pu.user_id = u.id
+        where
+          pu.project_id = #{id} and pu.role_type IS NULL
+    </select>
+
+    <resultMap id="BaseResultMapPowerList" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
+        <id column="id" property="id" />
+        <result column="project_name" property="projectName" />
+        <result column="project_id" property="projectId" />
+        <result column="user_id" property="userId" />
+        <result column="company_name" property="companyName" />
+        <result column="powerString" property="powerString" />
+    </resultMap>
+    <select id="selectUserPowerList1" resultMap="BaseResultMapPowerList">
+      SELECT
+      tbpu.user_id ,tbpu.project_id ,GROUP_CONCAT(tbpu.power_type) powerString,
+        tbu.username ,tbc.company_name,
+        tbp.project_name
+      FROM `tb_power` tbpu
+      left join
+      tb_project tbp
+      on tbp.id = tbpu.project_id
+      left join
+      tb_user tbu
+      on tbpu.user_id = tbu.id
+      left join
+      tb_company tbc
+      on tbc.id = tbu.company_id
+        <where>
+            <if test="user.projectId != null">
+                tbpu.project_id = #{user.projectId}
+            </if>
+            <if test="user.companyId != null">
+                tbu.company_id = #{user.companyId}
+            </if>
+            <if test="user.keyName != null and user.keyName != ''">
+                tbu.username like concat('%',#{user.keyName},'%')
+            </if>
+            <if test="type == 0">
+                tbp.creator_id = #{user.id}
+            </if>
+            <if test="type == 1">
+                tbp.manager_id = #{user.id}
+            </if>
+        </where>
+      GROUP BY tbpu.user_id ,tbpu.project_id;
+      order by tbpu.user_id
+    </select>
+
+    <resultMap id="BaseResultMapPower" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
+        <id column="id" property="id" />
+        <result column="project_name" property="projectName" />
+        <result column="project_id" property="projectId" />
+        <result column="user_id" property="userId" />
+        <result column="username" property="username"/>
+        <result column="company_name" property="companyName" />
+        <result column="powerString" property="powerString" />
+        <collection property="powers" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.Power"
+                    select="queryPowerByUserIdAndProject" column="{userId = user_id,projectId = project_id}">
+        </collection>
+    </resultMap>
+    <resultMap id="BasePower" type="com.hssx.cloudmodel.entity.Power">
+        <result column="power_type" property="powerType" />
+        <result column="user_id" property="userId" />
+        <result column="project_id" property="projectId" />
+    </resultMap>
+
+    <select id="selectUserPowerList" resultMap="BaseResultMapPower">
+        SELECT
+        tbpu.user_id user_id,tbpu.project_id project_id,tbu.username username,tbc.company_name,
+        tbp.project_name
+        FROM
+        `tb_project_user` tbpu
+        LEFT JOIN
+        tb_project tbp
+        ON tbp.id = tbpu.project_id
+        LEFT JOIN
+        tb_user tbu
+        ON tbpu.user_id = tbu.id
+        LEFT JOIN
+        tb_company tbc
+        ON tbc.id = tbu.company_id
+        <where>
+            <if test="user.projectId != null and user.projectId !=''">
+               AND tbpu.project_id = #{user.projectId}
+            </if>
+            <if test="user.cId != null and user.cId !=''">
+                AND tbu.company_id = #{user.cId}
+            </if>
+            <if test="user.keyName != null and user.keyName != ''">
+                AND tbu.username like concat('%',#{user.keyName},'%')
+            </if>
+            <if test="type == 0">
+                AND tbp.creator_id = #{user.id}
+            </if>
+            <if test="type == 1">
+                AND tbp.manager_id = #{user.id}
+            </if>
+        </where>
+    </select>
+    <!--一对多的子查询 queryCustomCompaniesId-->
+    <select id="queryPowerByUserIdAndProject" resultMap="BasePower" parameterType="java.util.Map">
+    SELECT
+    tbpw.user_id,tbpw.project_id,tbpw.power_type
+     from
+     `tb_power` tbpw
+    WHERE
+    tbpw.project_id = #{projectId}
+    and
+    tbpw.user_id  =#{userId}
+    </select>
+</mapper>

+ 21 - 0
target/classes/main/resources/mapper/ProjectOperationDynamicsMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.ProjectOperationDynamicsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.ProjectOperationDynamics">
+        <id column="id" property="id" />
+        <result column="operator" property="operator" />
+        <result column="operator_id" property="operatorId" />
+        <result column="indate" property="indate" />
+        <result column="file_name" property="fileName" />
+        <result column="content" property="content" />
+        <result column="project_id" property="projectId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, operator, operator_id, indate, file_name, content, project_id
+    </sql>
+
+</mapper>

+ 20 - 0
target/classes/main/resources/mapper/ProjectUserMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.ProjectUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.ProjectUser">
+        <id column="id" property="id" />
+        <result column="project_id" property="projectId" />
+        <result column="user_id" property="userId" />
+        <result column="subordinate" property="subordinate" />
+        <result column="role_type" property="roleType" />
+        <result column="subordinate_type" property="subordinateType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, project_id, user_id, subordinate, role_type, subordinate_type
+    </sql>
+
+</mapper>

+ 19 - 0
target/classes/main/resources/mapper/UserCompanyMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.UserCompanyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.UserCompany">
+        <id column="id" property="id" />
+        <result column="user_id" property="userId" />
+        <result column="belong_company_id" property="belongCompanyId" />
+        <result column="cooperation_company_id" property="cooperationCompanyId" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, user_id, belong_company_id, cooperation_company_id, indate
+    </sql>
+
+</mapper>

+ 133 - 0
target/classes/main/resources/mapper/UserMapper.xml

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.UserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.User">
+        <id column="id" property="id" />
+        <result column="account" property="account" />
+        <result column="username" property="username" />
+        <result column="password" property="password" />
+        <result column="mobile" property="mobile" />
+        <result column="role_type" property="roleType" />
+        <result column="company_id" property="companyId" />
+        <result column="parent_id" property="parentId" />
+        <result column="sex" property="sex" />
+        <result column="role_name" property="roleName" />
+        <result column="work_state" property="workState" />
+        <result column="is_disable" property="isDisable" />
+        <result column="indate" property="indate" />
+        <result column="head_imgurl" property="headImgurl" />
+        <result column="team_name" property="teamName" />
+        <result column="subordinate_type" property="subordinateType" />
+        <result column="openid" property="openid" />
+    </resultMap>
+
+    <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.UserVO">
+        <id column="id" property="id" />
+        <result column="account" property="account" />
+        <result column="username" property="username" />
+        <result column="password" property="password" />
+        <result column="mobile" property="mobile" />
+        <result column="role_type" property="roleType" />
+        <result column="role_name" property="roleName" />
+        <result column="company_id" property="companyId" />
+        <result column="company_name" property="companyName"/>
+        <result column="parent_id" property="parentId" />
+        <result column="sex" property="sex" />
+        <result column="work_state" property="workState" />
+        <result column="is_disable" property="isDisable" />
+        <result column="indate" property="indate" />
+        <result column="head_imgurl" property="headImgurl" />
+        <result column="team_name" property="teamName" />
+        <result column="subordinate_type" property="subordinateType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, account, username, password, mobile, role_type, company_id, parent_id, sex, role_name, work_state, is_disable, indate, head_imgurl, team_name, subordinate_type, openid
+    </sql>
+
+    <select id="selsctUsersByUids" resultMap="BaseResultMapVO">
+      SELECT
+        u.id id,  u.username username,  u.mobile mobile,  u.company_id company_id, c.`company_name` company_name,
+        u.parent_id parent_id,  u.work_state work_state, u.is_disable is_disable,
+        u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.subordinate_type subordinate_type
+        FROM
+        tb_user AS u
+        LEFT JOIN tb_company c
+        ON u.company_id = c.`id`
+      <where>
+        <foreach collection="list" separator="," close=")" item="item" open="u.id in (" index="index">
+          #{item}
+        </foreach>
+          and u.id != #{id}
+      </where>
+    </select>
+
+    <select id="selectListByCondition" resultMap="BaseResultMapVO">
+        SELECT
+        u.id id, u.account account, u.username username, u.password password, u.mobile mobile, u.role_type role_type, u.company_id company_id, c.`company_name` company_name,
+        u.role_name role_name,u.parent_id parent_id, u.sex sex, u.work_state work_state, u.is_disable is_disable,
+        u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.subordinate_type subordinate_type
+        FROM
+        tb_user AS u
+        LEFT JOIN tb_company c
+        ON u.company_id = c.`id`
+        <where>
+            u.id != #{user.id}
+            <if test="user.id != 1">
+                AND u.parent_id = #{user.id}
+            </if>
+            <if test="flag==0 and keyName != '' and keyName !=null">
+                AND u.username like concat('%',#{keyName},'%')
+            </if>
+            <if test="flag==1 and keyName != '' and keyName !=null">
+                AND u.account like concat('%',#{keyName},'%')
+            </if>
+            <if test="companyId != -1">
+                AND  u.company_id = #{companyId}
+            </if>
+        </where>
+        Order by u.id desc
+    </select>
+    <select id="selectUserListByCondition" resultMap="BaseResultMapVO">
+        SELECT
+        u.id id, u.account account, u.username username, u.password password, u.mobile mobile, u.role_type role_type, u.company_id company_id, c.`company_name` company_name,
+        u.role_name role_name,u.parent_id parent_id, u.sex sex, u.work_state work_state, u.is_disable is_disable,
+        u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.subordinate_type subordinate_type
+        FROM
+        tb_user AS u
+        LEFT JOIN tb_company c
+        ON u.company_id = c.`id`
+        <where>
+            u.id in
+            <foreach collection="list" index="index" open="(" item="item" close=")" separator=",">
+              #{item}
+        </foreach>
+            and u.id != #{user.id}
+            <if test="flag==0 and keyName != '' and keyName !=null">
+                AND u.username like concat('%',#{keyName},'%')
+            </if>
+            <if test="flag==1 and keyName != '' and keyName !=null">
+                AND u.account like concat('%',#{keyName},'%')
+            </if>
+            <if test="companyId != -1">
+                AND  u.company_id = #{companyId}
+            </if>
+        </where>
+        Order by u.id desc
+    </select>
+    <select id="getUserByAccount" resultMap="BaseResultMapVO">
+        select
+          u.id id, u.account account, u.username username, u.password password, u.mobile mobile, u.role_type role_type, u.company_id company_id, c.`company_name` company_name,
+          u.role_name role_name,u.parent_id parent_id, u.sex sex, u.work_state work_state, u.is_disable is_disable,
+          u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.subordinate_type subordinate_type
+        from
+          tb_user AS u
+        LEFT JOIN tb_company c
+        ON u.company_id = c.`id`
+        where
+          u.account = #{userVO.account}
+    </select>
+</mapper>

+ 25 - 0
target/classes/main/resources/mapper/VnoticeUserMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.VnoticeUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.VnoticeUser">
+        <result column="id" property="id" />
+        <result column="user_id" property="userId" />
+        <result column="is_read" property="isRead" />
+        <result column="news_id" property="newsId" />
+        <result column="project_id" property="projectId" />
+        <result column="project_name" property="projectName" />
+        <result column="notice_type" property="noticeType" />
+        <result column="ref_id" property="refId" />
+        <result column="content" property="content" />
+        <result column="indate" property="indate" />
+        <result column="belong_type" property="belongType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, user_id, is_read, news_id, project_id, project_name, notice_type, ref_id, content, indate, belong_type
+    </sql>
+
+</mapper>

+ 20 - 0
target/classes/main/resources/static/logout.html

@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>Document</title>
+</head>
+<script>
+    function f() {
+        // localStorage = null;
+        localStorage.clear();
+        alert("数据已清空");
+    }
+</script>
+<body onload="f()">
+
+</body>
+</html>