From abdcb0749227a736eff711ea5f69e5828c323256 Mon Sep 17 00:00:00 2001 From: yanyang Date: Tue, 28 Mar 2023 09:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E7=AE=B1=E5=8D=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WoPackagingBoxSubstrateController.java | 16 ++++--------- .../mapper/WoPackagingBoxSubstrateMapper.java | 4 +++- .../packing/param/PackingInfoQueryParam.java | 21 +++++++++++++++++ .../WoPackagingBoxSubstrateServiceBiz.java | 3 +++ ...WoPackagingBoxSubstrateServiceBizImpl.java | 10 ++++++++ .../mapper/WoPackagingBoxSubstrateMapper.xml | 23 ++++++++++++++++++- 6 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 ym-packing/src/main/java/com/cnbm/packing/param/PackingInfoQueryParam.java 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 7da01ab..abea93d 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 @@ -21,6 +21,7 @@ import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel; import com.cnbm.packing.excel.WoPackagingBoxSubstrateManualExcel; import com.cnbm.packing.mapper.WoPackagingBoxMapper; import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper; +import com.cnbm.packing.param.PackingInfoQueryParam; import com.cnbm.packing.param.PowerReportQueryParam; import com.cnbm.packing.service.WoPackagingBoxServiceBiz; import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz; @@ -334,18 +335,11 @@ public class WoPackagingBoxSubstrateController { return new Result(); } - @GetMapping("substrateList") + @PostMapping("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); + public Result> substrateList(@RequestBody PackingInfoQueryParam param){ + PageData page = woPackagingBoxSubstrateService.substratePage(param); + return new Result>().ok(page); } @GetMapping("exportPackingInfo") 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 2352769..3cb6fe0 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 @@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.cnbm.packing.dto.PowerReportDTO; import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO; +import com.cnbm.packing.param.PackingInfoQueryParam; import com.cnbm.packing.param.PowerReportQueryParam; import com.cnbm.packing.param.SubIdQueryParam; import com.cnbm.packing.vo.SubIdPageVo; @@ -33,7 +34,8 @@ public interface WoPackagingBoxSubstrateMapper extends BaseDao orderNameList(); List substrateList(Map params); - List substrateList(@Param("woSubstrateId") String woSubstrateId); + //List substrateList(@Param("woSubstrateId") String woSubstrateId); + IPage substratePage(Page page, @Param("param")PackingInfoQueryParam param); IPage subIdPage(Page page, @Param("param") SubIdQueryParam param); } diff --git a/ym-packing/src/main/java/com/cnbm/packing/param/PackingInfoQueryParam.java b/ym-packing/src/main/java/com/cnbm/packing/param/PackingInfoQueryParam.java new file mode 100644 index 0000000..9e2a2b5 --- /dev/null +++ b/ym-packing/src/main/java/com/cnbm/packing/param/PackingInfoQueryParam.java @@ -0,0 +1,21 @@ +package com.cnbm.packing.param; + +import com.cnbm.packing.vo.BasePageParam; +import io.swagger.annotations.ApiImplicitParam; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @Desc: "" + * @Author: yanyang + * @DATE: 2023/3/27 16:00 + */ +@Data +public class PackingInfoQueryParam extends BasePageParam { + private LocalDateTime startTime; + private LocalDateTime endTime; + private Integer model; + private String packagingBoxId; + private String woSubstrateId; +} 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 ead64c8..12d291d 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 @@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService; import com.cnbm.packing.dto.ChangePackingBoxDTO; import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO; import com.cnbm.packing.entity.WoPackagingBoxSubstrate; +import com.cnbm.packing.param.PackingInfoQueryParam; import java.util.List; import java.util.Map; @@ -41,6 +42,8 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService substrateList (Map params); + PageData substratePage (PackingInfoQueryParam param); + int updatePackagingBoxIdAndSlotByWoSubstrateId(String packagingBoxId,Integer slot,String woSubstrateId); } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java index 220235f..5a59c21 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java @@ -3,6 +3,7 @@ package com.cnbm.packing.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.cnbm.admin.utils.BaseSupportUtils; import com.cnbm.common.page.PageData; import com.cnbm.common.service.impl.CrudServiceImpl; @@ -15,6 +16,7 @@ import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO; import com.cnbm.packing.entity.ChangePackagingBoxHistory; import com.cnbm.packing.entity.WoPackagingBoxSubstrate; import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper; +import com.cnbm.packing.param.PackingInfoQueryParam; import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz; import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz; import org.apache.commons.lang3.StringUtils; @@ -211,6 +213,14 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl substratePage(PackingInfoQueryParam param) { + IPage page = mapper.substratePage( + new Page<>(param.getCurrent(), param.getSize()), + param); + return getPageData(page, WoPackagingBoxSubstrateDTO.class); + } + @Override public WoPackagingBoxSubstrate getBySubId(String subId) { return mapper.getOneByWoSubstrateId(subId); diff --git a/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml b/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml index 42afa64..841c7ca 100644 --- a/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml +++ b/ym-packing/src/main/resources/mapper/WoPackagingBoxSubstrateMapper.xml @@ -52,7 +52,7 @@ - + @@ -143,6 +143,27 @@ order by twpb.CREATE_TIME desc + +