diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java index 0e1327f..8de82a9 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java @@ -55,8 +55,8 @@ public class WoPackagingBoxController { @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "boxNo", value = "boxid", paramType = "query", dataTypeClass = String.class), - @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class), - @ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class), +// @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class), +// @ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class) }) @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:page')") @@ -142,8 +142,8 @@ public class WoPackagingBoxController { @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), @ApiImplicitParam(name = "boxNo", value = "boxid", paramType = "query", dataTypeClass = String.class), - @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class), - @ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class), +// @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class), +// @ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class) }) public void exportSubstrateList(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java index cbe07e4..2492079 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java @@ -36,6 +36,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import java.text.DecimalFormat; +import java.time.LocalDateTime; import java.util.List; import java.util.Map; @@ -286,10 +287,35 @@ public class WoPackagingBoxSubstrateController { return new Result(); } - @GetMapping("substrateList/{woSubstrateId}") - @ApiOperation("模组信息查询") - public List substrateList(@PathVariable("woSubstrateId") String woSubstrateId){ - return woPackagingBoxSubstrateService.substrateList(woSubstrateId); + @GetMapping("substrateList") + @ApiOperation("装箱单信息查询") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "packagingBoxId", value = "包装箱ID,BoxId", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "woSubstrateId", value = "基板ID(关联T_SUBSTRATE表)", paramType = "query", dataTypeClass = String.class) + + }) + public List substrateList(@ApiIgnore @RequestParam Map params){ + return woPackagingBoxSubstrateService.substrateList(params); } + @GetMapping("exportPackingInfo") + @ApiOperation("装箱单信息导出") + @LogOperation("装箱单信息导出") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "packagingBoxId", value = "包装箱ID,BoxId", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "woSubstrateId", value = "基板ID(关联T_SUBSTRATE表)", paramType = "query", dataTypeClass = String.class) + + }) + public void exportPackingInfo(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = woPackagingBoxSubstrateService.list(params); + if(list.size()>0) { + ExcelUtils.exportExcelToTarget(response, "装箱单信息", list, WoPackagingBoxSubstrateExcel.class); + } + } } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java index f00db57..45d9871 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java +++ b/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java @@ -1,6 +1,7 @@ package com.cnbm.packing.excel; import cn.afterturn.easypoi.excel.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; @@ -18,12 +19,12 @@ import java.util.Date; public class WoPackagingBoxSubstrateExcel { @Excel(name = "创建时间") - private LocalDateTime createTime; + private LocalDateTime boxCreateTime; @Excel(name = "模组ID") private String woSubstrateId; - @Excel(name = "Box_ID") + @Excel(name = "BoxID") private String packagingBoxId; - @Excel(name = "BOX_SLOT") + @Excel(name = "模组所在包装箱位置") private Integer slot; @Excel(name = "档位功率") private String powerLevel; @@ -37,5 +38,7 @@ public class WoPackagingBoxSubstrateExcel { private Integer lineBody; @Excel(name = "SAP物料号") private String sapMaterial; + @Excel(name = "最近打印时间") + private LocalDateTime printTime; } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/mapper/WoPackagingBoxSubstrateMapper.java b/ym-packing/src/main/java/com/cnbm/packing/mapper/WoPackagingBoxSubstrateMapper.java index f8241ac..5f1c101 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/mapper/WoPackagingBoxSubstrateMapper.java +++ b/ym-packing/src/main/java/com/cnbm/packing/mapper/WoPackagingBoxSubstrateMapper.java @@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper; import java.time.LocalDateTime; import java.util.List; +import java.util.Map; /** * 包装箱基板关联表 @@ -27,5 +28,5 @@ public interface WoPackagingBoxSubstrateMapper extends BaseDao powerReport(@Param("queryParam") PowerReportQueryParam queryParam); List orderNameList(); - List substrateList(@Param("woSubstrateId") String woSubstrateId); + List substrateList(Map params); } diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java index 34db86f..ead64c8 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java @@ -39,7 +39,7 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService substrateList (String woSubstrateId); + List substrateList (Map params); int updatePackagingBoxIdAndSlotByWoSubstrateId(String packagingBoxId,Integer slot,String woSubstrateId); diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java index f55250d..3af7f22 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java @@ -61,24 +61,23 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl substrateList(String woSubstrateId) { - return mapper.substrateList(woSubstrateId); + public List substrateList(Map params) { + return mapper.substrateList(params); } @Override diff --git a/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml b/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml index aa8eb5c..7380393 100644 --- a/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml +++ b/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml @@ -124,9 +124,16 @@ from t_wo_packaging_box_substrate twpbs left join t_wo_packaging_box twpb on twpbs.PACKAGING_BOX_ID = twpb.BOX_NO + twpb.model = #{model} and twpbs.WO_SUBSTRATE_ID like CONCAT(CONCAT('%',#{woSubstrateId}),'%') + + and twpbs.PACKAGING_BOX_ID like CONCAT(CONCAT('%',#{packagingBoxId}),'%') + + + and twpb.CREATE_TIME between #{startTime} AND #{endTime} + AND twpbs.valid = 1 order by twpb.CREATE_TIME desc