diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java index 9ae275b..92b14ea 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java @@ -47,7 +47,7 @@ public class MesBaseStationInfo extends BaseEntity { * 楼层 */ @Excel(name = "楼层") - private Long floor; + private Integer floor; /** * 单位生产时间 @@ -103,11 +103,11 @@ public class MesBaseStationInfo extends BaseEntity { return processId; } - public void setFloor(Long floor) { + public void setFloor(Integer floor) { this.floor = floor; } - public Long getFloor() { + public Integer getFloor() { return floor; } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java index db559a5..b4e86f8 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java @@ -8,6 +8,7 @@ import com.hw.common.log.annotation.Log; import com.hw.common.log.enums.BusinessType; import com.hw.common.security.annotation.RequiresPermissions; import com.hw.common.security.utils.SecurityUtils; +import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.domain.MesMaterialBom; import com.hw.mes.domain.MesProductPlan; import com.hw.mes.domain.MesProductPlanDetail; @@ -29,6 +30,10 @@ import java.util.Map; @RestController @RequestMapping("/api") public class MesApiController extends BaseController { + + @Autowired + private IMesBaseStationInfoService mesBaseStationInfoService; + @Autowired private IMesMaterialBomService mesMaterialBomService; @@ -41,6 +46,18 @@ public class MesApiController extends BaseController { @Autowired private IMesBaseBarcodeInfoService mesBaseBarcodeInfoService; + + /** + * 查询当前登录工位信息 + */ + @GetMapping("/getLoginStationInfo") + public AjaxResult getLoginStationInfo() + { + MesBaseStationInfo loginStationInfo = mesBaseStationInfoService.getLoginStationInfo(); + return success(loginStationInfo); + } + + /** * 查询物料BOM信息列表 */ @@ -222,4 +239,19 @@ public class MesApiController extends BaseController { return getDataTable(productPlanService.selectMaterialInstallationCircumstance(hashMap)); } + + /** + * 领料完成 + */ + @Log(title = "领料", businessType = BusinessType.COMPLETE) + @PostMapping(("/completeCollectMaterials")) + public AjaxResult completeCollectMaterials() { + //todo + /*http://IP:5001/wcs/RecieveRcs/agvComplete 装配区背负式Agv通知任务完成 + 参数:{ + "endStationCode": "string",//工位 + }*/ + return null; + } + } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java index 0853036..d29c607 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java @@ -108,8 +108,6 @@ public class MesBaseStationInfoController extends BaseController } - - /** * 查询工位信息列表 */ diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java index 2cd16ad..b05c7f7 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java @@ -59,4 +59,13 @@ public interface IMesBaseStationInfoService * @return 结果 */ public int deleteMesBaseStationInfoByStationId(Long stationId); + + + + /** + * 查询当前登录工位信息 + * + * @return 工位信息 + */ + public MesBaseStationInfo getLoginStationInfo(); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java index c6afeaf..b9b4a0f 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java @@ -1,7 +1,10 @@ package com.hw.mes.service.impl; import java.util.List; + +import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.DateUtils; +import com.hw.common.core.utils.ip.IpUtils; import com.hw.common.security.utils.SecurityUtils; import com.hw.mes.api.domain.MesBaseStationInfo; import org.springframework.beans.factory.annotation.Autowired; @@ -16,8 +19,7 @@ import com.hw.mes.service.IMesBaseStationInfoService; * @date 2024-01-26 */ @Service -public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService -{ +public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService { @Autowired private MesBaseStationInfoMapper mesBaseStationInfoMapper; @@ -28,8 +30,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 工位信息 */ @Override - public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId) - { + public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId) { return mesBaseStationInfoMapper.selectMesBaseStationInfoByStationId(stationId); } @@ -40,8 +41,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 工位信息 */ @Override - public List selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo) - { + public List selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo) { return mesBaseStationInfoMapper.selectMesBaseStationInfoList(mesBaseStationInfo); } @@ -52,8 +52,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 结果 */ @Override - public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) - { + public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) { mesBaseStationInfo.setCreateTime(DateUtils.getNowDate()); mesBaseStationInfo.setCreateBy(SecurityUtils.getUsername()); return mesBaseStationInfoMapper.insertMesBaseStationInfo(mesBaseStationInfo); @@ -66,8 +65,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 结果 */ @Override - public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) - { + public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) { mesBaseStationInfo.setUpdateTime(DateUtils.getNowDate()); mesBaseStationInfo.setUpdateBy(SecurityUtils.getUsername()); return mesBaseStationInfoMapper.updateMesBaseStationInfo(mesBaseStationInfo); @@ -80,8 +78,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 结果 */ @Override - public int deleteMesBaseStationInfoByStationIds(Long[] stationIds) - { + public int deleteMesBaseStationInfoByStationIds(Long[] stationIds) { return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationIds(stationIds); } @@ -92,8 +89,26 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService * @return 结果 */ @Override - public int deleteMesBaseStationInfoByStationId(Long stationId) - { + public int deleteMesBaseStationInfoByStationId(Long stationId) { return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationId(stationId); } + + + /** + * 查询当前登录工位信息 + * + * @return 工位信息 + */ + @Override + public MesBaseStationInfo getLoginStationInfo() { + String ipAddress = SecurityUtils.getLoginUser().getIpaddr(); + ipAddress = "192.168.2.20";//TODO:正式时需要删除 + + MesBaseStationInfo mesBaseStationInfo = mesBaseStationInfoMapper.selectMesBaseStationInfoByStationIp(ipAddress); + Integer processFloor = SecurityUtils.getProcessFloor(); + if (mesBaseStationInfo != null && mesBaseStationInfo.getFloor() != null && !mesBaseStationInfo.getFloor().equals(processFloor)) { + throw new ServiceException("请在" + processFloor + "楼登录此工序"); + } + return mesBaseStationInfo; + } } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseWarehouseController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseWarehouseController.java index 20f8e41..8d3c120 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseWarehouseController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseWarehouseController.java @@ -35,8 +35,7 @@ import com.hw.common.core.web.page.TableDataInfo; */ @RestController @RequestMapping("/wmswarehouse") -public class WmsBaseWarehouseController extends BaseController -{ +public class WmsBaseWarehouseController extends BaseController { @Autowired private IWmsBaseWarehouseService wmsBaseWarehouseService; @@ -51,8 +50,7 @@ public class WmsBaseWarehouseController extends BaseController */ @RequiresPermissions("wms:wmswarehouse:list") @GetMapping("/list") - public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse) - { + public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse) { startPage(); List list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse); return getDataTable(list); @@ -64,8 +62,7 @@ public class WmsBaseWarehouseController extends BaseController @RequiresPermissions("wms:wmswarehouse:export") @Log(title = "仓库管理", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse) - { + public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse) { List list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse); ExcelUtil util = new ExcelUtil(WmsBaseWarehouse.class); util.exportExcel(response, list, "仓库数据"); @@ -76,8 +73,7 @@ public class WmsBaseWarehouseController extends BaseController */ @RequiresPermissions("wms:wmswarehouse:query") @GetMapping(value = "/{warehouseId}") - public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId) - { + public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId) { return success(wmsBaseWarehouseService.selectWmsBaseWarehouseByWarehouseId(warehouseId)); } @@ -87,8 +83,7 @@ public class WmsBaseWarehouseController extends BaseController @RequiresPermissions("wms:wmswarehouse:add") @Log(title = "仓库管理", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) - { + public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) { return toAjax(wmsBaseWarehouseService.insertWmsBaseWarehouse(wmsBaseWarehouse)); } @@ -98,8 +93,7 @@ public class WmsBaseWarehouseController extends BaseController @RequiresPermissions("wms:wmswarehouse:edit") @Log(title = "仓库管理", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) - { + public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) { return toAjax(wmsBaseWarehouseService.updateWmsBaseWarehouse(wmsBaseWarehouse)); } @@ -108,9 +102,8 @@ public class WmsBaseWarehouseController extends BaseController */ @RequiresPermissions("wms:wmswarehouse:remove") @Log(title = "仓库管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{warehouseIds}") - public AjaxResult remove(@PathVariable Long[] warehouseIds) - { + @DeleteMapping("/{warehouseIds}") + public AjaxResult remove(@PathVariable Long[] warehouseIds) { //todo:判断是否有引用,或者改为状态9 return toAjax(wmsBaseWarehouseService.deleteWmsBaseWarehouseByWarehouseIds(warehouseIds)); } @@ -121,8 +114,7 @@ public class WmsBaseWarehouseController extends BaseController */ @RequiresPermissions("wms:wmswarehouse:list") @GetMapping("/getWarehouseCategories") - public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory) - { + public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory) { List list = wmsBaseCategoryService.selectWmsBaseCategoryList(wmsBaseCategory); return success(list); } @@ -132,8 +124,7 @@ public class WmsBaseWarehouseController extends BaseController */ @RequiresPermissions("wms:wmswarehouse:materialallocate") @GetMapping("/selectWmsWarehouseMaterialList") - public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial) - { + public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial) { startPage(); List warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial); return getDataTable(warehouseMaterials); @@ -145,9 +136,8 @@ public class WmsBaseWarehouseController extends BaseController @RequiresPermissions("wms:wmswarehouse:materialallocate") @Log(title = "仓库管理", businessType = BusinessType.ALLOCATE) @PutMapping("/allocateMaterials") - public AjaxResult allocateMaterials(Long warehouseId, Long[] materialIds) - { - wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, materialIds); + public AjaxResult allocateMaterials(Long warehouseId, Integer warehouseFloor, Long[] materialIds) { + wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, warehouseFloor, materialIds); return success(); } @@ -158,8 +148,7 @@ public class WmsBaseWarehouseController extends BaseController @RequiresPermissions("wms:wmswarehouse:materialallocate") @Log(title = "仓库管理", businessType = BusinessType.UNALLOCATE) @PostMapping("/unallocateMaterials") - public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds) - { + public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds) { return toAjax(wmsWarehouseMaterialService.deleteWmsWarehouseMaterialByWarehouseMaterialIds(warehouseMaterialIds)); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsWarehouseMaterial.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsWarehouseMaterial.java index 0578381..d62e3a3 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsWarehouseMaterial.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsWarehouseMaterial.java @@ -20,6 +20,8 @@ public class WmsWarehouseMaterial extends BaseEntity /** 仓库ID */ private Long warehouseId; + private Integer warehouseFloor; + /** 库位编码;单独需要针对库位设置的,后续扩展使用 */ private String locationCode; @@ -50,6 +52,15 @@ public class WmsWarehouseMaterial extends BaseEntity { return warehouseId; } + + public Integer getWarehouseFloor() { + return warehouseFloor; + } + + public void setWarehouseFloor(Integer warehouseFloor) { + this.warehouseFloor = warehouseFloor; + } + public void setLocationCode(String locationCode) { this.locationCode = locationCode; diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsWarehouseMaterialService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsWarehouseMaterialService.java index 0459b9f..6bc8b3c 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsWarehouseMaterialService.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsWarehouseMaterialService.java @@ -71,8 +71,9 @@ public interface IWmsWarehouseMaterialService /** * 批量新增仓库配置物料信息 * - * @param warehouseId 仓库ID - * @param materialIds 物料组 + * @param warehouseId 仓库ID + * @param warehouseFloor 仓库楼层 + * @param materialIds 物料组 */ - public void batchInsertWarehouseMaterial(Long warehouseId, Long[] materialIds); + public void batchInsertWarehouseMaterial(Long warehouseId, Integer warehouseFloor, Long[] materialIds); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawInstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawInstockServiceImpl.java index f56e2fc..24a24f0 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawInstockServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawInstockServiceImpl.java @@ -260,11 +260,11 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService { String materialBarcode = wmsRawBackVo.getMaterialBarcode(); R baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER); if (baseBarcodeInfoR == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData(); if (baseBarcodeInfo == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } //判断此柜体是否已跟拆分门板绑定,如果未绑定不允许返库 diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java index 2cc84f5..8564740 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java @@ -538,8 +538,8 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { wmsStockTotal.setUpdateBy(userName); wmsStockTotalMapper.updateWmsStockTotal(wmsStockTotal); - WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(baseWarehouse, planCode, planDetailCode, - rawOutstockDetail.getMaterialId(), taskCode, taskType, wmsRawOutstock.getApplyReason(), + WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(baseWarehouse, wmsRawOutstock, + rawOutstockDetail.getMaterialId(), taskCode, taskType, planAmount, currentDate, userName, wmsStockTotal.getStockTotalId()); toInsertedRawOutstocks.add(toInsertedRawOutstock); @@ -562,8 +562,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { * 获取待保存的原材料出库记录 * * @param baseWarehouse - * @param planCode - * @param planDetailCode + * @param wmsRawOutstockParam * @param materialId * @param taskCode * @param planAmount @@ -571,8 +570,8 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { * @param userName * @return */ - private WmsRawOutstock getWmsRawOutstock(WmsBaseWarehouse baseWarehouse, - String planCode, String planDetailCode, Long materialId, String taskCode, String taskType, String applyReason, + private WmsRawOutstock getWmsRawOutstock(WmsBaseWarehouse baseWarehouse, WmsRawOutstock wmsRawOutstockParam, + Long materialId, String taskCode, String taskType, BigDecimal planAmount, Date currentDate, String userName, Long stockTotalId) { //出库要求 (0申请出库,1申请审核出库,2直接出库) String outRequirement = baseWarehouse.getOutRequirement(); @@ -596,18 +595,18 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { toInsertedRawOutstock.setTaskCode(taskCode); toInsertedRawOutstock.setWarehouseId(baseWarehouse.getWarehouseId()); // toInsertedRawOutstock.setLocationCode(wmsRawStock.getLocationCode()); - toInsertedRawOutstock.setStationId(SecurityUtils.getStationId()); + toInsertedRawOutstock.setStationId(wmsRawOutstockParam.getStationId()); toInsertedRawOutstock.setStockTotalId(stockTotalId); // toInsertedRawOutstock.setPalletInfoCode(wmsRawStock.getPalletInfoCode()); toInsertedRawOutstock.setOperationType(operationType); toInsertedRawOutstock.setApplyBy(userName); - toInsertedRawOutstock.setApplyReason(applyReason); + toInsertedRawOutstock.setApplyReason(wmsRawOutstockParam.getApplyReason()); toInsertedRawOutstock.setApplyDate(currentDate); - toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode()); + toInsertedRawOutstock.setEndStationCode(wmsRawOutstockParam.getEndStationCode()); toInsertedRawOutstock.setMaterialId(materialId); toInsertedRawOutstock.setOutstockAmount(planAmount); - toInsertedRawOutstock.setPlanCode(planCode); - toInsertedRawOutstock.setPlanDetailCode(planDetailCode); + toInsertedRawOutstock.setPlanCode(wmsRawOutstockParam.getPlanCode()); + toInsertedRawOutstock.setPlanDetailCode(wmsRawOutstockParam.getPlanDetailCode()); // toInsertedRawOutstock.setMaterialBatch(wmsRawStock.getInstockBatch());//申请出库时不指定某个物料 toInsertedRawOutstock.setTaskType(taskType); toInsertedRawOutstock.setCreateTime(currentDate); @@ -634,7 +633,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { } wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); - wmsRawOutstock.setStationId(SecurityUtils.getStationId()); +// wmsRawOutstock.setStationId(SecurityUtils.getStationId()); wmsRawOutstock.setOperationType(operationType); wmsRawOutstock.setApplyBy(userName); @@ -650,12 +649,12 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { toInsertedRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); toInsertedRawOutstock.setWarehouseId(wmsRawOutstock.getWarehouseId()); toInsertedRawOutstock.setLocationCode(wmsRawOutstockDetail.getLocationCode()); - toInsertedRawOutstock.setStationId(SecurityUtils.getStationId()); +// toInsertedRawOutstock.setStationId(SecurityUtils.getStationId()); toInsertedRawOutstock.setPalletInfoCode(wmsRawOutstockDetail.getPalletInfoCode()); toInsertedRawOutstock.setOperationType(operationType); toInsertedRawOutstock.setApplyBy(userName); toInsertedRawOutstock.setApplyDate(currentDate); - toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode()); +// toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode()); toInsertedRawOutstock.setPlanCode(wmsRawOutstock.getPlanCode()); toInsertedRawOutstock.setPlanDetailCode(wmsRawOutstock.getPlanDetailCode()); toInsertedRawOutstock.setMaterialBatch(wmsRawOutstockDetail.getInstockBatch()); @@ -1120,7 +1119,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); wmsRawOutstock.setWarehouseId(baseLocation.getWarehouseId()); - wmsRawOutstock.setStationId(SecurityUtils.getStationId()); +// wmsRawOutstock.setStationId(SecurityUtils.getStationId()); wmsRawOutstock.setMaterialId(baseBarcodeInfo.getMaterialId()); wmsRawOutstock.setMaterialBatch(baseBarcodeInfo.getBatchCode()); wmsRawOutstock.setRealOutstockAmount(outstockAmount); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsWarehouseMaterialServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsWarehouseMaterialServiceImpl.java index 7fd5ae5..5590554 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsWarehouseMaterialServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsWarehouseMaterialServiceImpl.java @@ -107,11 +107,12 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer /** * 批量新增仓库配置物料信息 * - * @param warehouseId 仓库ID - * @param materialIds 物料组 + * @param warehouseId 仓库ID + * @param warehouseFloor 仓库楼层 + * @param materialIds 物料组 */ @Override - public void batchInsertWarehouseMaterial(Long warehouseId, Long[] materialIds) { + public void batchInsertWarehouseMaterial(Long warehouseId, Integer warehouseFloor, Long[] materialIds) { if (StringUtils.isNotEmpty(materialIds)) { String userName = SecurityUtils.getUsername(); Date currentDate = new Date(); @@ -120,6 +121,7 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer for (Long materialId : materialIds) { WmsWarehouseMaterial warehouseMaterial = new WmsWarehouseMaterial(); warehouseMaterial.setWarehouseId(warehouseId); + warehouseMaterial.setWarehouseFloor(warehouseFloor); warehouseMaterial.setStorageType(WmsConstants.WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL); warehouseMaterial.setStorageId(materialId); warehouseMaterial.setCreateBy(userName); diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsWarehouseMaterialMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsWarehouseMaterialMapper.xml index 8502548..5a44bec 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsWarehouseMaterialMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsWarehouseMaterialMapper.xml @@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select warehouse_id, location_code, storage_type, storage_id, create_time, create_by from wms_warehouse_material + select warehouse_id,warehouse_floor, location_code, storage_type, storage_id, create_time, create_by from wms_warehouse_material - select wwm.warehouse_material_id,wwm.warehouse_id, wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by, + select wwm.warehouse_material_id,wwm.warehouse_id, wwm.warehouse_floor,wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by, mbm.material_code,mbm.material_name from wms_warehouse_material wwm left join mes_base_material_info mbm on wwm.storage_id=mbm.material_id and wwm.storage_type='1' @@ -87,9 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into wms_warehouse_material(warehouse_id, storage_type,storage_id,create_time,create_by) values + insert into wms_warehouse_material(warehouse_id,warehouse_floor, storage_type,storage_id,create_time,create_by) values - (#{item.warehouseId},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy}) + (#{item.warehouseId},#{item.warehouseFloor},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy}) diff --git a/hw-ui/src/views/mes/processInfo/index.vue b/hw-ui/src/views/mes/processInfo/index.vue index 5f2a5b0..8708da4 100644 --- a/hw-ui/src/views/mes/processInfo/index.vue +++ b/hw-ui/src/views/mes/processInfo/index.vue @@ -287,7 +287,7 @@