From d04c1068f89e7d531b17cc9eab1e63cd341bf84c Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 8 Nov 2023 18:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/QcStaticTableController.java | 72 ++++++++++ .../com/op/quality/domain/QcStaticTable.java | 123 ++++++++++++++++++ .../quality/mapper/QcStaticTableMapper.java | 25 ++++ .../service/IQcStaticTableService.java | 22 ++++ .../impl/QcStaticTableServiceImpl.java | 36 +++++ .../mapper/quality/QcStaticTableMapper.xml | 12 ++ op-modules/op-scada/push-scada.bat | 41 ++++++ 7 files changed, 331 insertions(+) create mode 100644 op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java create mode 100644 op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java create mode 100644 op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java create mode 100644 op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java create mode 100644 op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java create mode 100644 op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml create mode 100644 op-modules/op-scada/push-scada.bat diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java new file mode 100644 index 00000000..d5edb2a2 --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java @@ -0,0 +1,72 @@ +package com.op.quality.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.quality.domain.QcStaticTable; +import com.op.quality.service.IQcStaticTableService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 质量系统报Controller + * + * @author Open Platform + * @date 2023-11-08 + */ +@RestController +@RequestMapping("/staticTable") +public class QcStaticTableController extends BaseController { + @Autowired + private IQcStaticTableService qcStaticTableService; + + /** + * 来料质量报表 + */ + @RequiresPermissions("quality:qcTableIncome:list") + @GetMapping("/getIncomeTableList") + public TableDataInfo getIncomeTableList(QcStaticTable qcStaticTable) { + startPage(); + List list = qcStaticTableService.selectQcStaticTableList(qcStaticTable); + return getDataTable(list); + } + @RequiresPermissions("quality:qcTableIncome:list") + @Log(title = "质量系统报", businessType = BusinessType.EXPORT) + @PostMapping("/exportIncomeTableList") + public void exportIncomeTableList(HttpServletResponse response, QcStaticTable qcStaticTable) { + List list = qcStaticTableService.selectQcStaticTableList(qcStaticTable); + ExcelUtil util = new ExcelUtil(QcStaticTable.class); + util.exportExcel(response, list, "质量系统报数据"); + } + /** + * 生产过程质量报表 + */ + @RequiresPermissions("quality:gcTableProduce:list") + @GetMapping("/getProduceTableList") + public TableDataInfo getProduceList(QcStaticTable qcStaticTable) { + startPage(); + List list = qcStaticTableService.selectQcStaticTableList(qcStaticTable); + return getDataTable(list); + } + @RequiresPermissions("quality:gcTableProduce:list") + @Log(title = "质量系统报", businessType = BusinessType.EXPORT) + @PostMapping("/exportTableList") + public void exportTableList(HttpServletResponse response, QcStaticTable qcStaticTable) { + List list = qcStaticTableService.selectQcStaticTableList(qcStaticTable); + ExcelUtil util = new ExcelUtil(QcStaticTable.class); + util.exportExcel(response, list, "质量系统报数据"); + } +} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java new file mode 100644 index 00000000..742f7b0b --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java @@ -0,0 +1,123 @@ +package com.op.quality.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 质量系统报对象 qc_static_table + * + * @author Open Platform + * @date 2023-11-08 + */ +public class QcStaticTable extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 文件名称 */ + @Excel(name = "文件名称") + private String fileName; + + /** 文件地址 */ + @Excel(name = "文件地址") + private String fileAddress; + + /** 版本号 */ + @Excel(name = "版本号") + private String version; + + /** 备用1 */ + @Excel(name = "备用1") + private String attr1; + + /** 备用2 */ + @Excel(name = "备用2") + private String attr2; + + /** 备用3 */ + @Excel(name = "备用3") + private String attr3; + + /** 备用4 */ + @Excel(name = "备用4") + private String attr4; + + public void setId(String id) { + this.id = id; + } + + public String getId() { + return id; + } + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFileName() { + return fileName; + } + public void setFileAddress(String fileAddress) { + this.fileAddress = fileAddress; + } + + public String getFileAddress() { + return fileAddress; + } + public void setVersion(String version) { + this.version = version; + } + + public String getVersion() { + return version; + } + public void setAttr1(String attr1) { + this.attr1 = attr1; + } + + public String getAttr1() { + return attr1; + } + public void setAttr2(String attr2) { + this.attr2 = attr2; + } + + public String getAttr2() { + return attr2; + } + public void setAttr3(String attr3) { + this.attr3 = attr3; + } + + public String getAttr3() { + return attr3; + } + public void setAttr4(String attr4) { + this.attr4 = attr4; + } + + public String getAttr4() { + return attr4; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("fileName", getFileName()) + .append("fileAddress", getFileAddress()) + .append("version", getVersion()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java new file mode 100644 index 00000000..29c1483d --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java @@ -0,0 +1,25 @@ +package com.op.quality.mapper; + +import java.util.List; + +import com.op.quality.domain.QcStaticTable; +import org.apache.ibatis.annotations.Mapper; + +/** + * 质量系统报Mapper接口 + * + * @author Open Platform + * @date 2023-11-08 + */ +@Mapper +public interface QcStaticTableMapper { + + /** + * 查询质量系统报列表 + * + * @param qcStaticTable 质量系统报 + * @return 质量系统报集合 + */ + public List selectQcStaticTableList(QcStaticTable qcStaticTable); + +} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java new file mode 100644 index 00000000..96465603 --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java @@ -0,0 +1,22 @@ +package com.op.quality.service; + +import java.util.List; +import com.op.quality.domain.QcStaticTable; + +/** + * 质量系统报Service接口 + * + * @author Open Platform + * @date 2023-11-08 + */ +public interface IQcStaticTableService { + + /** + * 查询质量系统报列表 + * + * @param qcStaticTable 质量系统报 + * @return 质量系统报集合 + */ + public List selectQcStaticTableList(QcStaticTable qcStaticTable); + +} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java new file mode 100644 index 00000000..b9621b4d --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java @@ -0,0 +1,36 @@ +package com.op.quality.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.quality.mapper.QcStaticTableMapper; +import com.op.quality.domain.QcStaticTable; +import com.op.quality.service.IQcStaticTableService; + +/** + * 质量系统报Service业务层处理 + * + * @author Open Platform + * @date 2023-11-08 + */ +@Service +public class QcStaticTableServiceImpl implements IQcStaticTableService { + @Autowired + private QcStaticTableMapper qcStaticTableMapper; + + /** + * 查询质量系统报列表 + * + * @param qcStaticTable 质量系统报 + * @return 质量系统报 + */ + @Override + @DS("#header.poolName") + public List selectQcStaticTableList(QcStaticTable qcStaticTable) { + return qcStaticTableMapper.selectQcStaticTableList(qcStaticTable); + } + +} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml new file mode 100644 index 00000000..7d51383b --- /dev/null +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/op-modules/op-scada/push-scada.bat b/op-modules/op-scada/push-scada.bat new file mode 100644 index 00000000..41643686 --- /dev/null +++ b/op-modules/op-scada/push-scada.bat @@ -0,0 +1,41 @@ +@echo off +echo --------------------------------Զǰ޸-------------------------------------- +set jarName=op-modules-scada.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-scada +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 RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig +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