diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java index be51921..e9a9de9 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java @@ -172,6 +172,25 @@ public class MesBaseBarcodeInfo extends BaseEntity private String confirmFlag;//用来二次确认使用 + private Long locationBarcodeId; + + private String locationCode; + + public String getLocationCode() { + return locationCode; + } + + public void setLocationCode(String locationCode) { + this.locationCode = locationCode; + } + + public Long getLocationBarcodeId() { + return locationBarcodeId; + } + + public void setLocationBarcodeId(Long locationBarcodeId) { + this.locationBarcodeId = locationBarcodeId; + } public String getPrintFlag() { return printFlag; diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java index 461f87d..f9be0fb 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java @@ -280,5 +280,28 @@ public class MesBaseBarcodeInfoController extends BaseController return toAjax(mesBaseBarcodeInfoService.generateRegularRawBarcode(mesBaseBarcodeInfo)); } + /** + * 查询仓库关联条码信息列表 + */ + @RequiresPermissions("mes:barcode:list") + @GetMapping("/selectBarCodeAllocationWarehouse") + public TableDataInfo selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo) + { + startPage(); + List list = mesBaseBarcodeInfoService.selectBarCodeAllocationWarehouse(mesBaseBarcodeInfo); + return getDataTable(list); + } + + /** + * 查询仓库已关联条码信息列表 + */ + @RequiresPermissions("mes:barcode:list") + @GetMapping("/selectWarehouseBarCodeList") + public TableDataInfo selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo) + { + startPage(); + List list = mesBaseBarcodeInfoService.selectWarehouseBarCodeList(mesBaseBarcodeInfo); + return getDataTable(list); + } } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseBarcodeInfoMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseBarcodeInfoMapper.java index 8e0b360..20f6a3d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseBarcodeInfoMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseBarcodeInfoMapper.java @@ -114,4 +114,19 @@ public interface MesBaseBarcodeInfoMapper */ public int batchMesBaseBarcodeInfo(List mesBaseBarcodeInfos); + /** + * 查询仓库关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + public List selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + /** + * 查询仓库已关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + public List selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java index d5d20ea..544d5c0 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java @@ -144,4 +144,18 @@ public interface IMesBaseBarcodeInfoService * @return */ public int regenerateBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + /** + * 查询仓库关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + public List selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + /** + * 查询仓库已关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + public List selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java index b2357db..6fb8746 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java @@ -867,4 +867,24 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService } + /** + * 查询仓库关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + @Override + public List selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo) { + return mesBaseBarcodeInfoMapper.selectBarCodeAllocationWarehouse(mesBaseBarcodeInfo); + } + + /** + * 查询仓库已关联条码信息列表 + * @param mesBaseBarcodeInfo + * @return + */ + @Override + public List selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo) { + return mesBaseBarcodeInfoMapper.selectWarehouseBarCodeList(mesBaseBarcodeInfo); + } + } diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml index 70a4384..70d4901 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml @@ -46,6 +46,7 @@ + @@ -380,4 +381,47 @@ + + + + diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml index fa5cd26..0f2e7b7 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml @@ -275,7 +275,7 @@ and not exists (select 1 from wms_warehouse_material wwm where mbmi.material_id = wwm.storage_id and wwm.storage_type='1' and wwm.warehouse_id=#{warehouseId}) and erp_id = #{erpId} - and material_code = #{materialCode} + and material_code like concat('%', #{materialCode},'%') and old_material_code = #{oldMaterialCode} and material_name like concat('%', #{materialName}, diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseLocationController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseLocationController.java index 5784534..7cc985d 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseLocationController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsBaseLocationController.java @@ -160,4 +160,31 @@ public class WmsBaseLocationController extends BaseController { return success(wmsBaseLocationService.printLabels(locationIds, 2)); } + /** + * 批量新增库位关联条码 + * + * @param locationCode 库位编码 + * @param materialIds 物料ID组 + * @param barcodeInfos 条码内容组 + */ + @RequiresPermissions("wms:wmslocation:barCode") + @Log(title = "库位管理", businessType = BusinessType.ALLOCATE) + @PutMapping("/allocateBarCodes") + public AjaxResult allocateBarCodes(String locationCode, Long[] materialIds, String[] barcodeInfos) { + wmsBaseLocationService.batchInsertWarehouseBarCodes(locationCode, materialIds, barcodeInfos); + return success(); + } + + /** + * 删除仓库配置的条码信息 + * @param locationBarcodeIds + * @return + */ + @RequiresPermissions("wms:wmslocation:barCode") + @Log(title = "库位管理", businessType = BusinessType.UNALLOCATE) + @PostMapping("/unallocateBarCodes") + public AjaxResult unallocateBarCodes(Long[] locationBarcodeIds) { + return toAjax(wmsBaseLocationService.deleteWmsLocationBarcodeByLocationBarcodeIds(locationBarcodeIds)); + } + } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsLocationBarcodeController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsLocationBarcodeController.java new file mode 100644 index 0000000..e391cd6 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsLocationBarcodeController.java @@ -0,0 +1,99 @@ +package com.hw.wms.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.hw.common.log.annotation.Log; +import com.hw.common.log.enums.BusinessType; +import com.hw.common.security.annotation.RequiresPermissions; +import com.hw.wms.domain.WmsLocationBarcode; +import com.hw.wms.service.IWmsLocationBarcodeService; +import com.hw.common.core.web.controller.BaseController; +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.common.core.utils.poi.ExcelUtil; +import com.hw.common.core.web.page.TableDataInfo; + +/** + * 库位关联条码信息Controller + * + * @author Yinq + * @date 2024-07-31 + */ +@RestController +@RequestMapping("/locationBarcode") +public class WmsLocationBarcodeController extends BaseController { + @Autowired + private IWmsLocationBarcodeService wmsLocationBarcodeService; + + /** + * 查询库位关联条码信息列表 + */ + @RequiresPermissions("wms:locationBarcode:list") + @GetMapping("/list") + public TableDataInfo list(WmsLocationBarcode wmsLocationBarcode) { + startPage(); + List list = wmsLocationBarcodeService.selectWmsLocationBarcodeList(wmsLocationBarcode); + return getDataTable(list); + } + + /** + * 导出库位关联条码信息列表 + */ + @RequiresPermissions("wms:locationBarcode:export") + @Log(title = "库位关联条码信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmsLocationBarcode wmsLocationBarcode) { + List list = wmsLocationBarcodeService.selectWmsLocationBarcodeList(wmsLocationBarcode); + ExcelUtil util = new ExcelUtil(WmsLocationBarcode.class); + util.exportExcel(response, list, "库位关联条码信息数据"); + } + + /** + * 获取库位关联条码信息详细信息 + */ + @RequiresPermissions("wms:locationBarcode:query") + @GetMapping(value = "/{locationBarcodeId}") + public AjaxResult getInfo(@PathVariable("locationBarcodeId") Long locationBarcodeId) { + return success(wmsLocationBarcodeService.selectWmsLocationBarcodeByLocationBarcodeId(locationBarcodeId)); + } + + /** + * 新增库位关联条码信息 + */ + @RequiresPermissions("wms:locationBarcode:add") + @Log(title = "库位关联条码信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmsLocationBarcode wmsLocationBarcode) { + return toAjax(wmsLocationBarcodeService.insertWmsLocationBarcode(wmsLocationBarcode)); + } + + /** + * 修改库位关联条码信息 + */ + @RequiresPermissions("wms:locationBarcode:edit") + @Log(title = "库位关联条码信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmsLocationBarcode wmsLocationBarcode) { + return toAjax(wmsLocationBarcodeService.updateWmsLocationBarcode(wmsLocationBarcode)); + } + + /** + * 删除库位关联条码信息 + */ + @RequiresPermissions("wms:locationBarcode:remove") + @Log(title = "库位关联条码信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{locationBarcodeIds}") + public AjaxResult remove(@PathVariable Long[] locationBarcodeIds) { + return toAjax(wmsLocationBarcodeService.deleteWmsLocationBarcodeByLocationBarcodeIds(locationBarcodeIds)); + } +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsLocationBarcode.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsLocationBarcode.java new file mode 100644 index 0000000..7f52c3d --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsLocationBarcode.java @@ -0,0 +1,84 @@ +package com.hw.wms.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; + +/** + * 库位关联条码信息对象 wms_location_barcode + * + * @author Yinq + * @date 2024-07-31 + */ +public class WmsLocationBarcode extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private Long locationBarcodeId; + + /** + * 库位编码 + */ + @Excel(name = "库位编码") + private String locationCode; + + /** + * 物料ID + */ + @Excel(name = "物料ID") + private Long materialId; + + /** + * 物料条码 + */ + @Excel(name = "物料条码") + private String barcodeInfo; + + public void setLocationBarcodeId(Long locationBarcodeId) { + this.locationBarcodeId = locationBarcodeId; + } + + public Long getLocationBarcodeId() { + return locationBarcodeId; + } + + public void setLocationCode(String locationCode) { + this.locationCode = locationCode; + } + + public String getLocationCode() { + return locationCode; + } + + public void setMaterialId(Long materialId) { + this.materialId = materialId; + } + + public Long getMaterialId() { + return materialId; + } + + public void setBarcodeInfo(String barcodeInfo) { + this.barcodeInfo = barcodeInfo; + } + + public String getBarcodeInfo() { + return barcodeInfo; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("locationBarcodeId", getLocationBarcodeId()) + .append("locationCode", getLocationCode()) + .append("materialId", getMaterialId()) + .append("barcodeInfo", getBarcodeInfo()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsLocationBarcodeMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsLocationBarcodeMapper.java new file mode 100644 index 0000000..9c3a108 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsLocationBarcodeMapper.java @@ -0,0 +1,70 @@ +package com.hw.wms.mapper; + +import java.util.List; +import com.hw.wms.domain.WmsLocationBarcode; + +/** + * 库位关联条码信息Mapper接口 + * + * @author Yinq + * @date 2024-07-31 + */ +public interface WmsLocationBarcodeMapper +{ + /** + * 查询库位关联条码信息 + * + * @param locationBarcodeId 库位关联条码信息主键 + * @return 库位关联条码信息 + */ + public WmsLocationBarcode selectWmsLocationBarcodeByLocationBarcodeId(Long locationBarcodeId); + + /** + * 查询库位关联条码信息列表 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 库位关联条码信息集合 + */ + public List selectWmsLocationBarcodeList(WmsLocationBarcode wmsLocationBarcode); + + /** + * 新增库位关联条码信息 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 结果 + */ + public int insertWmsLocationBarcode(WmsLocationBarcode wmsLocationBarcode); + + /** + * 修改库位关联条码信息 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 结果 + */ + public int updateWmsLocationBarcode(WmsLocationBarcode wmsLocationBarcode); + + /** + * 删除库位关联条码信息 + * + * @param locationBarcodeId 库位关联条码信息主键 + * @return 结果 + */ + public int deleteWmsLocationBarcodeByLocationBarcodeId(Long locationBarcodeId); + + /** + * 批量删除库位关联条码信息 + * + * @param locationBarcodeIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmsLocationBarcodeByLocationBarcodeIds(Long[] locationBarcodeIds); + + /** + * 批量新增库位关联条码信息 + * + * @param wmsLocationBarcodeList 库位关联条码信息列表 + * @return 结果 + */ + public int batchWmsLocationBarcode(List wmsLocationBarcodeList); + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsBaseLocationService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsBaseLocationService.java index 499406a..5e2f32a 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsBaseLocationService.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsBaseLocationService.java @@ -93,4 +93,21 @@ public interface IWmsBaseLocationService * @return */ public int printLabels(Long[] locationIds, int type); + + /** + * 批量新增库位关联条码 + * + * @param locationCode 库位编码 + * @param materialIds 物料ID组 + * @param barcodeInfos 条码内容组 + */ + public void batchInsertWarehouseBarCodes(String locationCode, Long[] materialIds, String[] barcodeInfos); + + /** + * 删除仓库配置的条码信息 + * @param locationBarcodeIds + * @return + */ + public int deleteWmsLocationBarcodeByLocationBarcodeIds(Long[] locationBarcodeIds); + } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsLocationBarcodeService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsLocationBarcodeService.java new file mode 100644 index 0000000..218b7cb --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsLocationBarcodeService.java @@ -0,0 +1,61 @@ +package com.hw.wms.service; + +import java.util.List; + +import com.hw.wms.domain.WmsLocationBarcode; + +/** + * 库位关联条码信息Service接口 + * + * @author Yinq + * @date 2024-07-31 + */ +public interface IWmsLocationBarcodeService { + /** + * 查询库位关联条码信息 + * + * @param locationBarcodeId 库位关联条码信息主键 + * @return 库位关联条码信息 + */ + public WmsLocationBarcode selectWmsLocationBarcodeByLocationBarcodeId(Long locationBarcodeId); + + /** + * 查询库位关联条码信息列表 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 库位关联条码信息集合 + */ + public List selectWmsLocationBarcodeList(WmsLocationBarcode wmsLocationBarcode); + + /** + * 新增库位关联条码信息 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 结果 + */ + public int insertWmsLocationBarcode(WmsLocationBarcode wmsLocationBarcode); + + /** + * 修改库位关联条码信息 + * + * @param wmsLocationBarcode 库位关联条码信息 + * @return 结果 + */ + public int updateWmsLocationBarcode(WmsLocationBarcode wmsLocationBarcode); + + /** + * 批量删除库位关联条码信息 + * + * @param locationBarcodeIds 需要删除的库位关联条码信息主键集合 + * @return 结果 + */ + public int deleteWmsLocationBarcodeByLocationBarcodeIds(Long[] locationBarcodeIds); + + /** + * 删除库位关联条码信息信息 + * + * @param locationBarcodeId 库位关联条码信息主键 + * @return 结果 + */ + public int deleteWmsLocationBarcodeByLocationBarcodeId(Long locationBarcodeId); +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java index 73664fe..54cb85c 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java @@ -10,13 +10,17 @@ import com.hw.common.security.utils.SecurityUtils; import com.hw.printer.api.RemotePrinterService; import com.hw.wms.domain.WmsBaseLocation; import com.hw.wms.domain.WmsBaseWarehouse; +import com.hw.wms.domain.WmsLocationBarcode; import com.hw.wms.mapper.WmsBaseLocationMapper; import com.hw.wms.mapper.WmsBaseWarehouseMapper; +import com.hw.wms.mapper.WmsLocationBarcodeMapper; import com.hw.wms.service.IWmsBaseLocationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; @@ -34,6 +38,9 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService { @Autowired private WmsBaseWarehouseMapper wmsBaseWarehouseMapper; + @Autowired + private WmsLocationBarcodeMapper wmsLocationBarcodeMapper; + @Resource private RemotePrinterService remotePrinterService; @@ -205,4 +212,39 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService { } } + /** + * 批量新增库位关联条码 + * + * @param locationCode 库位编码 + * @param materialIds 物料ID组 + * @param barcodeInfos 条码内容组 + */ + @Override + public void batchInsertWarehouseBarCodes(String locationCode, Long[] materialIds, String[] barcodeInfos) { + if (StringUtils.isNotEmpty(barcodeInfos)){ + String userName = SecurityUtils.getUsername(); + Date currentDate = new Date(); + List list = new ArrayList<>(); + for (int i = 0; i < barcodeInfos.length; i++) { + WmsLocationBarcode locationBarcode = new WmsLocationBarcode(); + locationBarcode.setLocationCode(locationCode); + locationBarcode.setMaterialId(materialIds[i]); + locationBarcode.setBarcodeInfo(barcodeInfos[i]); + locationBarcode.setCreateBy(userName); + locationBarcode.setCreateTime(currentDate); + list.add(locationBarcode); + } + wmsLocationBarcodeMapper.batchWmsLocationBarcode(list); + } + } + + /** + * 删除仓库配置的条码信息 + * @param locationBarcodeIds + * @return + */ + @Override + public int deleteWmsLocationBarcodeByLocationBarcodeIds(Long[] locationBarcodeIds) { + return wmsLocationBarcodeMapper.deleteWmsLocationBarcodeByLocationBarcodeIds(locationBarcodeIds); + } } diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsLocationBarcodeMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsLocationBarcodeMapper.xml new file mode 100644 index 0000000..e9cb16b --- /dev/null +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsLocationBarcodeMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + select location_barcode_id, location_code, material_id, barcode_info, remark, create_by, create_time + from wms_location_barcode + + + + + + + + insert into wms_location_barcode + + location_code, + material_id, + barcode_info, + remark, + create_by, + create_time, + + + #{locationCode}, + #{materialId}, + #{barcodeInfo}, + #{remark}, + #{createBy}, + #{createTime}, + + + + + update wms_location_barcode + + location_code = #{locationCode}, + material_id = #{materialId}, + barcode_info = #{barcodeInfo}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + + where location_barcode_id = #{locationBarcodeId} + + + + delete + from wms_location_barcode + where location_barcode_id = #{locationBarcodeId} + + + + delete from wms_location_barcode where location_barcode_id in + + #{locationBarcodeId} + + + + + insert into wms_location_barcode( location_barcode_id, location_code, material_id, barcode_info, remark, create_by, create_time) values + + ( #{item.locationBarcodeId}, #{item.locationCode}, #{item.materialId}, #{item.barcodeInfo}, #{item.remark}, #{item.createBy}, #{item.createTime}) + + + \ No newline at end of file diff --git a/hw-ui/src/api/wms/wmslocation.js b/hw-ui/src/api/wms/wmslocation.js index 899a052..9b30e41 100644 --- a/hw-ui/src/api/wms/wmslocation.js +++ b/hw-ui/src/api/wms/wmslocation.js @@ -87,3 +87,39 @@ export function printContainerLabels(locationId) { method: 'get' }) } + +// 查询条码信息列表 +export function selectBarCodeAllocationWarehouse(query) { + return request({ + url: '/mes/barcode/selectBarCodeAllocationWarehouse', + method: 'get', + params: query + }) +} + +// 查询库位已关联条码信息列表 +export function selectWarehouseBarCodeList(query) { + return request({ + url: '/mes/barcode/selectWarehouseBarCodeList', + method: 'get', + params: query + }) +} + +// 保存库位关联的条码信息列表 +export function allocateBarCodes(data) { + return request({ + url: '/wms/wmslocation/allocateBarCodes', + method: 'put', + params: data + }) +} + +// 删除库位分配的条码信息列表 +export function unallocateBarCodes(data) { + return request({ + url: '/wms/wmslocation/unallocateBarCodes', + method: 'post', + params: data + }) +} diff --git a/hw-ui/src/router/index.js b/hw-ui/src/router/index.js index aae88c2..757d030 100644 --- a/hw-ui/src/router/index.js +++ b/hw-ui/src/router/index.js @@ -211,6 +211,20 @@ export const dynamicRoutes = [ } ] }, + { + path: '/wmslocation/correlationBarCode', + component: Layout, + hidden: true, + permissions: ['wms:wmslocation:barCode'], + children: [ + { + path: 'index/:locationId(\\d+)', + component: () => import('@/views/wms/base/wmslocation/correlationBarCode'), + name: 'CorrelationBarCode', + meta: { title: '库位关联条码', activeMenu: '/wms/base/wmslocation' } + } + ] + }, { path: '/system/wfProcessActivityAuth', component: Layout, diff --git a/hw-ui/src/views/wms/base/wmslocation/correlationBarCode.vue b/hw-ui/src/views/wms/base/wmslocation/correlationBarCode.vue new file mode 100644 index 0000000..42e8716 --- /dev/null +++ b/hw-ui/src/views/wms/base/wmslocation/correlationBarCode.vue @@ -0,0 +1,325 @@ + + + diff --git a/hw-ui/src/views/wms/base/wmslocation/index.vue b/hw-ui/src/views/wms/base/wmslocation/index.vue index b23b55d..1cce4f5 100644 --- a/hw-ui/src/views/wms/base/wmslocation/index.vue +++ b/hw-ui/src/views/wms/base/wmslocation/index.vue @@ -278,6 +278,13 @@ v-hasPermi="['wms:wmslocation:edit']" >修改 + 关联条码