diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java
index 29087b39..a2181e4a 100644
--- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java
+++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseMaterialInfo.java
@@ -111,6 +111,7 @@ public class MesBaseMaterialInfo extends BaseEntity
@Excel(name = "erp最后更新日期;对应FModifyDate", width = 30, dateFormat = "yyyy-MM-dd")
private Date erpModifyDate;
+ private Long warehouseId;
public void setMaterialId(Long materialId)
{
this.materialId = materialId;
@@ -319,6 +320,14 @@ public class MesBaseMaterialInfo extends BaseEntity
return erpModifyDate;
}
+ public Long getWarehouseId() {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(Long warehouseId) {
+ this.warehouseId = warehouseId;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
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 33daedc2..4640807d 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
@@ -33,6 +33,7 @@
+
@@ -258,7 +259,7 @@
factory_id
from mes_base_material_info mbmi
- and not exists (select 1 from wms_warehouse_material wwm where mbmi.material_id = wwm.storage_id and wwm.storage_type='1')
+ 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 old_material_code = #{oldMaterialCode}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMoveController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMoveController.java
new file mode 100644
index 00000000..f7bed411
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMoveController.java
@@ -0,0 +1,105 @@
+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.WmsMove;
+import com.hw.wms.service.IWmsMoveService;
+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 xins
+ * @date 2024-01-09
+ */
+@RestController
+@RequestMapping("/move")
+public class WmsMoveController extends BaseController
+{
+ @Autowired
+ private IWmsMoveService wmsMoveService;
+
+ /**
+ * 查询移库合库记录列表
+ */
+ @RequiresPermissions("wms:move:list")
+ @GetMapping("/list")
+ public TableDataInfo list(WmsMove wmsMove)
+ {
+ startPage();
+ List list = wmsMoveService.selectWmsMoveList(wmsMove);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出移库合库记录列表
+ */
+ @RequiresPermissions("wms:move:export")
+ @Log(title = "移库合库记录", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, WmsMove wmsMove)
+ {
+ List list = wmsMoveService.selectWmsMoveList(wmsMove);
+ ExcelUtil util = new ExcelUtil(WmsMove.class);
+ util.exportExcel(response, list, "移库合库记录数据");
+ }
+
+ /**
+ * 获取移库合库记录详细信息
+ */
+ @RequiresPermissions("wms:move:query")
+ @GetMapping(value = "/{moveId}")
+ public AjaxResult getInfo(@PathVariable("moveId") Long moveId)
+ {
+ return success(wmsMoveService.selectWmsMoveByMoveId(moveId));
+ }
+
+ /**
+ * 新增移库合库记录
+ */
+ @RequiresPermissions("wms:move:add")
+ @Log(title = "移库合库记录", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody WmsMove wmsMove)
+ {
+ return toAjax(wmsMoveService.insertWmsMove(wmsMove));
+ }
+
+ /**
+ * 修改移库合库记录
+ */
+ @RequiresPermissions("wms:move:edit")
+ @Log(title = "移库合库记录", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody WmsMove wmsMove)
+ {
+ return toAjax(wmsMoveService.updateWmsMove(wmsMove));
+ }
+
+ /**
+ * 删除移库合库记录
+ */
+ @RequiresPermissions("wms:move:remove")
+ @Log(title = "移库合库记录", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{moveIds}")
+ public AjaxResult remove(@PathVariable Long[] moveIds)
+ {
+ return toAjax(wmsMoveService.deleteWmsMoveByMoveIds(moveIds));
+ }
+}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMove.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMove.java
new file mode 100644
index 00000000..6932bd01
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMove.java
@@ -0,0 +1,312 @@
+package com.hw.wms.domain;
+
+import java.util.List;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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_move
+ *
+ * @author xins
+ * @date 2024-01-09
+ */
+public class WmsMove extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 原材料移库合库记录ID */
+ private Long moveId;
+
+ /** 任务编号 */
+ @Excel(name = "任务编号")
+ private String taskCode;
+
+ /** 仓库ID */
+ @Excel(name = "仓库ID")
+ private Long warehouseId;
+
+ /** 原库位编码 */
+ @Excel(name = "原库位编码")
+ private String oriLocationCode;
+
+ /** 目标库位编码 */
+ @Excel(name = "目标库位编码")
+ private String targetLocationCode;
+
+ /** 操作类型(0自动,1人工,2强制,3调度) */
+ @Excel(name = "操作类型(0自动,1人工,2强制,3调度)")
+ private String operationType;
+
+ /** 移库方式(1:人工移库 2:AGV移库 ) */
+ @Excel(name = "移库方式", readConverterExp = "1=:人工移库,2=:AGV移库")
+ private String moveWay;
+
+ /** 移库类型(1移库,2合库) */
+ @Excel(name = "移库类型(1移库,2合库)")
+ private String moveType;
+
+ /** 申请原因 */
+ @Excel(name = "申请原因")
+ private String applyReason;
+
+ /** 审核原因 */
+ @Excel(name = "审核原因")
+ private String auditReason;
+
+ /** 审核状态(0待审核,1审核通过,2审核未通过) */
+ @Excel(name = "审核状态(0待审核,1审核通过,2审核未通过)")
+ private String auditStatus;
+
+ /** 执行状态(0待执行,1执行中,2执行完成) */
+ @Excel(name = "执行状态(0待执行,1执行中,2执行完成)")
+ private String executeStatus;
+
+ /** 申请人 */
+ @Excel(name = "申请人")
+ private String applyBy;
+
+ /** 申请时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date applyDate;
+
+ /** 审核人 */
+ @Excel(name = "审核人")
+ private String auditBy;
+
+ /** 审核时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date auditDate;
+
+ /** 最后更新时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date updateDate;
+
+ /** 开始时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date beginTime;
+
+ /** 结束时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date endTime;
+
+ /** 移库合库记录明细;原材料入库记录对应的明细信息信息 */
+ private List wmsMoveDetailList;
+
+ public void setMoveId(Long moveId)
+ {
+ this.moveId = moveId;
+ }
+
+ public Long getMoveId()
+ {
+ return moveId;
+ }
+ public void setTaskCode(String taskCode)
+ {
+ this.taskCode = taskCode;
+ }
+
+ public String getTaskCode()
+ {
+ return taskCode;
+ }
+ public void setWarehouseId(Long warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public Long getWarehouseId()
+ {
+ return warehouseId;
+ }
+ public void setOriLocationCode(String oriLocationCode)
+ {
+ this.oriLocationCode = oriLocationCode;
+ }
+
+ public String getOriLocationCode()
+ {
+ return oriLocationCode;
+ }
+ public void setTargetLocationCode(String targetLocationCode)
+ {
+ this.targetLocationCode = targetLocationCode;
+ }
+
+ public String getTargetLocationCode()
+ {
+ return targetLocationCode;
+ }
+ public void setOperationType(String operationType)
+ {
+ this.operationType = operationType;
+ }
+
+ public String getOperationType()
+ {
+ return operationType;
+ }
+ public void setMoveWay(String moveWay)
+ {
+ this.moveWay = moveWay;
+ }
+
+ public String getMoveWay()
+ {
+ return moveWay;
+ }
+ public void setMoveType(String moveType)
+ {
+ this.moveType = moveType;
+ }
+
+ public String getMoveType()
+ {
+ return moveType;
+ }
+ public void setApplyReason(String applyReason)
+ {
+ this.applyReason = applyReason;
+ }
+
+ public String getApplyReason()
+ {
+ return applyReason;
+ }
+ public void setAuditReason(String auditReason)
+ {
+ this.auditReason = auditReason;
+ }
+
+ public String getAuditReason()
+ {
+ return auditReason;
+ }
+ public void setAuditStatus(String auditStatus)
+ {
+ this.auditStatus = auditStatus;
+ }
+
+ public String getAuditStatus()
+ {
+ return auditStatus;
+ }
+ public void setExecuteStatus(String executeStatus)
+ {
+ this.executeStatus = executeStatus;
+ }
+
+ public String getExecuteStatus()
+ {
+ return executeStatus;
+ }
+ public void setApplyBy(String applyBy)
+ {
+ this.applyBy = applyBy;
+ }
+
+ public String getApplyBy()
+ {
+ return applyBy;
+ }
+ public void setApplyDate(Date applyDate)
+ {
+ this.applyDate = applyDate;
+ }
+
+ public Date getApplyDate()
+ {
+ return applyDate;
+ }
+ public void setAuditBy(String auditBy)
+ {
+ this.auditBy = auditBy;
+ }
+
+ public String getAuditBy()
+ {
+ return auditBy;
+ }
+ public void setAuditDate(Date auditDate)
+ {
+ this.auditDate = auditDate;
+ }
+
+ public Date getAuditDate()
+ {
+ return auditDate;
+ }
+ public void setUpdateDate(Date updateDate)
+ {
+ this.updateDate = updateDate;
+ }
+
+ public Date getUpdateDate()
+ {
+ return updateDate;
+ }
+ public void setBeginTime(Date beginTime)
+ {
+ this.beginTime = beginTime;
+ }
+
+ public Date getBeginTime()
+ {
+ return beginTime;
+ }
+ public void setEndTime(Date endTime)
+ {
+ this.endTime = endTime;
+ }
+
+ public Date getEndTime()
+ {
+ return endTime;
+ }
+
+ public List getWmsMoveDetailList()
+ {
+ return wmsMoveDetailList;
+ }
+
+ public void setWmsMoveDetailList(List wmsMoveDetailList)
+ {
+ this.wmsMoveDetailList = wmsMoveDetailList;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("moveId", getMoveId())
+ .append("taskCode", getTaskCode())
+ .append("warehouseId", getWarehouseId())
+ .append("oriLocationCode", getOriLocationCode())
+ .append("targetLocationCode", getTargetLocationCode())
+ .append("operationType", getOperationType())
+ .append("moveWay", getMoveWay())
+ .append("moveType", getMoveType())
+ .append("applyReason", getApplyReason())
+ .append("auditReason", getAuditReason())
+ .append("auditStatus", getAuditStatus())
+ .append("executeStatus", getExecuteStatus())
+ .append("applyBy", getApplyBy())
+ .append("applyDate", getApplyDate())
+ .append("auditBy", getAuditBy())
+ .append("auditDate", getAuditDate())
+ .append("updateBy", getUpdateBy())
+ .append("updateDate", getUpdateDate())
+ .append("beginTime", getBeginTime())
+ .append("endTime", getEndTime())
+ .append("wmsMoveDetailList", getWmsMoveDetailList())
+ .toString();
+ }
+}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMoveDetail.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMoveDetail.java
new file mode 100644
index 00000000..8c44adbf
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsMoveDetail.java
@@ -0,0 +1,255 @@
+package com.hw.wms.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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_move_detail
+ *
+ * @author xins
+ * @date 2024-01-09
+ */
+public class WmsMoveDetail extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 移库记录明细ID */
+ private Long moveDetailId;
+
+ /** 移库ID,关联移库合库记录主键 */
+ @Excel(name = "移库ID,关联移库合库记录主键")
+ private Long moveId;
+
+ /** 库位编码 */
+ @Excel(name = "库位编码")
+ private String locationCode;
+
+ /** 存放物料条码,入库扫描条码时,从打印条码记录表中获取,关联条码信息的barcode_info */
+ @Excel(name = "存放物料条码,入库扫描条码时,从打印条码记录表中获取,关联条码信息的barcode_info")
+ private String materialBarcode;
+
+ /** 批次;入库扫描条码时,从打印条码记录表中获取,关联条码信息的batch_code */
+ @Excel(name = "批次;入库扫描条码时,从打印条码记录表中获取,关联条码信息的batch_code")
+ private String instockBatch;
+
+ /** 物料ID */
+ @Excel(name = "物料ID")
+ private Long materialId;
+
+ /** 计划数量 */
+ @Excel(name = "计划数量")
+ private BigDecimal planAmount;
+
+ /** 实际数量 */
+ @Excel(name = "实际数量")
+ private BigDecimal realAmount;
+
+ /** 执行状态(0待执行,1执行中,2执行完成) */
+ @Excel(name = "执行状态(0待执行,1执行中,2执行完成)")
+ private String executeStatus;
+
+ /** 执行人 */
+ @Excel(name = "执行人")
+ private String executePerson;
+
+ /** 执行时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date executeTime;
+
+ /** 移库明细类型(1出库2入库) */
+ @Excel(name = "移库明细类型(1出库2入库)")
+ private String moveDetailType;
+
+ /** 使用机台名称;入库扫描条码时,从打印条码记录表中获取 */
+ @Excel(name = "使用机台名称;入库扫描条码时,从打印条码记录表中获取")
+ private String machineName;
+
+ /** 创建时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date createDate;
+
+ /** 最后更新时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date updateDate;
+
+ /** 有效标记 */
+ @Excel(name = "有效标记")
+ private String activeFlag;
+
+ public void setMoveDetailId(Long moveDetailId)
+ {
+ this.moveDetailId = moveDetailId;
+ }
+
+ public Long getMoveDetailId()
+ {
+ return moveDetailId;
+ }
+ public void setMoveId(Long moveId)
+ {
+ this.moveId = moveId;
+ }
+
+ public Long getMoveId()
+ {
+ return moveId;
+ }
+ public void setLocationCode(String locationCode)
+ {
+ this.locationCode = locationCode;
+ }
+
+ public String getLocationCode()
+ {
+ return locationCode;
+ }
+ public void setMaterialBarcode(String materialBarcode)
+ {
+ this.materialBarcode = materialBarcode;
+ }
+
+ public String getMaterialBarcode()
+ {
+ return materialBarcode;
+ }
+ public void setInstockBatch(String instockBatch)
+ {
+ this.instockBatch = instockBatch;
+ }
+
+ public String getInstockBatch()
+ {
+ return instockBatch;
+ }
+ public void setMaterialId(Long materialId)
+ {
+ this.materialId = materialId;
+ }
+
+ public Long getMaterialId()
+ {
+ return materialId;
+ }
+ public void setPlanAmount(BigDecimal planAmount)
+ {
+ this.planAmount = planAmount;
+ }
+
+ public BigDecimal getPlanAmount()
+ {
+ return planAmount;
+ }
+ public void setRealAmount(BigDecimal realAmount)
+ {
+ this.realAmount = realAmount;
+ }
+
+ public BigDecimal getRealAmount()
+ {
+ return realAmount;
+ }
+ public void setExecuteStatus(String executeStatus)
+ {
+ this.executeStatus = executeStatus;
+ }
+
+ public String getExecuteStatus()
+ {
+ return executeStatus;
+ }
+ public void setExecutePerson(String executePerson)
+ {
+ this.executePerson = executePerson;
+ }
+
+ public String getExecutePerson()
+ {
+ return executePerson;
+ }
+ public void setExecuteTime(Date executeTime)
+ {
+ this.executeTime = executeTime;
+ }
+
+ public Date getExecuteTime()
+ {
+ return executeTime;
+ }
+ public void setMoveDetailType(String moveDetailType)
+ {
+ this.moveDetailType = moveDetailType;
+ }
+
+ public String getMoveDetailType()
+ {
+ return moveDetailType;
+ }
+ public void setMachineName(String machineName)
+ {
+ this.machineName = machineName;
+ }
+
+ public String getMachineName()
+ {
+ return machineName;
+ }
+ public void setCreateDate(Date createDate)
+ {
+ this.createDate = createDate;
+ }
+
+ public Date getCreateDate()
+ {
+ return createDate;
+ }
+ public void setUpdateDate(Date updateDate)
+ {
+ this.updateDate = updateDate;
+ }
+
+ public Date getUpdateDate()
+ {
+ return updateDate;
+ }
+ public void setActiveFlag(String activeFlag)
+ {
+ this.activeFlag = activeFlag;
+ }
+
+ public String getActiveFlag()
+ {
+ return activeFlag;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("moveDetailId", getMoveDetailId())
+ .append("moveId", getMoveId())
+ .append("locationCode", getLocationCode())
+ .append("materialBarcode", getMaterialBarcode())
+ .append("instockBatch", getInstockBatch())
+ .append("materialId", getMaterialId())
+ .append("planAmount", getPlanAmount())
+ .append("realAmount", getRealAmount())
+ .append("executeStatus", getExecuteStatus())
+ .append("executePerson", getExecutePerson())
+ .append("executeTime", getExecuteTime())
+ .append("moveDetailType", getMoveDetailType())
+ .append("machineName", getMachineName())
+ .append("createBy", getCreateBy())
+ .append("createDate", getCreateDate())
+ .append("updateBy", getUpdateBy())
+ .append("updateDate", getUpdateDate())
+ .append("activeFlag", getActiveFlag())
+ .toString();
+ }
+}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsMoveMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsMoveMapper.java
new file mode 100644
index 00000000..6c928222
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsMoveMapper.java
@@ -0,0 +1,87 @@
+package com.hw.wms.mapper;
+
+import java.util.List;
+import com.hw.wms.domain.WmsMove;
+import com.hw.wms.domain.WmsMoveDetail;
+
+/**
+ * 移库合库记录Mapper接口
+ *
+ * @author xins
+ * @date 2024-01-09
+ */
+public interface WmsMoveMapper
+{
+ /**
+ * 查询移库合库记录
+ *
+ * @param moveId 移库合库记录主键
+ * @return 移库合库记录
+ */
+ public WmsMove selectWmsMoveByMoveId(Long moveId);
+
+ /**
+ * 查询移库合库记录列表
+ *
+ * @param wmsMove 移库合库记录
+ * @return 移库合库记录集合
+ */
+ public List selectWmsMoveList(WmsMove wmsMove);
+
+ /**
+ * 新增移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ public int insertWmsMove(WmsMove wmsMove);
+
+ /**
+ * 修改移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ public int updateWmsMove(WmsMove wmsMove);
+
+ /**
+ * 删除移库合库记录
+ *
+ * @param moveId 移库合库记录主键
+ * @return 结果
+ */
+ public int deleteWmsMoveByMoveId(Long moveId);
+
+ /**
+ * 批量删除移库合库记录
+ *
+ * @param moveIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteWmsMoveByMoveIds(Long[] moveIds);
+
+ /**
+ * 批量删除移库合库记录明细;原材料入库记录对应的明细信息
+ *
+ * @param moveIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteWmsMoveDetailByMoveIds(Long[] moveIds);
+
+ /**
+ * 批量新增移库合库记录明细;原材料入库记录对应的明细信息
+ *
+ * @param wmsMoveDetailList 移库合库记录明细;原材料入库记录对应的明细信息列表
+ * @return 结果
+ */
+ public int batchWmsMoveDetail(List wmsMoveDetailList);
+
+
+ /**
+ * 通过移库合库记录主键删除移库合库记录明细;原材料入库记录对应的明细信息信息
+ *
+ * @param moveId 移库合库记录ID
+ * @return 结果
+ */
+ public int deleteWmsMoveDetailByMoveId(Long moveId);
+}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsMoveService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsMoveService.java
new file mode 100644
index 00000000..5b7c8207
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsMoveService.java
@@ -0,0 +1,61 @@
+package com.hw.wms.service;
+
+import java.util.List;
+import com.hw.wms.domain.WmsMove;
+
+/**
+ * 移库合库记录Service接口
+ *
+ * @author xins
+ * @date 2024-01-09
+ */
+public interface IWmsMoveService
+{
+ /**
+ * 查询移库合库记录
+ *
+ * @param moveId 移库合库记录主键
+ * @return 移库合库记录
+ */
+ public WmsMove selectWmsMoveByMoveId(Long moveId);
+
+ /**
+ * 查询移库合库记录列表
+ *
+ * @param wmsMove 移库合库记录
+ * @return 移库合库记录集合
+ */
+ public List selectWmsMoveList(WmsMove wmsMove);
+
+ /**
+ * 新增移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ public int insertWmsMove(WmsMove wmsMove);
+
+ /**
+ * 修改移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ public int updateWmsMove(WmsMove wmsMove);
+
+ /**
+ * 批量删除移库合库记录
+ *
+ * @param moveIds 需要删除的移库合库记录主键集合
+ * @return 结果
+ */
+ public int deleteWmsMoveByMoveIds(Long[] moveIds);
+
+ /**
+ * 删除移库合库记录信息
+ *
+ * @param moveId 移库合库记录主键
+ * @return 结果
+ */
+ public int deleteWmsMoveByMoveId(Long moveId);
+}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsMoveServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsMoveServiceImpl.java
new file mode 100644
index 00000000..b502aee2
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsMoveServiceImpl.java
@@ -0,0 +1,131 @@
+package com.hw.wms.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import com.hw.common.core.utils.StringUtils;
+import org.springframework.transaction.annotation.Transactional;
+import com.hw.wms.domain.WmsMoveDetail;
+import com.hw.wms.mapper.WmsMoveMapper;
+import com.hw.wms.domain.WmsMove;
+import com.hw.wms.service.IWmsMoveService;
+
+/**
+ * 移库合库记录Service业务层处理
+ *
+ * @author xins
+ * @date 2024-01-09
+ */
+@Service
+public class WmsMoveServiceImpl implements IWmsMoveService
+{
+ @Autowired
+ private WmsMoveMapper wmsMoveMapper;
+
+ /**
+ * 查询移库合库记录
+ *
+ * @param moveId 移库合库记录主键
+ * @return 移库合库记录
+ */
+ @Override
+ public WmsMove selectWmsMoveByMoveId(Long moveId)
+ {
+ return wmsMoveMapper.selectWmsMoveByMoveId(moveId);
+ }
+
+ /**
+ * 查询移库合库记录列表
+ *
+ * @param wmsMove 移库合库记录
+ * @return 移库合库记录
+ */
+ @Override
+ public List selectWmsMoveList(WmsMove wmsMove)
+ {
+ return wmsMoveMapper.selectWmsMoveList(wmsMove);
+ }
+
+ /**
+ * 新增移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int insertWmsMove(WmsMove wmsMove)
+ {
+ int rows = wmsMoveMapper.insertWmsMove(wmsMove);
+ insertWmsMoveDetail(wmsMove);
+ return rows;
+ }
+
+ /**
+ * 修改移库合库记录
+ *
+ * @param wmsMove 移库合库记录
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int updateWmsMove(WmsMove wmsMove)
+ {
+ wmsMoveMapper.deleteWmsMoveDetailByMoveId(wmsMove.getMoveId());
+ insertWmsMoveDetail(wmsMove);
+ return wmsMoveMapper.updateWmsMove(wmsMove);
+ }
+
+ /**
+ * 批量删除移库合库记录
+ *
+ * @param moveIds 需要删除的移库合库记录主键
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int deleteWmsMoveByMoveIds(Long[] moveIds)
+ {
+ wmsMoveMapper.deleteWmsMoveDetailByMoveIds(moveIds);
+ return wmsMoveMapper.deleteWmsMoveByMoveIds(moveIds);
+ }
+
+ /**
+ * 删除移库合库记录信息
+ *
+ * @param moveId 移库合库记录主键
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int deleteWmsMoveByMoveId(Long moveId)
+ {
+ wmsMoveMapper.deleteWmsMoveDetailByMoveId(moveId);
+ return wmsMoveMapper.deleteWmsMoveByMoveId(moveId);
+ }
+
+ /**
+ * 新增移库合库记录明细;原材料入库记录对应的明细信息信息
+ *
+ * @param wmsMove 移库合库记录对象
+ */
+ public void insertWmsMoveDetail(WmsMove wmsMove)
+ {
+ List wmsMoveDetailList = wmsMove.getWmsMoveDetailList();
+ Long moveId = wmsMove.getMoveId();
+ if (StringUtils.isNotNull(wmsMoveDetailList))
+ {
+ List list = new ArrayList();
+ for (WmsMoveDetail wmsMoveDetail : wmsMoveDetailList)
+ {
+ wmsMoveDetail.setMoveId(moveId);
+ list.add(wmsMoveDetail);
+ }
+ if (list.size() > 0)
+ {
+ wmsMoveMapper.batchWmsMoveDetail(list);
+ }
+ }
+ }
+}
diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsMoveMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsMoveMapper.xml
new file mode 100644
index 00000000..0ec66622
--- /dev/null
+++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsMoveMapper.xml
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select move_id, task_code, warehouse_id, ori_location_code, target_location_code, operation_type, move_way, move_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 from wms_move
+
+
+
+
+
+
+
+ insert into wms_move
+
+ task_code,
+ warehouse_id,
+ ori_location_code,
+ target_location_code,
+ operation_type,
+ move_way,
+ move_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,
+
+
+ #{taskCode},
+ #{warehouseId},
+ #{oriLocationCode},
+ #{targetLocationCode},
+ #{operationType},
+ #{moveWay},
+ #{moveType},
+ #{applyReason},
+ #{auditReason},
+ #{auditStatus},
+ #{executeStatus},
+ #{applyBy},
+ #{applyDate},
+ #{auditBy},
+ #{auditDate},
+ #{updateBy},
+ #{updateDate},
+ #{beginTime},
+ #{endTime},
+
+
+
+
+ update wms_move
+
+ task_code = #{taskCode},
+ warehouse_id = #{warehouseId},
+ ori_location_code = #{oriLocationCode},
+ target_location_code = #{targetLocationCode},
+ operation_type = #{operationType},
+ move_way = #{moveWay},
+ move_type = #{moveType},
+ apply_reason = #{applyReason},
+ audit_reason = #{auditReason},
+ audit_status = #{auditStatus},
+ execute_status = #{executeStatus},
+ apply_by = #{applyBy},
+ apply_date = #{applyDate},
+ audit_by = #{auditBy},
+ audit_date = #{auditDate},
+ update_by = #{updateBy},
+ update_date = #{updateDate},
+ begin_time = #{beginTime},
+ end_time = #{endTime},
+
+ where move_id = #{moveId}
+
+
+
+ delete from wms_move where move_id = #{moveId}
+
+
+
+ delete from wms_move where move_id in
+
+ #{moveId}
+
+
+
+
+ delete from wms_move_detail where move_id in
+
+ #{moveId}
+
+
+
+
+ delete from wms_move_detail where move_id = #{moveId}
+
+
+
+ insert into wms_move_detail( move_detail_id, move_id, location_code, material_barcode, instock_batch, material_id, plan_amount, real_amount, execute_status, execute_person, execute_time, move_detail_type, machine_name, create_by, create_date, update_by, update_date, active_flag) values
+
+ ( #{item.moveDetailId}, #{item.moveId}, #{item.locationCode}, #{item.materialBarcode}, #{item.instockBatch}, #{item.materialId}, #{item.planAmount}, #{item.realAmount}, #{item.executeStatus}, #{item.executePerson}, #{item.executeTime}, #{item.moveDetailType}, #{item.machineName}, #{item.createBy}, #{item.createDate}, #{item.updateBy}, #{item.updateDate}, #{item.activeFlag})
+
+
+
\ No newline at end of file
diff --git a/hw-ui/src/api/wms/move.js b/hw-ui/src/api/wms/move.js
new file mode 100644
index 00000000..9df5b86f
--- /dev/null
+++ b/hw-ui/src/api/wms/move.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询移库合库记录列表
+export function listMove(query) {
+ return request({
+ url: '/wms/move/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询移库合库记录详细
+export function getMove(moveId) {
+ return request({
+ url: '/wms/move/' + moveId,
+ method: 'get'
+ })
+}
+
+// 新增移库合库记录
+export function addMove(data) {
+ return request({
+ url: '/wms/move',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改移库合库记录
+export function updateMove(data) {
+ return request({
+ url: '/wms/move',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除移库合库记录
+export function delMove(moveId) {
+ return request({
+ url: '/wms/move/' + moveId,
+ method: 'delete'
+ })
+}
diff --git a/hw-ui/src/api/wms/wmslocation.js b/hw-ui/src/api/wms/wmslocation.js
new file mode 100644
index 00000000..576a1863
--- /dev/null
+++ b/hw-ui/src/api/wms/wmslocation.js
@@ -0,0 +1,70 @@
+import request from '@/utils/request'
+
+// 查询库位列表
+export function listWmslocation(query) {
+ return request({
+ url: '/wms/wmslocation/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询库位详细
+export function getWmslocation(locationId) {
+ return request({
+ url: '/wms/wmslocation/' + locationId,
+ method: 'get'
+ })
+}
+
+// 新增库位
+export function addWmslocation(data) {
+ return request({
+ url: '/wms/wmslocation',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改库位
+export function updateWmslocation(data) {
+ return request({
+ url: '/wms/wmslocation',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除库位
+export function delWmslocation(locationId) {
+ return request({
+ url: '/wms/wmslocation/' + locationId,
+ method: 'delete'
+ })
+}
+
+// 查询仓库列表
+export function getWarehouses(query) {
+ return request({
+ url: '/wms/wmslocation/getWarehouses',
+ method: 'get',
+ params: query
+ })
+}
+
+
+// 锁定库位
+export function lockWmslocation(locationId) {
+ return request({
+ url: '/wms/wmslocation/lockWmsLocation/' + locationId,
+ method: 'get'
+ })
+}
+
+// 解锁库位
+export function unlockWmslocation(locationId) {
+ return request({
+ url: '/wms/wmslocation/unlockWmsLocation/' + locationId,
+ method: 'get'
+ })
+}
diff --git a/hw-ui/src/api/wms/wmswarehouse.js b/hw-ui/src/api/wms/wmswarehouse.js
new file mode 100644
index 00000000..381615bc
--- /dev/null
+++ b/hw-ui/src/api/wms/wmswarehouse.js
@@ -0,0 +1,100 @@
+import request from '@/utils/request'
+
+// 查询仓库列表
+export function listWmswarehouse(query) {
+ return request({
+ url: '/wms/wmswarehouse/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询仓库详细
+export function getWmswarehouse(warehouseId) {
+ return request({
+ url: '/wms/wmswarehouse/' + warehouseId,
+ method: 'get'
+ })
+}
+
+// 新增仓库
+export function addWmswarehouse(data) {
+ return request({
+ url: '/wms/wmswarehouse',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改仓库
+export function updateWmswarehouse(data) {
+ return request({
+ url: '/wms/wmswarehouse',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除仓库
+export function delWmswarehouse(warehouseId) {
+ return request({
+ url: '/wms/wmswarehouse/' + warehouseId,
+ method: 'delete'
+ })
+}
+
+
+// 查询仓库类别
+export function getWarehouseCategories() {
+ return request({
+ url: '/wms/wmswarehouse/getWarehouseCategories',
+ method: 'get'
+ })
+}
+
+
+// 查询部门下拉树结构
+export function getDeptTreeForWarehouse() {
+ return request({
+ url: '/system/hwcommon/getDeptTreeForWarehouse',
+ method: 'get'
+ })
+}
+
+// 查询物料信息列表
+export function selectMaterialInfos4AllocationWarehouse(query) {
+ return request({
+ url: '/mes/materialinfo/selectMaterialInfos4AllocationWarehouse',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询已配置物料信息列表
+export function selectWmsWarehouseMaterialList(query) {
+ return request({
+ url: '/wms/wmswarehouse/selectWmsWarehouseMaterialList',
+ method: 'get',
+ params: query
+ })
+}
+
+
+// 保存仓库分配的物料信息列表
+export function allocateMaterials(data) {
+ return request({
+ url: '/wms/wmswarehouse/allocateMaterials',
+ method: 'put',
+ params: data
+ })
+}
+
+
+// 删除仓库分配的物料信息列表
+export function unallocateMaterials(data) {
+ return request({
+ url: '/wms/wmswarehouse/unallocateMaterials',
+ method: 'post',
+ params: data
+ })
+}
diff --git a/hw-ui/src/views/wms/base/wmslocation/index.vue b/hw-ui/src/views/wms/base/wmslocation/index.vue
new file mode 100644
index 00000000..c648d6ce
--- /dev/null
+++ b/hw-ui/src/views/wms/base/wmslocation/index.vue
@@ -0,0 +1,762 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+
+ 修改
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 解锁
+
+
+ 锁定
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hw-ui/src/views/wms/base/wmswarehouse/index.vue b/hw-ui/src/views/wms/base/wmswarehouse/index.vue
new file mode 100644
index 00000000..358c0a17
--- /dev/null
+++ b/hw-ui/src/views/wms/base/wmswarehouse/index.vue
@@ -0,0 +1,731 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 物料配置
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hw-ui/src/views/wms/move/index.vue b/hw-ui/src/views/wms/move/index.vue
new file mode 100644
index 00000000..319fd5db
--- /dev/null
+++ b/hw-ui/src/views/wms/move/index.vue
@@ -0,0 +1,626 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}
+
+
+
+
+
+ {{ parseTime(scope.row.auditDate, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.updateDate, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.beginTime, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 移库合库记录明细;原材料入库记录对应的明细信息信息
+
+
+ 添加
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kdwebapi.properties b/kdwebapi.properties
new file mode 100644
index 00000000..4d9f21d1
--- /dev/null
+++ b/kdwebapi.properties
@@ -0,0 +1,19 @@
+#X-KDApi-AcctID =6304ba61219bf5
+#X-KDApi-AppID=225649_7ZbM6dDO0qrVXXUKX/Xs09wH2u5d4rLE
+#X-KDApi-AppSec =2bb1d972f3574a46aebee03cdc80aeae
+#X-KDApi-UserName =demo
+#X-KDApi-LCID=2052
+#X-KDApi-ServerUrl=https://apiexp.open.kingdee.com/k3cloud/
+
+#
+X-KDApi-AcctID =657953112be3c4
+#
+X-KDApi-AppID=265686_SY0M09lvzkp/18wG4/RBRa1GRs2V2pls
+#
+X-KDApi-AppSec =317a6730c9ec4fafa757ca4a3499d059
+#
+X-KDApi-UserName =张铭潇
+#
+X-KDApi-LCID=2052
+#
+X-KDApi-ServerUrl=http://1.15.183.55/k3cloud/