From a093733001440cc2f7a401e9d9a2865c8b540024 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Sun, 18 Feb 2024 15:58:31 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=89=93=E5=8D=B0=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/wms/pda/controller/PdaController.java | 7 +++ .../org/nl/wms/pda/service/PdaService.java | 8 ++++ .../nl/wms/pda/service/dao/vo/PrintTagVo.java | 44 +++++++++++++++++++ .../wms/pda/service/impl/PdaServiceImpl.java | 20 +++++++++ 4 files changed, 79 insertions(+) create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PrintTagVo.java diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index 60a95ce..4d27a69 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -13,6 +13,7 @@ import org.nl.wms.pda.service.PdaService; import org.nl.wms.pda.service.dao.dto.*; import org.nl.wms.pda.service.dao.vo.LinkMaterialVo; import org.nl.wms.pda.service.dao.vo.PdaResponseVo; +import org.nl.wms.pda.service.dao.vo.PrintTagVo; import org.nl.wms.pda.service.dao.vo.RequestMaterialInfoVo; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.springframework.beans.factory.annotation.Autowired; @@ -83,6 +84,12 @@ public class PdaController { return new ResponseEntity<>(pdaService.link(requestParam), HttpStatus.OK); } + @PostMapping("/group/printf") + @Log("打印标签") + public ResponseEntity printf(@Validated @RequestBody CommonPointQueryDto requestParam) { + return new ResponseEntity<>(pdaService.printf(requestParam), HttpStatus.OK); + } + @PostMapping("/callEmptyVehicle") @Log("呼叫空托盘") public ResponseEntity callEmptyVehicle(@Validated @RequestBody CommonPointQueryDto requestParam) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java index cff8f9c..d4d90dc 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java @@ -63,6 +63,14 @@ public interface PdaService { PdaResponseVo link(List requestParam); + /** + * 打印标签返回数据信息 + * + * @param requestParam + * @return + */ + PrintTagVo printf(CommonPointQueryDto requestParam); + /** * 呼叫空托 * diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PrintTagVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PrintTagVo.java new file mode 100644 index 0000000..49c5fd1 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PrintTagVo.java @@ -0,0 +1,44 @@ +package org.nl.wms.pda.service.dao.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author: lyd + * @Description: 打印标签返回数据 + * @Date: 2023/8/1 + */ +@Data +public class PrintTagVo implements Serializable { + + /** + * 载具编码 + */ + private String vehicle_code; + + /** + * 物料编码 + */ + private String material_code; + + /** + * 物料名称 + */ + private String material_name; + + /** + * 物料数量 + */ + private String material_qty; + + /** + * 配盘批次 + */ + private String pcsn; + + /** + * 打印时间 + */ + private String print_time; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index ecceed5..c3c7336 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -158,6 +158,26 @@ public class PdaServiceImpl implements PdaService { return PdaResponseVo.pdaResultOk("配盘完成"); } + @Override + public PrintTagVo printf(CommonPointQueryDto requestParam) { + Assert.notNull(requestParam, "参数不能为空!"); + String point_code = requestParam.getPoint_code(); + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + lqw.eq(SchBaseVehiclematerialgroup::getPoint_code, point_code) + .eq(SchBaseVehiclematerialgroup::getLink_status, LinkStatusEnum.LINK_FINISH.getType()) + .eq(SchBaseVehiclematerialgroup::getGroup_status, GroupStatusEnum.IN_STORAGE.getType()); + SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getOne(lqw); + Assert.notNull(vehiclematerialgroup, "点位:" + point_code + ",未找到对应的组盘信息,组盘或配盘未完成!"); + PrintTagVo printTagVo = new PrintTagVo(); + printTagVo.setVehicle_code(vehiclematerialgroup.getVehicle_code()); + printTagVo.setMaterial_code(vehiclematerialgroup.getMaterial_code()); + printTagVo.setMaterial_name(vehiclematerialgroup.getMaterial_name()); + printTagVo.setMaterial_qty(vehiclematerialgroup.getMaterial_qty()); + printTagVo.setPcsn(vehiclematerialgroup.getPcsn()); + printTagVo.setPrint_time(DateUtil.now()); + return printTagVo; + } + @Override public PdaResponseVo callEmptyVehicle(CommonPointQueryDto requestParam) { Assert.notNull(requestParam, "参数不能为空!");