Переглянути джерело

batch system 配置文件调整

黄远 5 роки тому
батько
коміт
12f3890721

+ 6 - 6
lift-batch-service/src/main/resources/application-dev.yml

@@ -1,23 +1,23 @@
 spring:
   datasource:
-    url: jdbc:mysql://192.168.1.46:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: Tyty-2020
+    url: jdbc:mysql://rm-bp1qkwy173koi066x.mysql.rds.aliyuncs.com:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+    username: tykj
+    password: Tdkg-13250409
     driver-class-name: com.mysql.cj.jdbc.Driver
 
-
   #redis缓存配置
   redis:
     database: 0 #数据库索引,默认为0
-    host: 192.168.1.46 #服务器地址
+    host: r-bp1j7odydtfqtprdvm.redis.rds.aliyuncs.com #(内网地址)服务器地址
     port: 6379 #端口
-    password: newtyty #验证密码
+    password: Gdkc-290431 #验证密码
     jedis:
       pool:
         max-active: 8 #最大连接数
         max-idle: 8 #最大空闲链接
         max-wait: 20000ms
         min-idle: 0
+    timeout: 600000s
 
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:

lift-batch-service/src/main/resources/application-web.yml → lift-batch-service/src/main/resources/application-test.yml


+ 1 - 1
lift-batch-service/src/main/resources/bootstrap.yml

@@ -20,5 +20,5 @@ eureka:
     lease-expiration-duration-in-seconds: 20
   client:
     service-url:
-      defaultZone: http://localhost:10225/eureka/
+      defaultZone: http://172.16.24.142:10225/eureka/
 

+ 0 - 28
lift-system-service/src/main/resources/application-dev.yml

@@ -1,28 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://192.168.1.46:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: Tyty-2020
-    driver-class-name: com.mysql.cj.jdbc.Driver
-
-
-  #redis缓存配置
-  redis:
-    database: 0 #数据库索引,默认为0
-    host: 192.168.1.46 #服务器地址
-    port: 6379 #端口
-    password: newtyty #验证密码
-    jedis:
-      pool:
-        max-active: 8 #最大连接数
-        max-idle: 8 #最大空闲链接
-        max-wait: 20000ms
-        min-idle: 0
-
-#aliyun OSS服务配置信息,加载到SystemConfiguration
-aliyun:
-  oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i

+ 0 - 28
lift-system-service/src/main/resources/application-local.yml

@@ -1,28 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://132.232.206.88:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: ms.c88pocY/
-    driver-class-name: com.mysql.cj.jdbc.Driver
-
-
-  #redis缓存配置
-  redis:
-    database: 0 #数据库索引,默认为0
-    host: 132.232.206.88 #服务器地址
-    port: 6379 #端口
-    password: mdx12358 #验证密码
-    jedis:
-      pool:
-        max-active: 8 #最大连接数
-        max-idle: 8 #最大空闲链接
-        max-wait: 20000ms
-        min-idle: 0
-
-#aliyun OSS服务配置信息,加载到SystemConfiguration
-aliyun:
-  oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i

+ 6 - 7
lift-batch-service/src/main/resources/application-local.yml

@@ -1,24 +1,23 @@
 spring:
   datasource:
-    url: jdbc:mysql://132.232.206.88:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: ms.c88pocY/
+    url: jdbc:mysql://rm-bp1qkwy173koi066x.mysql.rds.aliyuncs.com:3306/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+    username: tykj
+    password: Tdkg-13250409
     driver-class-name: com.mysql.cj.jdbc.Driver
 
-
   #redis缓存配置
   redis:
     database: 0 #数据库索引,默认为0
-    host: 132.232.206.88 #服务器地址
+    host: r-bp1j7odydtfqtprdvm.redis.rds.aliyuncs.com #(内网地址,上线改为内网地址)服务器地址
     port: 6379 #端口
-    password: mdx12358 #验证密码
+    password: Gdkc-290431 #验证密码
     jedis:
       pool:
         max-active: 8 #最大连接数
         max-idle: 8 #最大空闲链接
         max-wait: 20000ms
         min-idle: 0
-    timeout: 600000
+    timeout: 600000s
 
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:

lift-system-service/src/main/resources/application-web.yml → lift-system-service/src/main/resources/application-test.yml


+ 1 - 1
lift-system-service/src/main/resources/application.yml

@@ -14,7 +14,7 @@ spring:
   application:
     name: lift-system-service
   profiles:
-    active: web
+    active: test
 
 #自动添加createTime、isDelete 等字段
 xwy:

+ 1 - 1
lift-system-service/src/main/resources/bootstrap.yml

@@ -20,5 +20,5 @@ eureka:
     lease-expiration-duration-in-seconds: 20
   client:
     service-url:
-      defaultZone: http://localhost:10225/eureka/
+      defaultZone: http://172.16.24.142:10225/eureka/
 

+ 96 - 0
lift-system-service/src/main/resources/mapper/CommonDataMapper.xml

@@ -141,4 +141,100 @@
     <!--#############################电梯日历数据库代码####################################-->
     <!--################################################################################-->
 
+    <!-- 获取当前时间到月末时间段内的公司维保计划 -->
+    <select id="getMonthNowToEndMtPlan"
+            parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
+            resultType="cn.com.ty.lift.system.homepage.dao.model.MtPlanDataModel">
+        select
+            <include refid="liftInfoSql"></include>
+            mp.plan_date as planDate,
+            mp.status as status
+        from
+            maintenance_plan mp
+        left join
+            lift l
+        on
+            mp.lift_id = l.id
+            <include refid="liftInfoJoinSql"></include>
+        where
+            mp.mt_company_id = #{mtCompanyId}
+        and
+            mp.plan_date <![CDATA[ >= ]]> #{monthEndStr}
+        and
+            mp.plan_date <![CDATA[ <= ]]> #{monthEndStr}
+
+    </select>
+
+    <!-- 获取月初到当前时间段内公司的维保记录信息 -->
+    <select id="getMonthBeginToNowMtRecord"
+            parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
+            resultType="cn.com.ty.lift.system.homepage.dao.model.MtRecordDataModel">
+        select
+            <include refid="liftInfoSql"></include>
+            mr.work_date as workDate,
+            mr.status as status
+        from
+            maintenance_record mr
+        left join
+            lift l
+        on
+            mr.lift_id = l.id
+            <include refid="liftInfoJoinSql"></include>
+        where
+            mr.mt_company_id = #{mtCompanyId}
+        and
+            mr.work_date <![CDATA[ >= ]]> #{monthBeginStr}
+        and
+            mr.work_date <![CDATA[ <= ]]> #{monthEndStr}
+
+    </select>
+
+    <!-- 获取月初到当前时间段内公司的急修记录信息 -->
+    <select id="getMonthBeginToNowEmergencyRecord"
+            parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
+            resultType="cn.com.ty.lift.system.homepage.dao.model.EmergencyRecordDataModel">
+        select
+            <include refid="liftInfoSql"></include>
+            er.caller_date as callerDate,
+            er.recovery_date as recoveryDate,
+            er.status as status
+        from
+            emergency_repair er
+        left join
+            lift l
+        on
+            er.lift_id = l.id
+            <include refid="liftInfoJoinSql"></include>
+        where
+            er.mt_company_id = #{mtCompanyId}
+        and
+            er.caller_date <![CDATA[ >= ]]> #{monthBeginStr}
+        and
+            er.caller_date <![CDATA[ <= ]]> #{monthEndStr}
+
+    </select>
+
+    <!-- 获取本月时间段内的年检记录信息 -->
+    <select id="getMonthBeginToEndAnnualInspectionRecord"
+            parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
+            resultType="cn.com.ty.lift.system.homepage.dao.model.AnnualInspectionDataModel">
+        select
+            <include refid="liftInfoSql"></include>
+            ai.finish_time as finishTime,
+            ai.status as status
+        from
+            annual_inspection ai
+        left join
+            lift l
+        on
+            ai.lift_id = l.id
+            <include refid="liftInfoJoinSql"></include>
+        where
+            ai.mt_company_id = #{mtCompanyId}
+        and
+            ai.finish_time <![CDATA[ >= ]]> #{monthBeginStr}
+        and
+            ai.finish_time <![CDATA[ <= ]]> #{monthEndStr}
+    </select>
+
 </mapper>