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 @@ - - - - + + + + + + +