From fda109f122d9dea9b66e0e902707be0a1aa43288 Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 5 Mar 2024 15:13:59 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=89=AB=E6=8F=8F=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProductOffLineController.java | 59 +++ .../aucma/report/domain/ProductOffLine.java | 393 ++++++++++++++++++ .../report/mapper/ProductOffLineMapper.java | 24 ++ .../service/IProductOffLineService.java | 25 ++ .../impl/ProductOffLineServiceImpl.java | 34 ++ .../mapper/report/ProductOffLineMapper.xml | 104 +++++ 6 files changed, 639 insertions(+) create mode 100644 aucma-report/src/main/java/com/aucma/report/controller/ProductOffLineController.java create mode 100644 aucma-report/src/main/java/com/aucma/report/domain/ProductOffLine.java create mode 100644 aucma-report/src/main/java/com/aucma/report/mapper/ProductOffLineMapper.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/IProductOffLineService.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/impl/ProductOffLineServiceImpl.java create mode 100644 aucma-report/src/main/resources/mapper/report/ProductOffLineMapper.xml diff --git a/aucma-report/src/main/java/com/aucma/report/controller/ProductOffLineController.java b/aucma-report/src/main/java/com/aucma/report/controller/ProductOffLineController.java new file mode 100644 index 0000000..00667d8 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/controller/ProductOffLineController.java @@ -0,0 +1,59 @@ +package com.aucma.report.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.aucma.common.utils.DateUtils; +import org.springframework.security.access.prepost.PreAuthorize; +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.aucma.common.annotation.Log; +import com.aucma.common.core.controller.BaseController; +import com.aucma.common.core.domain.AjaxResult; +import com.aucma.common.enums.BusinessType; +import com.aucma.report.domain.ProductOffLine; +import com.aucma.report.service.IProductOffLineService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 扫描下线记录报表Controller + * + * @author Yinq + * @date 2024-03-05 + */ +@RestController +@RequestMapping("/report/productOffLine") +public class ProductOffLineController extends BaseController { + @Autowired + private IProductOffLineService productOffLineService; + + /** + * 查询扫描下线记录报表列表 + */ + @GetMapping("/list") + public TableDataInfo list(ProductOffLine productOffLine) { + startPage(); + List list = productOffLineService.selectProductOffLineList(productOffLine); + return getDataTable(list); + } + + /** + * 导出扫描下线记录报表列表 + */ + @Log(title = "扫描下线记录报表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductOffLine productOffLine) { + List list = productOffLineService.selectProductOffLineList(productOffLine); + ExcelUtil util = new ExcelUtil(ProductOffLine.class); + util.exportExcel(response, list, "扫描下线记录报表数据"); + } + +} diff --git a/aucma-report/src/main/java/com/aucma/report/domain/ProductOffLine.java b/aucma-report/src/main/java/com/aucma/report/domain/ProductOffLine.java new file mode 100644 index 0000000..0c2a7b1 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/domain/ProductOffLine.java @@ -0,0 +1,393 @@ +package com.aucma.report.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.aucma.common.annotation.Excel; +import com.aucma.common.core.domain.BaseEntity; + +/** + * 扫描下线记录报表对象 product_offline + * + * @author Yinq + * @date 2024-03-05 + */ +public class ProductOffLine extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 计划工厂 + */ + @Excel(name = "计划工厂") + private String productFactoryCode; + + /** + * 公司条码 + */ + @Excel(name = "公司条码") + private String productSncode; + + /** + * 工单号 + */ + @Excel(name = "工单号") + private String productOrderNo; + + /** + * 销售订单号 + */ + @Excel(name = "销售订单号") + private String productSaleNo; + + /** + * 销售行号 + */ + @Excel(name = "销售行号") + private String productSaleLineNo; + + /** + * 物料编码 + */ + @Excel(name = "物料编码") + private String productCode; + + /** + * 产品型号 + */ + @Excel(name = "产品型号") + private String productModel; + + /** + * 物料描述 + */ + @Excel(name = "物料描述") + private String productName; + + /** + * 产品类型 + */ + @Excel(name = "产品类型") + private String productType; + + /** + * 验证组合 + */ + @Excel(name = "验证组合") + private String productCheckInfo; + + /** + * 标签特征 + */ + @Excel(name = "标签特征") + private String productRemark; + + /** + * 产品条码编码 + */ + @Excel(name = "产品条码编码") + private String productBarNo; + + /** + * 主型号 + */ + @Excel(name = "主型号") + private String productMasterModel; + + /** + * 版本号 + */ + @Excel(name = "版本号") + private String productVersion; + + /** + * 用途位 + */ + @Excel(name = "用途位") + private String productUserinfo; + + /** + * 流通特性 + */ + @Excel(name = "流通特性") + private String productCirculate; + + /** + * 生成日期 + */ + private String productCreatedate; + + /** + * 扫描时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "扫描时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date productScantime; + + /** + * 箱体码 + */ + @Excel(name = "箱体码") + private String boxCode; + + /** + * 产线编号 + */ + @Excel(name = "产线编号") + private String productLineCode; + + /** + * 产线名称 + */ + @Excel(name = "产线名称") + private String productLineName; + + /** + * 工厂名称 + */ + @Excel(name = "工厂名称") + private String factoryName; + + /** + * 查询扫描开始时间 + */ + private String beginBeginTime; + + /** + * 查询扫描结束时间 + */ + private String endBeginTime; + + public String getBeginBeginTime() { + return beginBeginTime; + } + + public void setBeginBeginTime(String beginBeginTime) { + this.beginBeginTime = beginBeginTime; + } + + public String getEndBeginTime() { + return endBeginTime; + } + + public void setEndBeginTime(String endBeginTime) { + this.endBeginTime = endBeginTime; + } + + public String getProductLineName() { + return productLineName; + } + + public void setProductLineName(String productLineName) { + this.productLineName = productLineName; + } + + public String getFactoryName() { + return factoryName; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setProductFactoryCode(String productFactoryCode) { + this.productFactoryCode = productFactoryCode; + } + + public String getProductFactoryCode() { + return productFactoryCode; + } + + public void setProductSncode(String productSncode) { + this.productSncode = productSncode; + } + + public String getProductSncode() { + return productSncode; + } + + public void setProductOrderNo(String productOrderNo) { + this.productOrderNo = productOrderNo; + } + + public String getProductOrderNo() { + return productOrderNo; + } + + public void setProductSaleNo(String productSaleNo) { + this.productSaleNo = productSaleNo; + } + + public String getProductSaleNo() { + return productSaleNo; + } + + public void setProductSaleLineNo(String productSaleLineNo) { + this.productSaleLineNo = productSaleLineNo; + } + + public String getProductSaleLineNo() { + return productSaleLineNo; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductCode() { + return productCode; + } + + public void setProductModel(String productModel) { + this.productModel = productModel; + } + + public String getProductModel() { + return productModel; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductName() { + return productName; + } + + public void setProductType(String productType) { + this.productType = productType; + } + + public String getProductType() { + return productType; + } + + public void setProductCheckInfo(String productCheckInfo) { + this.productCheckInfo = productCheckInfo; + } + + public String getProductCheckInfo() { + return productCheckInfo; + } + + public void setProductRemark(String productRemark) { + this.productRemark = productRemark; + } + + public String getProductRemark() { + return productRemark; + } + + public void setProductBarNo(String productBarNo) { + this.productBarNo = productBarNo; + } + + public String getProductBarNo() { + return productBarNo; + } + + public void setProductMasterModel(String productMasterModel) { + this.productMasterModel = productMasterModel; + } + + public String getProductMasterModel() { + return productMasterModel; + } + + public void setProductVersion(String productVersion) { + this.productVersion = productVersion; + } + + public String getProductVersion() { + return productVersion; + } + + public void setProductUserinfo(String productUserinfo) { + this.productUserinfo = productUserinfo; + } + + public String getProductUserinfo() { + return productUserinfo; + } + + public void setProductCirculate(String productCirculate) { + this.productCirculate = productCirculate; + } + + public String getProductCirculate() { + return productCirculate; + } + + public void setProductCreatedate(String productCreatedate) { + this.productCreatedate = productCreatedate; + } + + public String getProductCreatedate() { + return productCreatedate; + } + + public void setProductScantime(Date productScantime) { + this.productScantime = productScantime; + } + + public Date getProductScantime() { + return productScantime; + } + + public void setBoxCode(String boxCode) { + this.boxCode = boxCode; + } + + public String getBoxCode() { + return boxCode; + } + + public void setProductLineCode(String productLineCode) { + this.productLineCode = productLineCode; + } + + public String getProductLineCode() { + return productLineCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("productFactoryCode", getProductFactoryCode()) + .append("productSncode", getProductSncode()) + .append("productOrderNo", getProductOrderNo()) + .append("productSaleNo", getProductSaleNo()) + .append("productSaleLineNo", getProductSaleLineNo()) + .append("productCode", getProductCode()) + .append("productModel", getProductModel()) + .append("productName", getProductName()) + .append("productType", getProductType()) + .append("productCheckInfo", getProductCheckInfo()) + .append("productRemark", getProductRemark()) + .append("productBarNo", getProductBarNo()) + .append("productMasterModel", getProductMasterModel()) + .append("productVersion", getProductVersion()) + .append("productUserinfo", getProductUserinfo()) + .append("productCirculate", getProductCirculate()) + .append("productCreatedate", getProductCreatedate()) + .append("productScantime", getProductScantime()) + .append("boxCode", getBoxCode()) + .append("productLineCode", getProductLineCode()) + .toString(); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/ProductOffLineMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/ProductOffLineMapper.java new file mode 100644 index 0000000..5779cf7 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/mapper/ProductOffLineMapper.java @@ -0,0 +1,24 @@ +package com.aucma.report.mapper; + +import java.util.List; +import com.aucma.report.domain.ProductOffLine; + +/** + * 扫描下线记录报表Mapper接口 + * + * @author Yinq + * @date 2024-03-05 + */ +public interface ProductOffLineMapper +{ + + /** + * 查询扫描下线记录报表列表 + * + * @param productOffLine 扫描下线记录报表 + * @return 扫描下线记录报表集合 + */ + public List selectProductOffLineList(ProductOffLine productOffLine); + + +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/IProductOffLineService.java b/aucma-report/src/main/java/com/aucma/report/service/IProductOffLineService.java new file mode 100644 index 0000000..9d9572e --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/IProductOffLineService.java @@ -0,0 +1,25 @@ +package com.aucma.report.service; + +import java.util.List; +import com.aucma.report.domain.ProductOffLine; + +/** + * 扫描下线记录报表Service接口 + * + * @author Yinq + * @date 2024-03-05 + */ +public interface IProductOffLineService +{ + + + /** + * 查询扫描下线记录报表列表 + * + * @param productOffLine 扫描下线记录报表 + * @return 扫描下线记录报表集合 + */ + public List selectProductOffLineList(ProductOffLine productOffLine); + + +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/ProductOffLineServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/ProductOffLineServiceImpl.java new file mode 100644 index 0000000..2598a1c --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/ProductOffLineServiceImpl.java @@ -0,0 +1,34 @@ +package com.aucma.report.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aucma.report.mapper.ProductOffLineMapper; +import com.aucma.report.domain.ProductOffLine; +import com.aucma.report.service.IProductOffLineService; + +/** + * 扫描下线记录报表Service业务层处理 + * + * @author Yinq + * @date 2024-03-05 + */ +@Service +public class ProductOffLineServiceImpl implements IProductOffLineService +{ + @Autowired + private ProductOffLineMapper productOffLineMapper; + + /** + * 查询扫描下线记录报表列表 + * + * @param productOffLine 扫描下线记录报表 + * @return 扫描下线记录报表 + */ + @Override + public List selectProductOffLineList(ProductOffLine productOffLine) + { + return productOffLineMapper.selectProductOffLineList(productOffLine); + } + +} diff --git a/aucma-report/src/main/resources/mapper/report/ProductOffLineMapper.xml b/aucma-report/src/main/resources/mapper/report/ProductOffLineMapper.xml new file mode 100644 index 0000000..514c2c8 --- /dev/null +++ b/aucma-report/src/main/resources/mapper/report/ProductOffLineMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT po.obj_id, + po.product_factory_code, + BF.FACTORY_NAME, + po.product_sncode, + po.product_order_no, + po.product_sale_no, + po.product_sale_line_no, + po.product_code, + po.product_model, + po.product_name, + po.product_type, + po.product_check_info, + po.product_remark, + po.product_bar_no, + po.product_master_model, + po.product_version, + po.product_userinfo, + po.product_circulate, + po.product_createdate, + po.product_scantime, + po.box_code, + po.product_line_code, + PL.PRODUCT_LINE_NAME + FROM VIEW_PRODUCT_OFFLINE po + LEFT JOIN BASE_FACTORY BF ON BF.FACTORY_CODE = po.product_factory_code + LEFT JOIN BASE_PRODUCTLINE PL ON PL.PRODUCT_LINE_CODE = po.product_line_code + + + + + \ No newline at end of file