From 83b4ef2ab9894d1d64547505e73025fd27269bb8 Mon Sep 17 00:00:00 2001 From: yinq Date: Sat, 10 Aug 2024 15:20:58 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BF=AE=E6=94=B9=E5=8E=9F?= =?UTF-8?q?=E6=9D=90=E6=96=99=E9=80=80=E5=BA=93=E5=AE=A1=E6=A0=B8=EF=BC=88?= =?UTF-8?q?=E5=8F=82=E7=85=A7=E5=8E=9F=E6=9D=90=E6=96=99=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsRawReturnController.java | 18 ++++- .../domain/vo/WmsRawReturnAuditReturnVo.java | 23 ++++++ .../com/hw/wms/mapper/WmsRawReturnMapper.java | 15 ++++ .../hw/wms/service/IWmsRawReturnService.java | 17 ++++ .../service/impl/WmsRawReturnServiceImpl.java | 37 ++++++++- .../mapper/wms/WmsRawReturnMapper.xml | 64 +++++++++++++++ hw-ui/src/api/wms/rawreturn.js | 8 ++ .../wms/rawmanagement/rawreturn/index.vue | 15 ++-- .../rawreturn/rawReturnDetail.vue | 78 ++++++++----------- 9 files changed, 217 insertions(+), 58 deletions(-) create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/domain/vo/WmsRawReturnAuditReturnVo.java diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawReturnController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawReturnController.java index a05cb42..258711d 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawReturnController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawReturnController.java @@ -94,14 +94,15 @@ public class WmsRawReturnController extends BaseController /** - * 查询原材料退库记录列表 + * 查询原材料退库审核记录列表 */ @RequiresPermissions("wms:rawreturn:audit:list") @GetMapping("/auditList") public TableDataInfo auditList(WmsRawReturn wmsRawReturn) { startPage(); - List list = wmsRawReturnService.selectWmsRawReturnJoinList(wmsRawReturn); +// List list = wmsRawReturnService.selectWmsRawReturnJoinList(wmsRawReturn); //旧版不group by + List list = wmsRawReturnService.selectWmsAuditList(wmsRawReturn); return getDataTable(list); } @@ -135,4 +136,17 @@ public class WmsRawReturnController extends BaseController List warehouses = wmsBaseWarehouseService.selectWmsBaseWarehouseList(queryWarehouse); return success(warehouses); } + + /** + * 查询原材料退库记录 + * 审核按钮查询 + * @param taskCode 原材料退库记录任务编号 + * @return 原材料退库记录审核返回VO对象 + */ + @RequiresPermissions("wms:rawreturn:audit:query") + @GetMapping(value = "/getRawReturnByTaskCode/{taskCode}") + public AjaxResult getRawReturnByTaskCode(@PathVariable("taskCode") String taskCode) { + return success(wmsRawReturnService.selectGetRawReturnByTaskCode(taskCode)); + } + } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/vo/WmsRawReturnAuditReturnVo.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/vo/WmsRawReturnAuditReturnVo.java new file mode 100644 index 0000000..5b8a368 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/vo/WmsRawReturnAuditReturnVo.java @@ -0,0 +1,23 @@ +package com.hw.wms.domain.vo; + +import com.hw.wms.domain.WmsRawReturn; +import lombok.Data; + +import java.util.List; + +/** + * 原材料退库待审核VO对象 + */ +@Data +public class WmsRawReturnAuditReturnVo { + + private String taskCode; + + private WmsRawReturn wmsRawReturn; + + /** + * 原材料退库记录信息 + */ + private List wmsRawReturnDetailList; + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawReturnMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawReturnMapper.java index f8c93b7..6b6cc3a 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawReturnMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawReturnMapper.java @@ -112,4 +112,19 @@ public interface WmsRawReturnMapper */ public int batchWmsRawReturn(List wmsRawReturnList); + /** + * 查询原材料退库审核记录列表 + * + * @param wmsRawReturn 原材料退库记录 + * @return 原材料退库记录 + */ + List selectWmsAuditList(WmsRawReturn wmsRawReturn); + + /** + * 查询原材料退库记录 + * + * @param queryRawReturn 原材料退库记录 + * @return 原材料退库记录审核返回VO对象 + */ + List selectGetRawReturnByTaskCode(WmsRawReturn queryRawReturn); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsRawReturnService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsRawReturnService.java index 003c410..60c5e36 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsRawReturnService.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsRawReturnService.java @@ -3,6 +3,7 @@ package com.hw.wms.service; import java.util.List; import com.hw.wms.domain.WmsRawReturn; import com.hw.wms.domain.WmsRawReturnDetail; +import com.hw.wms.domain.vo.WmsRawReturnAuditReturnVo; import com.hw.wms.domain.vo.WmsRawReturnAuditVo; import com.hw.wms.domain.vo.WmsRawReturnConfirmVo; import org.springframework.transaction.annotation.Transactional; @@ -119,4 +120,20 @@ public interface IWmsRawReturnService * @return */ public int directRawReturn(WmsRawReturn wmsRawReturn); + + /** + * 查询原材料退库记录 + * 审核按钮查询 + * @param taskCode 原材料退库记录任务编号 + * @return 原材料退库记录审核返回VO对象 + */ + public WmsRawReturnAuditReturnVo selectGetRawReturnByTaskCode(String taskCode); + + /** + * 查询原材料退库审核记录列表 + * + * @param wmsRawReturn 原材料退库记录 + * @return 原材料退库记录 + */ + List selectWmsAuditList(WmsRawReturn wmsRawReturn); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java index 2b5e316..17fc1ee 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java @@ -15,10 +15,7 @@ import com.hw.mes.api.domain.MesBaseBarcodeInfo; import com.hw.mes.api.domain.MesBaseMaterialInfo; import com.hw.mes.api.domain.vo.MesBaseMaterialInfoVo; import com.hw.wms.domain.*; -import com.hw.wms.domain.vo.WmsRawOutstockAuditVo; -import com.hw.wms.domain.vo.WmsRawOutstockConfirmVo; -import com.hw.wms.domain.vo.WmsRawReturnAuditVo; -import com.hw.wms.domain.vo.WmsRawReturnConfirmVo; +import com.hw.wms.domain.vo.*; import com.hw.wms.mapper.*; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -589,4 +586,36 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService { return 1; } + + /** + * 查询原材料退库审核记录列表 + * + * @param wmsRawReturn 原材料退库记录 + * @return 原材料退库记录 + */ + @Override + public List selectWmsAuditList(WmsRawReturn wmsRawReturn) { + return wmsRawReturnMapper.selectWmsAuditList(wmsRawReturn); + } + + /** + * 查询原材料退库记录 + * 审核按钮查询 + * @param taskCode 原材料退库记录任务编号 + * @return 原材料退库记录审核返回VO对象 + */ + @Override + public WmsRawReturnAuditReturnVo selectGetRawReturnByTaskCode(String taskCode) { + WmsRawReturnAuditReturnVo wmsRawReturnAuditReturnVo = new WmsRawReturnAuditReturnVo(); + WmsRawReturn queryRawReturn = new WmsRawReturn(); + queryRawReturn.setTaskCode(taskCode); + List wmsRawReturnList = wmsRawReturnMapper.selectGetRawReturnByTaskCode(queryRawReturn); + if (wmsRawReturnList.size() > 0){ + WmsRawReturn wmsRawReturn = wmsRawReturnList.get(0); + wmsRawReturnAuditReturnVo.setWmsRawReturn(wmsRawReturn); + wmsRawReturnAuditReturnVo.setWmsRawReturnDetailList(wmsRawReturnList); + } + return wmsRawReturnAuditReturnVo; + } + } diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsRawReturnMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsRawReturnMapper.xml index b185051..789ed51 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsRawReturnMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsRawReturnMapper.xml @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -273,6 +274,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where wrr.raw_return_id = #{rawReturnId} + + + + + insert into wms_raw_return( raw_return_id, task_code, warehouse_id, location_code, plan_code, plan_detail_code, product_id, material_id, plan_amount, return_amount, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, material_barcode, end_station_code, batch_code) values diff --git a/hw-ui/src/api/wms/rawreturn.js b/hw-ui/src/api/wms/rawreturn.js index dd8b0e3..13a56c3 100644 --- a/hw-ui/src/api/wms/rawreturn.js +++ b/hw-ui/src/api/wms/rawreturn.js @@ -94,3 +94,11 @@ export function getWarehouses() { method: 'get' }) } + +// 查询原材料退库记录 +export function getRawReturnByTaskCode(taskCode) { + return request({ + url: '/wms/rawreturn/getRawReturnByTaskCode/' + taskCode, + method: 'get' + }) +} diff --git a/hw-ui/src/views/wms/rawmanagement/rawreturn/index.vue b/hw-ui/src/views/wms/rawmanagement/rawreturn/index.vue index 0696dd3..1cd7322 100644 --- a/hw-ui/src/views/wms/rawmanagement/rawreturn/index.vue +++ b/hw-ui/src/views/wms/rawmanagement/rawreturn/index.vue @@ -77,10 +77,10 @@ - - - - + + + + + + +