From ac4924865dd00ccf198bed444637791caf5ab022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E7=AC=91=E7=9D=80=E9=9D=A2=E5=AF=B9=E6=98=8E?= =?UTF-8?q?=E5=A4=A9?= <752558143@qq.com> Date: Tue, 9 Jul 2024 15:41:03 +0800 Subject: [PATCH] job --- .../busi/MesWorkCellScanMonitorLogServiceImpl.java | 4 +- .../src/main/resources/application-71.properties | 74 ++++------------------ .../src/main/resources/application-72.properties | 29 +++++++-- .../src/main/resources/application.properties | 4 +- .../src/main/resources/log4j2-spring-dev.xml | 32 ++++++++++ .../src/main/resources/log4j2-spring.xml | 32 ++++++++++ 6 files changed, 106 insertions(+), 69 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkCellScanMonitorLogServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkCellScanMonitorLogServiceImpl.java index 0bfa68f..4cbf76c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkCellScanMonitorLogServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkCellScanMonitorLogServiceImpl.java @@ -74,9 +74,9 @@ public class MesWorkCellScanMonitorLogServiceImpl implements IMesWorkCellScanMon } else { if (newTimes > times) { - monitorLogRao.updateByProperties(new String[]{"modifyDateTime", "modifyUser", "times"}, new Object[]{TimeTool.getNowTime(true), "JOB", newTimes}, monitorLogPackBean); + monitorLogRao.updateByProperties(new String[]{"modifyDatetime", "modifyUser", "times"}, new Object[]{TimeTool.getNowTime(true), "JOB", newTimes}, monitorLogPackBean); } else { - monitorLogRao.updateByProperties(new String[]{"modifyDateTime", "modifyUser", "times", "dealStatus"}, new Object[]{TimeTool.getNowTime(true), "JOB", newTimes, MesExtEnumUtil.MES_LOG_DEAL_STATUS.DEAL_FAILURE.getValue()}, monitorLogPackBean); + monitorLogRao.updateByProperties(new String[]{"modifyDatetime", "modifyUser", "times", "dealStatus"}, new Object[]{TimeTool.getNowTime(true), "JOB", newTimes, MesExtEnumUtil.MES_LOG_DEAL_STATUS.DEAL_FAILURE.getValue()}, monitorLogPackBean); } } } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-71.properties b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-71.properties index e34bd48..9974fbc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-71.properties +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-71.properties @@ -1,7 +1,7 @@ #\u9879\u76EE\u7AEF\u53E3 server.port=8350 #\u672C\u673Aip -impp.server.ip=10.196.74.30 +impp.server.ip=localhost #impp.server.ip=192.168.0.105 #andon ip impp.andon.url=http://10.195.88.71:8750 @@ -22,9 +22,9 @@ impp.cluster.fetch=false impp.cluster.regist.center=http://10.195.88.71:8000/eureka/ #\u65E5\u5FD7\u9ED8\u8BA4\u4F7F\u7528log4j2 logging.config=classpath:log4j2-spring.xml -mes.ws=ws://10.197.190.121:8300/ws/pcn-regist/ +mes.ws=ws://10.196.77.248:8300/ws/pcn-regist/ #mes-pcn.ws.path=ws://10.197.176.77:8350 -mes-pcn.ws.path=ws://10.196.74.30:8350 +mes-pcn.ws.path=ws://${impp.server.ip}:8350 pcn.code=PCN-U7 ########\u5E73\u53F0\u76F8\u5173\u53C2\u6570########## #\u662F\u5426\u5F00\u542Fredis\u7F13\u5B58 @@ -132,66 +132,18 @@ spring.zipkin.base-url=${impp.console.ip} spring.sleuth.sampler.probability=1.0 # mysql -#impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource -#impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver -#impp.write.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 -#impp.write.datasource.username=root -#impp.write.datasource.password=estsh123 -#impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource -#impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver -#impp.read.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 -#impp.read.datasource.username=root -#impp.read.datasource.password=estsh123 +impp.write.datasource.type=com.zaxxer.hikari.HikariDataSource +impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver +impp.write.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 +impp.write.datasource.username=root +impp.write.datasource.password=estsh123 +impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource +impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver +impp.read.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 +impp.read.datasource.username=root +impp.read.datasource.password=estsh123 # -###########################\u8BFB\u5199\u5206\u79BB####################################### - -spring.shardingsphere.datasource.names=master,slave -##\u5199\u5E93 -spring.shardingsphere.datasource.master.type=com.zaxxer.hikari.HikariDataSource -spring.shardingsphere.datasource.master.driver-class-name= com.mysql.jdbc.Driver -spring.shardingsphere.datasource.master.JdbcUrl=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 -spring.shardingsphere.datasource.master.username=root -spring.shardingsphere.datasource.master.password=estsh123 - -spring.shardingsphere.datasource.master.maximum-pool-size=400 -spring.shardingsphere.datasource.master.minimum-idle=200 -spring.shardingsphere.datasource.master.idle-timeout=500000 -spring.shardingsphere.datasource.master.connection-timeout=600000 -spring.shardingsphere.datasource.master.max-lifetime=7000000 -spring.shardingsphere.datasource.master.connection-test-query=select 1 -spring.shardingsphere.datasource.master.keep-alive-time=3500000 - -##\u8BFB\u5E93 -spring.shardingsphere.datasource.slave.type=com.zaxxer.hikari.HikariDataSource -spring.shardingsphere.datasource.slave.driver-class-name= com.mysql.jdbc.Driver -spring.shardingsphere.datasource.slave.JdbcUrl=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8 -spring.shardingsphere.datasource.slave.username=root -spring.shardingsphere.datasource.slave.password=estsh123 - -spring.shardingsphere.datasource.slave.maximum-pool-size=200 -spring.shardingsphere.datasource.slave.minimum-idle=200 -spring.shardingsphere.datasource.slave.idle-timeout=500000 -spring.shardingsphere.datasource.slave.connection-timeout=600000 -spring.shardingsphere.datasource.slave.max-lifetime=7000000 -spring.shardingsphere.datasource.slave.connection-test-query=select 1 -spring.shardingsphere.datasource.slave.keep-alive-time=3500000 - -##\u8BFB\u5199\u5206\u79BB\u914D\u7F6E -spring.shardingsphere.sharding.master-slave-rules.ds0.master-data-source-name=master -spring.shardingsphere.sharding.master-slave-rules.ds0.slave-data-source-names=slave - -#\u9ED8\u8BA4datasource \u9ED8\u8BA4\u6570\u636E\u6E90\uFF0C\u672A\u5206\u7247\u7684\u8868\u9ED8\u8BA4\u6267\u884C\u5E93 -#spring.shardingsphere.sharding.default-data-source-name=ds0 -#\u7CFB\u7EDF\u5C5E\u6027\uFF0C\u663E\u793A\u6B63\u5E38\u7684sql\u8BED\u53E5 -spring.shardingsphere.props.sql.show=false - -spring.shardingsphere.sharding.tables.mes_equipment_log.actual-data-nodes=ds0.mes_equipment_log_$->{1..100} -spring.shardingsphere.sharding.tables.mes_equipment_log.table-strategy.inline.sharding-column=equip_id -spring.shardingsphere.sharding.tables.mes_equipment_log.table-strategy.inline.algorithm-expression=mes_equipment_log_$->{equip_id} - -#\u7ED1\u5B9A\u8868 -spring.shardingsphere.sharding.binding-tables[0]=mes_equipment_log #\u4E2D\u822A\u6570\u636E\u6E90 ##############\u5B9A\u65F6\u4EFB\u52A1\u6301\u4E45\u5316############## diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-72.properties b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-72.properties index e34bd48..dff0204 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-72.properties +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application-72.properties @@ -1,7 +1,7 @@ #\u9879\u76EE\u7AEF\u53E3 server.port=8350 #\u672C\u673Aip -impp.server.ip=10.196.74.30 +impp.server.ip=10.196.77.248 #impp.server.ip=192.168.0.105 #andon ip impp.andon.url=http://10.195.88.71:8750 @@ -24,10 +24,10 @@ impp.cluster.regist.center=http://10.195.88.71:8000/eureka/ logging.config=classpath:log4j2-spring.xml mes.ws=ws://10.197.190.121:8300/ws/pcn-regist/ #mes-pcn.ws.path=ws://10.197.176.77:8350 -mes-pcn.ws.path=ws://10.196.74.30:8350 +mes-pcn.ws.path=ws://10.196.77.248:8350 pcn.code=PCN-U7 ########\u5E73\u53F0\u76F8\u5173\u53C2\u6570########## -#\u662F\u5426\u5F00\u542Fredis\u7F13\u5B58 +#\u662F\u5426\u5F00\u5x42Fredis\u7F13\u5B58 impp.config.redis=true #\u662F\u5426\u5F00\u542FrabbitMQ impp.config.rabbitmq=false @@ -249,4 +249,25 @@ pcn.schedule.job=true server.tomcat.max-threads=300 server.tomcat.max-connections=300 -plugin.mainPackage=cn.estsh.i3plus \ No newline at end of file +plugin.mainPackage=cn.estsh.i3plus + +#####\u5B9A\u65F6\u4EFB\u52A1 +impp.schedule.scheduleType=xxljob +xxl.job.admin.addresses=http://172.28.14.48:10010/xxl-job-admin +### xxl-job, access token +xxl.job.accessToken= +### xxl-job executor appname +#xxl.job.executor.appname=${project.name} +xxl.job.executor.appname=pcn +### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null +xxl.job.executor.address= +### xxl-job executor server-info +xxl.job.executor.ip=192.168.6.70 +#xxl.job.executor.ip= +#xxl.job.executor.port=9999 +xxl.job.executor.port=9999 +### xxl-job executor log-path +xxl.job.executor.logpath= +### xxl-job executor log-retention-days +xxl.job.executor.logretentiondays=10 +xxl.job.basePackage=cn.estsh.i3plus.lac.scheduler.schedulejob \ No newline at end of file diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application.properties b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application.properties index 156f701..ccbee59 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application.properties +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/application.properties @@ -1,5 +1,5 @@ #\u4F7F\u7528\u914D\u7F6E -spring.profiles.active=72 +spring.profiles.active=71 #\u9879\u76EE\u63CF\u8FF0\u4FE1\u606F\uFF08swagger\u4E2D\u663E\u5F0F\uFF09\uFF0C\u4E2D\u6587\u4F7F\u7528uncode\u8F6C\u7801 desc.application.name=\u751F\u4EA7\u4E2D\u5FC3\u8282\u70B9 ######### \u81EA\u5B9A\u4E49\u53C2\u6570 ######### @@ -13,7 +13,7 @@ spring.message.encoding=UTF-8 #\u542F\u52A8\u65F6\u52A0\u8F7D\uFF0C\u9884\u52A0\u8F7Dcontroller spring.mvc.servlet.load-on-startup=1 #\u662F\u5426\u5141\u8BB8\u524D\u7AEF\u8DE8\u57DF\u63D0\u4EA4impp.web.cross.hosts -impp.web.cross=true +impp.web.cross=trueWorkCellCacheDataRedisFilterService #\u4E0A\u4F20\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F spring.servlet.multipart.max-file-size=10MB #request\u8BF7\u6C42\u5168\u90E8\u6570\u636E\u6700\u5927\u9650\u5236 diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring-dev.xml b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring-dev.xml index 527e43c..ab37fad 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring-dev.xml +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring-dev.xml @@ -22,6 +22,37 @@ ${info_pattern} + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -30,6 +61,7 @@ + \ No newline at end of file diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring.xml b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring.xml index b73cf84..ffba74c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring.xml +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/resources/log4j2-spring.xml @@ -113,6 +113,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -128,6 +159,7 @@ +