add - 壳胆绑定报表

master
zhouhy 5 months ago
parent 9d5f912e84
commit 2bbce9f5c5

@ -1,5 +1,6 @@
package com.aucma.report.controller;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.core.page.TableDataInfo;
@ -233,4 +234,26 @@ public class ProductionReportController extends BaseController {
ExcelUtil<BoxTurnoverTraceabilityDetailReport> util = new ExcelUtil<>(BoxTurnoverTraceabilityDetailReport. class);
util.exportExcel(response, list, "箱体流转追溯详情报表" );
}
/**
*
* */
@GetMapping("/codeBandingReportList")
public TableDataInfo codeBandingReportList(@RequestParam(required = false) Map hashMap){
startPage();
List<codeBanding> list = productionReportService.codeBandingReportList(hashMap);
return getDataTable(list);
}
/**
*
* */
@PostMapping("/codeBandingReportList/export")
public void codeBandingReportListExport(HttpServletResponse response,@RequestParam(required = false) Map hashMap){
hashMap.put("pageNum",null);
hashMap.put("pageSize",null);
List<codeBanding> list = productionReportService.codeBandingReportList(hashMap);
ExcelUtil<codeBanding> util = new ExcelUtil<>(codeBanding.class);
util.exportExcel(response,list,"壳胆绑定报表");
}
}

@ -0,0 +1,148 @@
package com.aucma.report.domain;
import com.aucma.common.annotation.Excel;
import com.aucma.common.annotation.Log;
import com.aucma.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
/**
* @ClassName : boxBandIng
* @Description :
* @Author :
* @Date: 2024-05-29 15:48
*/
public class codeBanding extends BaseEntity {
private static final long serialVersionUID = 1L;
@Excel(name = "产线编号")
@JsonProperty("PRODUCT_LINE_CODE")
private String PRODUCT_LINE_CODE;
@Excel(name = "产线名称")
@JsonProperty("PRODUCT_LINE_NAME")
private String PRODUCT_LINE_NAME;
@Excel(name = "SAP订单编号")
@JsonProperty("ORDER_CODE")
private Long ORDER_CODE;
@Excel(name = "箱体码")
@JsonProperty("BOX_CODE")
private String BOX_CODE;
@Excel(name = "箱体型号")
@JsonProperty("BOX_NAME")
private String BOX_NAME;
@Excel(name = "内胆码")
@JsonProperty("LINER_CODE")
private String LINER_CODE;
@Excel(name = "内胆型号")
@JsonProperty("LINER_NAME")
private String LINER_NAME;
@Excel(name = "壳胆绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("RECORD_TIME1")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String RECORD_TIME1;
@Excel(name = "产品SN码绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("RECORD_TIME2")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String RECORD_TIME2;
@Excel(name = "产品SN码")
@JsonProperty("PRODUCT_CODE")
private String PRODUCT_CODE;
public String getPRODUCT_LINE_CODE() {
return PRODUCT_LINE_CODE;
}
public void setPRODUCT_LINE_CODE(String PRODUCT_LINE_CODE) {
this.PRODUCT_LINE_CODE = PRODUCT_LINE_CODE;
}
public String getPRODUCT_LINE_NAME() {
return PRODUCT_LINE_NAME;
}
public void setPRODUCT_LINE_NAME(String PRODUCT_LINE_NAME) {
this.PRODUCT_LINE_NAME = PRODUCT_LINE_NAME;
}
public Long getORDER_CODE() {
return ORDER_CODE;
}
public void setORDER_CODE(Long ORDER_CODE) {
this.ORDER_CODE = ORDER_CODE;
}
public String getBOX_CODE() {
return BOX_CODE;
}
public void setBOX_CODE(String BOX_CODE) {
this.BOX_CODE = BOX_CODE;
}
public String getBOX_NAME() {
return BOX_NAME;
}
public void setBOX_NAME(String BOX_NAME) {
this.BOX_NAME = BOX_NAME;
}
public String getLINER_CODE() {
return LINER_CODE;
}
public void setLINER_CODE(String LINER_CODE) {
this.LINER_CODE = LINER_CODE;
}
public String getLINER_NAME() {
return LINER_NAME;
}
public void setLINER_NAME(String LINER_NAME) {
this.LINER_NAME = LINER_NAME;
}
public String getRECORD_TIME1() {
return RECORD_TIME1;
}
public void setRECORD_TIME1(String RECORD_TIME1) {
this.RECORD_TIME1 = RECORD_TIME1;
}
public String getRECORD_TIME2() {
return RECORD_TIME2;
}
public void setRECORD_TIME2(String RECORD_TIME2) {
this.RECORD_TIME2 = RECORD_TIME2;
}
public String getPRODUCT_CODE() {
return PRODUCT_CODE;
}
public void setPRODUCT_CODE(String PRODUCT_CODE) {
this.PRODUCT_CODE = PRODUCT_CODE;
}
@Override
public String toString() {
return "codeBanding{" +
"PRODUCT_LINE_CODE='" + PRODUCT_LINE_CODE + '\'' +
", PRODUCT_LINE_NAME='" + PRODUCT_LINE_NAME + '\'' +
", ORDER_CODE=" + ORDER_CODE +
", BOX_CODE='" + BOX_CODE + '\'' +
", BOX_NAME='" + BOX_NAME + '\'' +
", LINER_CODE='" + LINER_CODE + '\'' +
", LINER_NAME='" + LINER_NAME + '\'' +
", RECORD_TIME1='" + RECORD_TIME1 + '\'' +
", RECORD_TIME2='" + RECORD_TIME2 + '\'' +
", PRODUCT_CODE='" + PRODUCT_CODE + '\'' +
'}';
}
}

@ -1,7 +1,6 @@
package com.aucma.report.mapper;
import com.aucma.report.domain.*;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
@ -179,4 +178,9 @@ public interface GeneralReportMapper {
List<WeldLeakRateReport> weldLeakRateList(Map hashMap);
//月
List<WeldLeakRateReport> weldLeakRateListMonth(Map hashMap);
/**
*
* */
List<codeBanding> codeBandingReportList(Map hashMap);
}

@ -77,4 +77,8 @@ public interface IProductionReportService
* @return
*/
List<WIPInquiryDetailReport> WIPInquiryDetailReportList(Map hashMap);
/**
*
* */
List<codeBanding> codeBandingReportList(Map hashMap);
}

@ -1,17 +1,12 @@
package com.aucma.report.service.impl;
import com.aucma.common.utils.DateUtils;
import com.aucma.report.domain.*;
import com.aucma.report.mapper.GeneralReportMapper;
import com.aucma.report.service.IProductionReportService;
import com.fasterxml.jackson.databind.ext.SqlBlobSerializer;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* PDAService
@ -114,4 +109,13 @@ public class ProductionReportServiceImpl implements IProductionReportService {
return reportMapper.WIPInquiryDetailReportList(hashMap);
}
/**
*
* */
@Override
public List<codeBanding> codeBandingReportList(Map hashMap) {
List<codeBanding> codeBandings = reportMapper.codeBandingReportList(hashMap);
return codeBandings;
}
}

@ -1094,4 +1094,42 @@
</select>
<select id="codeBandingReportList" resultType="com.aucma.report.domain.codeBanding"
parameterType="java.util.HashMap">
SELECT BP.PRODUCT_LINE_CODE, -- 产线编号
BP.PRODUCT_LINE_NAME, -- 产线名称
BO.ORDER_CODE, --SAP订单编号
CB.BOX_CODE, -- 箱体码
GET_MATERIAL_TYPE(P1.MATERIAL_NAME) BOX_NAME, -- 箱体型号
CB.LINER_CODE, -- 内胆码
GET_MATERIAL_TYPE(P2.MATERIAL_NAME) LINER_NAME, -- 内胆型号
CB.RECORD_TIME1, -- 壳胆绑定时间
CB.PRODUCT_CODE, -- 产品SN码
CB.RECORD_TIME2 -- 产品SN码绑定时间
FROM C##AUCMA_SCADA.CODE_BINDING CB
LEFT JOIN C##AUCMA_SCADA.PRINT_BARCODE P1 ON P1.MATERIAL_BARCODE = CB.BOX_CODE
LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = P1.ORDER_CODE
LEFT JOIN BASE_PRODUCTLINE BP on BO.WORK_CENTER_CODE = BP.WORK_CENTER_CODE
LEFT JOIN C##AUCMA_SCADA.PRINT_BARCODE P2 ON P2.MATERIAL_BARCODE = CB.LINER_CODE
<where>
<if test="productLineCode != null and productLineCode != ''">
AND BP.PRODUCT_LINE_CODE = #{productLineCode}
</if>
<if test="boxCode != null and boxCode != ''">
AND CB.BOX_CODE = #{boxCode}
</if>
<if test="orderCode != null and orderCode != ''">
AND BO.ORDER_CODE = #{orderCode}
</if>
<if test="linerCode != null and linerCode != ''">
AND CB.LINER_CODE = #{linerCode}
</if>
<if test="recordBeginTime!=null and recordBeginTime != '' and recordEndTime != null and recordEndTime != ''">
AND TO_CHAR(CB.RECORD_TIME1, 'YYYY-MM-DD HH-mm-ss') BETWEEN #{recordBeginTime} AND #{recordEndTime}
</if>
</where>
ORDER BY RECORD_TIME1 DESC
</select>
</mapper>

Loading…
Cancel
Save