检验报告

highway
zhaoxiaolin 1 year ago
parent 74bb98faa3
commit d04c1068f8

@ -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<QcStaticTable> 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<QcStaticTable> list = qcStaticTableService.selectQcStaticTableList(qcStaticTable);
ExcelUtil<QcStaticTable> util = new ExcelUtil<QcStaticTable>(QcStaticTable.class);
util.exportExcel(response, list, "质量系统报数据");
}
/**
*
*/
@RequiresPermissions("quality:gcTableProduce:list")
@GetMapping("/getProduceTableList")
public TableDataInfo getProduceList(QcStaticTable qcStaticTable) {
startPage();
List<QcStaticTable> 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<QcStaticTable> list = qcStaticTableService.selectQcStaticTableList(qcStaticTable);
ExcelUtil<QcStaticTable> util = new ExcelUtil<QcStaticTable>(QcStaticTable.class);
util.exportExcel(response, list, "质量系统报数据");
}
}

@ -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();
}
}

@ -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<QcStaticTable> selectQcStaticTableList(QcStaticTable qcStaticTable);
}

@ -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<QcStaticTable> selectQcStaticTableList(QcStaticTable qcStaticTable);
}

@ -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<QcStaticTable> selectQcStaticTableList(QcStaticTable qcStaticTable) {
return qcStaticTableMapper.selectQcStaticTableList(qcStaticTable);
}
}

@ -0,0 +1,12 @@
<?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.op.quality.mapper.QcStaticTableMapper">
<select id="selectQcStaticTableList" parameterType="QcStaticTable" resultType="QcStaticTable">
</select>
</mapper>

@ -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
Loading…
Cancel
Save