change - 产品追溯表加导出

master
yinq 8 months ago
parent d75525f51a
commit edf5f9236e

@ -3,14 +3,13 @@ package com.aucma.report.controller;
import com.aucma.common.core.controller.BaseController; import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult; import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.core.page.TableDataInfo; import com.aucma.common.core.page.TableDataInfo;
import com.aucma.common.utils.poi.ExcelUtil;
import com.aucma.report.domain.ProductTraceabilityReport; import com.aucma.report.domain.ProductTraceabilityReport;
import com.aucma.report.service.IQualityReportService; import com.aucma.report.service.IQualityReportService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -85,6 +84,18 @@ public class QualityReportController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
*
* @param hashMap
* @return
*/
@PostMapping("/productTraceabilityReportList/export" )
public void productTraceabilityReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) {
List<ProductTraceabilityReport> list = qualityReportService.productTraceabilityReportList(hashMap);
ExcelUtil<ProductTraceabilityReport> util = new ExcelUtil<>(ProductTraceabilityReport. class);
util.exportExcel(response, list, "产品追溯报表" );
}
/** /**
* *
* @param hashMap * @param hashMap

@ -2,6 +2,7 @@ package com.aucma.report.domain;
import com.aucma.common.annotation.Excel; import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity; import com.aucma.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* *
@ -16,63 +17,72 @@ public class ProductTraceabilityReport extends BaseEntity {
* 线 * 线
*/ */
@Excel(name = "产线编号") @Excel(name = "产线编号")
@JsonProperty("PRODUCT_LINE_CODE")
private String PRODUCT_LINE_CODE; private String PRODUCT_LINE_CODE;
/** /**
* 线 * 线
*/ */
@Excel(name = "产线名称") @Excel(name = "产线名称")
@JsonProperty("PRODUCT_LINE_NAME")
private String PRODUCT_LINE_NAME; private String PRODUCT_LINE_NAME;
/** /**
* SAP * SAP
*/ */
@Excel(name = "SAP订单编号") @Excel(name = "SAP订单编号")
@JsonProperty("ORDER_CODE")
private String ORDER_CODE; private String ORDER_CODE;
/** /**
* *
*/ */
@Excel(name = "销售订单编号") @Excel(name = "销售订单编号")
@JsonProperty("SALEORDER_CODE")
private String SALEORDER_CODE; private String SALEORDER_CODE;
/** /**
* *
*/ */
@Excel(name = "销售订单行号") @Excel(name = "销售订单行号")
@JsonProperty("SALEORDER_LINENUMBER")
private String SALEORDER_LINENUMBER; private String SALEORDER_LINENUMBER;
/** /**
* *
*/ */
@Excel(name = "物料编号") @Excel(name = "物料编号")
@JsonProperty("MATERIAL_CODE")
private String MATERIAL_CODE; private String MATERIAL_CODE;
/** /**
* *
*/ */
@Excel(name = "物料名称") @Excel(name = "物料名称")
@JsonProperty("MATERIAL_NAME")
private String MATERIAL_NAME; private String MATERIAL_NAME;
/** /**
* *
*/ */
@Excel(name = "成品条码") @Excel(name = "成品条码")
@JsonProperty("PRODUCT_SNCODE")
private String PRODUCT_SNCODE; private String PRODUCT_SNCODE;
/** /**
* MES * MES
*/ */
@Excel(name = "MES条码") @Excel(name = "MES条码")
@JsonProperty("BOX_CODE")
private String BOX_CODE; private String BOX_CODE;
/** /**
* 线 * 线
*/ */
@Excel(name = "下线时间") @Excel(name = "下线时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("PRODUCT_SCANTIME")
private String PRODUCT_SCANTIME; private String PRODUCT_SCANTIME;
public String getPRODUCT_LINE_CODE() { public String getPRODUCT_LINE_CODE() {
return PRODUCT_LINE_CODE; return PRODUCT_LINE_CODE;
} }

@ -60,7 +60,12 @@ public interface ReportQualityInspectionMapper
*/ */
public int deleteReportQualityInspectionByObjIds(Long[] objIds); public int deleteReportQualityInspectionByObjIds(Long[] objIds);
/**
* PDA
*
* @param stationCode
* @return
*/
public HashMap<String, Integer> pdaQueryQuantityNumber(String stationCode); public HashMap<String, Integer> pdaQueryQuantityNumber(String stationCode);
} }

@ -237,7 +237,7 @@
GROUP BY RQI.QUALITY_DEFECT_NAME) SD GROUP BY RQI.QUALITY_DEFECT_NAME) SD
</select> </select>
<select id="productTraceabilityReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap"> <select id="productTraceabilityReportList" resultType="ProductTraceabilityReport" parameterType="java.util.HashMap">
SELECT PL.PRODUCT_LINE_CODE, SELECT PL.PRODUCT_LINE_CODE,
PL.PRODUCT_LINE_NAME, PL.PRODUCT_LINE_NAME,
BO.ORDER_CODE, BO.ORDER_CODE,

Loading…
Cancel
Save