From bb0ac02cc851a8e84a7203093de511ee5da03793 Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Tue, 14 Nov 2023 11:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=98=E6=88=BF=E7=9C=8B=E6=9D=BF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op-modules/op-mes/push-mes.bat | 40 ++++++++++ .../com/op/mes/domain/BufferInfoParam.java | 40 ++++++++++ .../op/mes/domain/buffer/JsonRootBean.java | 47 +++++++++++ .../com/op/mes/domain/buffer/Locations.java | 78 +++++++++++++++++++ 4 files changed, 205 insertions(+) create mode 100644 op-modules/op-mes/push-mes.bat create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/BufferInfoParam.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/JsonRootBean.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/Locations.java diff --git a/op-modules/op-mes/push-mes.bat b/op-modules/op-mes/push-mes.bat new file mode 100644 index 00000000..83e17207 --- /dev/null +++ b/op-modules/op-mes/push-mes.bat @@ -0,0 +1,40 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-mes.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-mes +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/BufferInfoParam.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/BufferInfoParam.java new file mode 100644 index 00000000..d88bd8ca --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/BufferInfoParam.java @@ -0,0 +1,40 @@ +package com.op.mes.domain; + +public class BufferInfoParam { + private String reqCode; + private String reqTime; + private String factory; + private String bufferType; + + public String getReqCode() { + return reqCode; + } + + public void setReqCode(String reqCode) { + this.reqCode = reqCode; + } + + public String getReqTime() { + return reqTime; + } + + public void setReqTime(String reqTime) { + this.reqTime = reqTime; + } + + public String getFactory() { + return factory; + } + + public void setFactory(String factory) { + this.factory = factory; + } + + public String getBufferType() { + return bufferType; + } + + public void setBufferType(String bufferType) { + this.bufferType = bufferType; + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/JsonRootBean.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/JsonRootBean.java new file mode 100644 index 00000000..3071384f --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/JsonRootBean.java @@ -0,0 +1,47 @@ +/** + * Copyright 2023 json.cn + */ +package com.op.mes.domain.buffer; +import java.util.List; + +/** + * Auto-generated: 2023-11-10 11:26:39 + * + * @author json.cn (i@json.cn) + * @website http://www.json.cn/java2pojo/ + */ +public class JsonRootBean { + + private String reqCode; + private int code; + private String message; + private List locations; + public void setReqCode(String reqCode) { + this.reqCode = reqCode; + } + public String getReqCode() { + return reqCode; + } + + public void setCode(int code) { + this.code = code; + } + public int getCode() { + return code; + } + + public void setMessage(String message) { + this.message = message; + } + public String getMessage() { + return message; + } + + public void setLocations(List locations) { + this.locations = locations; + } + public List getLocations() { + return locations; + } + +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/Locations.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/Locations.java new file mode 100644 index 00000000..e4e2dfa1 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/buffer/Locations.java @@ -0,0 +1,78 @@ +/** + * Copyright 2023 json.cn + */ +package com.op.mes.domain.buffer; + +/** + * Auto-generated: 2023-11-10 11:26:39 + * + * @author json.cn (i@json.cn) + * @website http://www.json.cn/java2pojo/ + */ +public class Locations { + + private String location; + private String bufferType; + private boolean isBooked; + private boolean isUsed; + private boolean isOccupeid; + private String rfid; + private String reason; + private String sku; + public void setLocation(String location) { + this.location = location; + } + public String getLocation() { + return location; + } + + public void setBufferType(String bufferType) { + this.bufferType = bufferType; + } + public String getBufferType() { + return bufferType; + } + + public void setIsBooked(boolean isBooked) { + this.isBooked = isBooked; + } + public boolean getIsBooked() { + return isBooked; + } + + public void setIsUsed(boolean isUsed) { + this.isUsed = isUsed; + } + public boolean getIsUsed() { + return isUsed; + } + + public void setIsOccupeid(boolean isOccupeid) { + this.isOccupeid = isOccupeid; + } + public boolean getIsOccupeid() { + return isOccupeid; + } + + public void setRfid(String rfid) { + this.rfid = rfid; + } + public String getRfid() { + return rfid; + } + + public void setReason(String reason) { + this.reason = reason; + } + public String getReason() { + return reason; + } + + public void setSku(String sku) { + this.sku = sku; + } + public String getSku() { + return sku; + } + +}