diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java index a57b9df..852e264 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java @@ -94,12 +94,19 @@ public class WmsOutPlanController extends BaseController { } @PreAuthorize("@ss.hasPermi('md:PLAN:edit')") - @Log(title = "出库计划执行", businessType = BusinessType.UPDATE) + @Log(title = "出库计划管理", businessType = BusinessType.UPDATE) @PutMapping("/run/{wmsOutPlanIds}") public AjaxResult run(@PathVariable Long[] wmsOutPlanIds) { return toAjax(wmsOutPlanService.runWmsOutPlan(wmsOutPlanIds)); } + @PreAuthorize("@ss.hasPermi('md:PLAN:edit')") + @Log(title = "出库计划管理", businessType = BusinessType.UPDATE) + @PutMapping("/auto-scrap-out") + public AjaxResult autoScrapOut() { + return AjaxResult.success(wmsOutPlanService.autoScrapOut(getUsername())); + } + /** * 删除出库计划管理 */ diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutTask.java b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutTask.java index d02d975..67be088 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutTask.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutTask.java @@ -2,8 +2,9 @@ package com.ktg.mes.md.domain; import com.ktg.common.annotation.Excel; import com.ktg.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.HashMap; +import java.util.List; /** * 出库任务对象 WMS_OUT_TASK @@ -129,6 +130,8 @@ public class WmsOutTask extends BaseEntity { */ private Integer attr4; + private List> outInfoList; + public Long getWmsOutTaskId() { return wmsOutTaskId; } @@ -289,34 +292,38 @@ public class WmsOutTask extends BaseEntity { this.attr4 = attr4; } + public List> getOutInfoList() { + return outInfoList; + } + + public void setOutInfoList(List> outInfoList) { + this.outInfoList = outInfoList; + } + @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("wmsOutTaskId", getWmsOutTaskId()) - .append("wmsOutPlanId", getWmsOutPlanId()) - .append("wmsOutPlanCode", getWmsOutPlanCode()) - .append("wmsOutPlanDetailId", getWmsOutPlanDetailId()) - .append("wmsBusinessTypeId", getWmsBusinessTypeId()) - .append("taskCode", getTaskCode()) - .append("taskNumber", getTaskNumber()) - .append("outNumber", getOutNumber()) - .append("wmStorageAreaId", getWmStorageAreaId()) - .append("batchNum", getBatchNum()) - .append("mdItemId", getMdItemId()) - .append("mdItemCode", getMdItemCode()) - .append("mdItemName", getMdItemName()) - .append("mdItemUnit", getMdItemUnit()) - .append("taskState", getTaskState()) - .append("recipientUsername", getRecipientUsername()) - .append("remark", getRemark()) - .append("attr1", getAttr1()) - .append("attr2", getAttr2()) - .append("attr3", getAttr3()) - .append("attr4", getAttr4()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); + return "WmsOutTask{" + + "wmsOutTaskId=" + wmsOutTaskId + + ", wmsOutPlanId=" + wmsOutPlanId + + ", wmsOutPlanCode='" + wmsOutPlanCode + '\'' + + ", wmsOutPlanDetailId=" + wmsOutPlanDetailId + + ", wmsBusinessTypeId=" + wmsBusinessTypeId + + ", taskCode='" + taskCode + '\'' + + ", taskNumber=" + taskNumber + + ", outNumber=" + outNumber + + ", wmStorageAreaId=" + wmStorageAreaId + + ", batchNum='" + batchNum + '\'' + + ", mdItemId=" + mdItemId + + ", mdItemCode='" + mdItemCode + '\'' + + ", mdItemName='" + mdItemName + '\'' + + ", mdItemUnit='" + mdItemUnit + '\'' + + ", taskState='" + taskState + '\'' + + ", recipientUsername='" + recipientUsername + '\'' + + ", attr1='" + attr1 + '\'' + + ", attr2='" + attr2 + '\'' + + ", attr3=" + attr3 + + ", attr4=" + attr4 + + ", outInfoList=" + outInfoList + + '}'; } } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java index 8bfdb8f..6948188 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java @@ -97,5 +97,10 @@ public interface BaseKnifeMapper { @Param("isLocked") Integer isLocked ); + List selectScrapList( + @Param("knifeFineState") Integer knifeFineState, + @Param("isLocked") Integer isLocked + ); + long countBaseKnife(Long mbbBdMrlId); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsBusinessTypeMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsBusinessTypeMapper.java index 788a112..d839555 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsBusinessTypeMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsBusinessTypeMapper.java @@ -1,7 +1,9 @@ package com.ktg.mes.md.mapper; -import java.util.List; import com.ktg.mes.md.domain.WmsBusinessType; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 出入库类型Mapper接口 @@ -17,7 +19,15 @@ public interface WmsBusinessTypeMapper * @param typeId 出入库类型主键 * @return 出入库类型 */ - public WmsBusinessType selectWmsBusinessTypeByTypeId(String typeId); + WmsBusinessType selectWmsBusinessTypeByTypeId(String typeId); + + /** + * 查询出入库类型 + * + * @param code 编码 + * @return 出入库类型 + */ + WmsBusinessType selectWmsBusinessTypeByCode(@Param("code") String code); /** * 查询出入库类型列表 @@ -25,7 +35,7 @@ public interface WmsBusinessTypeMapper * @param wmsBusinessType 出入库类型 * @return 出入库类型集合 */ - public List selectWmsBusinessTypeList(WmsBusinessType wmsBusinessType); + List selectWmsBusinessTypeList(WmsBusinessType wmsBusinessType); /** * 新增出入库类型 @@ -33,7 +43,7 @@ public interface WmsBusinessTypeMapper * @param wmsBusinessType 出入库类型 * @return 结果 */ - public int insertWmsBusinessType(WmsBusinessType wmsBusinessType); + int insertWmsBusinessType(WmsBusinessType wmsBusinessType); /** * 修改出入库类型 @@ -41,7 +51,7 @@ public interface WmsBusinessTypeMapper * @param wmsBusinessType 出入库类型 * @return 结果 */ - public int updateWmsBusinessType(WmsBusinessType wmsBusinessType); + int updateWmsBusinessType(WmsBusinessType wmsBusinessType); /** * 删除出入库类型 @@ -49,7 +59,7 @@ public interface WmsBusinessTypeMapper * @param typeId 出入库类型主键 * @return 结果 */ - public int deleteWmsBusinessTypeByTypeId(String typeId); + int deleteWmsBusinessTypeByTypeId(String typeId); /** * 批量删除出入库类型 @@ -57,5 +67,5 @@ public interface WmsBusinessTypeMapper * @param typeIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteWmsBusinessTypeByTypeIds(String[] typeIds); + int deleteWmsBusinessTypeByTypeIds(String[] typeIds); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java index f0109fa..82af837 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java @@ -64,4 +64,6 @@ public interface IWmsOutPlanService { boolean runWmsOutPlan(Long[] wmsOutPlanIds); List> selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); + + int autoScrapOut(String username); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java index 06f31d0..37d253b 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java @@ -5,15 +5,15 @@ import com.ktg.common.utils.StringUtils; import com.ktg.mes.md.domain.*; import com.ktg.mes.md.mapper.*; import com.ktg.mes.md.service.IWmsOutPlanService; +import com.ktg.mes.wm.domain.WmStorageArea; +import com.ktg.mes.wm.mapper.WmStorageAreaMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; /** * 出库计划管理Service业务层处理 @@ -41,6 +41,9 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { @Autowired private MdItemMapper mdItemMapper; + @Autowired + private WmStorageAreaMapper wmStorageAreaMapper; + /** * 查询出库计划管理 * @@ -242,6 +245,129 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { return hashMapList; } + @Transactional + @Override + public int autoScrapOut(String username) { + // 获得全部可以报废物品 + List baseKnifeList = this.baseKnifeMapper.selectScrapList(0, 0); + + // 校验是否存在可报废物品 + if (baseKnifeList.isEmpty()) { + return 0; + } + + // 根据库位,进一步分组数据容器 + HashMap>> baseKnifeHashMapMap = new HashMap<>(); + + // 遍历全部可以报废物品 + baseKnifeList.forEach(baseKnife -> { + // 判断当前物料主键是否已经被收录 + baseKnifeHashMapMap.computeIfAbsent(baseKnife.getMbbBdMrlId(), k -> new HashMap<>()); + + // 判断当前库位编码是否已经被收录 + baseKnifeHashMapMap.get(baseKnife.getMbbBdMrlId()).computeIfAbsent(baseKnife.getAreaCode(), k -> new ArrayList<>()); + + // 对当前台账对象进行收录 + baseKnifeHashMapMap.get(baseKnife.getMbbBdMrlId()).get(baseKnife.getAreaCode()).add(baseKnife); + }); + + // 构建出库计划 + WmsOutPlan wmsOutPlan = new WmsOutPlan(); + wmsOutPlan.setPlanCode(Long.toString(System.currentTimeMillis(), 32).toUpperCase(Locale.ROOT)); + wmsOutPlan.setWmsBusinessTypeId(this.wmsBusinessTypeMapper.selectWmsBusinessTypeByCode("CK04").getTypeId() != null ? Long.parseLong(this.wmsBusinessTypeMapper.selectWmsBusinessTypeByCode("CK04").getTypeId()) : 14L); + wmsOutPlan.setPlanState("1"); + wmsOutPlan.setPlanType("SGLR"); + wmsOutPlan.setRemark("一键清退无寿命物品"); + wmsOutPlan.setCreateBy(username); + wmsOutPlan.setCreateTime(new Date()); + wmsOutPlanMapper.insertWmsOutPlan(wmsOutPlan); + + // 清退计数 + AtomicInteger count = new AtomicInteger(); + + // 根据物料ID遍历 + baseKnifeHashMapMap.keySet().forEach(mdItemId -> { + // 获得物料对象 + MdItem mdItem = mdItemMapper.selectMdItemById(mdItemId); + + // 根据库位编码遍历 + baseKnifeHashMapMap.get(mdItemId).keySet().forEach(areaCode -> { + // 获得库位对象 + WmStorageArea wmStorageArea = wmStorageAreaMapper.selectWmStorageAreaByAreaCode(areaCode); + + // 校验是否存在库位 + if (wmStorageArea == null || mdItem == null) { + return; + } + + // 构建出库计划明细 + WmsOutPlanDetail wmsOutPlanDetail = new WmsOutPlanDetail(); + wmsOutPlanDetail.setWmsOutPlanId(wmsOutPlan.getWmsOutPlanId()); + wmsOutPlanDetail.setMdItemId(mdItem.getItemId()); + wmsOutPlanDetail.setMdItemCode(mdItem.getItemCode()); + wmsOutPlanDetail.setMdItemName(mdItem.getItemName()); + wmsOutPlanDetail.setMdItemUnit(mdItem.getUnitName()); + wmsOutPlanDetail.setPlannedQuantity(baseKnifeHashMapMap.get(mdItemId).get(areaCode).size()); + wmsOutPlanDetail.setRealQuantity(baseKnifeHashMapMap.get(mdItemId).get(areaCode).size()); + wmsOutPlanDetail.setDetailBatchNum("1"); + wmsOutPlanDetail.setWmStorageAreaId(wmStorageArea.getAreaId()); + wmsOutPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode()); + wmsOutPlanDetail.setWmStorageAreaName(wmStorageArea.getAreaName()); + wmsOutPlanDetail.setDetailState("1"); + wmsOutPlanDetail.setRemark("一键清退无寿命物品"); + wmsOutPlanDetail.setCreateBy(username); + wmsOutPlanDetail.setCreateTime(new Date()); + wmsOutPlanMapper.insertWmsOutPlanDetail(wmsOutPlanDetail); + + // 遍历台账对象 + baseKnifeHashMapMap.get(mdItemId).get(areaCode).forEach(baseKnife -> { + // 构建出库计划明细实体 + WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity(); + wmsOutPlanDetailEntity.setWmsOutPlanDetailId(wmsOutPlanDetail.getWmsOutPlanDetailId()); + wmsOutPlanDetailEntity.setBaseKnifeId(baseKnife.getBaseKnifeId()); + wmsOutPlanDetailEntity.setRemark("一键清退无寿命物品"); + wmsOutPlanDetailEntity.setCreateBy(username); + wmsOutPlanDetailEntity.setCreateTime(new Date()); + wmsOutPlanDetailEntityMapper.insertWmsOutPlanDetailEntity(wmsOutPlanDetailEntity); + + // 锁定并出库台账明细实体 + this.baseKnifeMapper.updateBaseKnifeKnifeFineStateAndIsLockedByBaseKnifeId( + wmsOutPlanDetailEntity.getBaseKnifeId(), + 2, + 1 + ); + + // 增加计数 + count.getAndIncrement(); + }); + + // 构建出库任务 + WmsOutTask wmsOutTask = new WmsOutTask(); + wmsOutTask.setWmsOutPlanId(wmsOutPlan.getWmsOutPlanId()); + wmsOutTask.setWmsOutPlanCode(wmsOutPlan.getPlanCode()); + wmsOutTask.setWmsOutPlanDetailId(wmsOutPlanDetail.getWmsOutPlanDetailId()); + wmsOutTask.setWmsBusinessTypeId(wmsOutPlan.getWmsBusinessTypeId()); + wmsOutTask.setTaskCode(wmsOutPlan.getPlanCode()); + wmsOutTask.setTaskNumber(wmsOutPlanDetail.getPlannedQuantity()); + wmsOutTask.setOutNumber(wmsOutPlanDetail.getRealQuantity()); + wmsOutTask.setWmStorageAreaId(wmsOutPlanDetail.getWmStorageAreaId()); + wmsOutTask.setBatchNum("1"); + wmsOutTask.setMdItemId(wmsOutPlanDetail.getMdItemId()); + wmsOutTask.setMdItemCode(wmsOutPlanDetail.getMdItemCode()); + wmsOutTask.setMdItemName(wmsOutPlanDetail.getMdItemName()); + wmsOutTask.setMdItemUnit(wmsOutPlanDetail.getMdItemUnit()); + wmsOutTask.setTaskState("1"); + wmsOutTask.setRemark("一键清退无寿命物品"); + wmsOutTask.setCreateBy(username); + wmsOutTask.setCreateTime(new Date()); + wmsOutTaskMapper.insertWmsOutTask(wmsOutTask); + }); + }); + + // 返回数量 + return count.get(); + } + /** * 新增出库计划明细信息 * diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java index 71246d1..ee6637f 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java @@ -1,16 +1,16 @@ package com.ktg.mes.md.service.impl; import com.ktg.common.utils.DateUtils; -import com.ktg.mes.md.domain.WmsOutPlanDetailEntity; -import com.ktg.mes.md.domain.WmsOutTask; -import com.ktg.mes.md.mapper.BaseKnifeMapper; -import com.ktg.mes.md.mapper.WmsOutPlanDetailEntityMapper; -import com.ktg.mes.md.mapper.WmsOutTaskMapper; +import com.ktg.mes.md.domain.*; +import com.ktg.mes.md.mapper.*; import com.ktg.mes.md.service.IWmsOutTaskService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; /** @@ -30,6 +30,15 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { @Autowired private BaseKnifeMapper baseKnifeMapper; + @Autowired + private WmsOutPlanMapper wmsOutPlanMapper; + + @Autowired + private WmsBusinessTypeMapper wmsBusinessTypeMapper; + + @Autowired + private MdItemMapper mdItemMapper; + /** * 查询出库任务 * @@ -38,7 +47,63 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { */ @Override public WmsOutTask selectWmsOutTaskByWmsOutTaskId(Long wmsOutTaskId) { - return wmsOutTaskMapper.selectWmsOutTaskByWmsOutTaskId(wmsOutTaskId); + WmsOutTask wmsOutTask = wmsOutTaskMapper.selectWmsOutTaskByWmsOutTaskId(wmsOutTaskId); + + // 构建出库信息 + List> hashMapList = new ArrayList<>(); + + // 获得物料 + MdItem mdItem = this.mdItemMapper.selectMdItemById(wmsOutTask.getMdItemId()); + + // 获得当前出库计划明细实体列表,并遍历 + WmsOutPlanDetailEntity entityQuery = new WmsOutPlanDetailEntity(); + entityQuery.setWmsOutPlanDetailId(wmsOutTask.getWmsOutPlanDetailId()); + List wmsOutPlanDetailEntityList = wmsOutPlanDetailEntityMapper.selectWmsOutPlanDetailEntityList(entityQuery); + + wmsOutPlanDetailEntityList.forEach(nowWmsOutPlanDetailEntity -> { + // 根据出库实例对象获取出库计划明细 + WmsOutPlanDetail wmsOutPlanDetail = this.wmsOutPlanMapper.selectWmsOutPlanDetailById(nowWmsOutPlanDetailEntity.getWmsOutPlanDetailId()); + + // 根据计划明细获得出库计划 + WmsOutPlan wmsOutPlan = this.wmsOutPlanMapper.selectWmsOutPlanByWmsOutPlanId(wmsOutPlanDetail.getWmsOutPlanId()); + + // 根据出库计划获得出库类型 + WmsBusinessType wmsBusinessType = this.wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsOutPlan.getWmsBusinessTypeId().toString()); + + // 设定出库信息数据 + HashMap hashMap = new HashMap<>(); + /* 来自物料 */ + hashMap.put("mdItemId", mdItem.getItemId()); // 物料ID + hashMap.put("mdItemCode", mdItem.getItemCode()); // 物料编码 + hashMap.put("mdItemName", mdItem.getItemName()); // 物料名称 + /* 来自计划 */ + hashMap.put("planCode", wmsOutPlan.getPlanCode()); // 计划编号 + hashMap.put("planStatus", wmsOutPlan.getPlanState()); // 计划状态 + hashMap.put("planType", wmsOutPlan.getPlanType()); // 计划类型 + hashMap.put("useUsername", wmsOutPlan.getRecipientUsername()); // 领用人 + /* 来自出入库计划类型 */ + hashMap.put("planTypeId", wmsBusinessType.getTypeId()); // 出库类型ID + hashMap.put("planTypeCode", wmsBusinessType.getCode()); // 出库类型编码 + hashMap.put("planTypeName", wmsBusinessType.getName()); // 出库类型名称 + /* 来自计划明细 */ + hashMap.put("detailBatchNum", wmsOutPlanDetail.getDetailBatchNum()); // 明细批次 + hashMap.put("wmStorageAreaId", wmsOutPlanDetail.getWmStorageAreaId()); // 库位ID + hashMap.put("wmStorageAreaCode", wmsOutPlanDetail.getWmStorageAreaCode()); // 库位编码 + hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称 + hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态 + /* 实体 */ + String outTime = null; + if (nowWmsOutPlanDetailEntity.getCreateTime() != null) + outTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime()); + hashMap.put("outTime", outTime); // 出库时间 + hashMap.put("baseKnifeId", nowWmsOutPlanDetailEntity.getBaseKnifeId()); + hashMapList.add(hashMap); + + // 注入出库信息对象 + wmsOutTask.setOutInfoList(hashMapList); + }); + + return wmsOutTask; } /** diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmWarehouseController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmWarehouseController.java index d621649..c425286 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmWarehouseController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmWarehouseController.java @@ -53,14 +53,14 @@ public class WmWarehouseController extends BaseController return getDataTable(list); } - /** - * 查询树型的列表 - * @return - */ - @GetMapping("/getTreeList") - public AjaxResult getTreeList(){ - return AjaxResult.success(wmWarehouseService.getTreeList()); - } +// /** TODO E +// * 查询树型的列表 +// * @return +// */ +// @GetMapping("/getTreeList") +// public AjaxResult getTreeList(){ +// return AjaxResult.success(wmWarehouseService.getTreeList()); +// } /** * 导出仓库设置列表 diff --git a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml index 2c8c7c2..92afdea 100644 --- a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml @@ -561,4 +561,18 @@ FROM BASE_KNIFE BK WHERE MBB_BD_MRL_ID = #{mbbBdMrlId} + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/md/WmsBusinessTypeMapper.xml b/ktg-mes/src/main/resources/mapper/md/WmsBusinessTypeMapper.xml index be2a03f..e97a916 100644 --- a/ktg-mes/src/main/resources/mapper/md/WmsBusinessTypeMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/WmsBusinessTypeMapper.xml @@ -3,7 +3,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - @@ -68,47 +67,89 @@ @@ -120,92 +161,248 @@ insert into WMS_BUSINESS_TYPE - CREATE_BY, - CREATE_TIME, - UPDATE_BY, - MODIFY_DATE, - IS_ACTIVE, - IS_DELETE, - CODE, - NAME, - FLAG, - TYPE, - IS_DEFAULT, - IS_GLOBAL, - IS_NEED_UP, - QUALITY_TYPE, - IS_OUTBOUND_REVIEW, - WAVE_STRATEGY, - IS_MULTIPLE_ALLOWED, - IS_SHORTAGE_ALLOWED, - IS_EXCESS_ALLOWED, - IS_WHOLE_ORDER_POST, - IS_MANUALLY_CREATE, - IS_NO_TASK, - IS_NEGATIVE_INV, - IS_CHECK_SAFETY_STOCK, - IS_RECORD_INBOUND_TIME, - REMARK, + + CREATE_BY, + + + CREATE_TIME, + + + UPDATE_BY, + + + MODIFY_DATE, + + + IS_ACTIVE, + + + IS_DELETE, + + + CODE, + + + NAME, + + + FLAG, + + + TYPE, + + + IS_DEFAULT, + + + IS_GLOBAL, + + + IS_NEED_UP, + + + QUALITY_TYPE, + + + IS_OUTBOUND_REVIEW, + + + WAVE_STRATEGY, + + + IS_MULTIPLE_ALLOWED, + + + IS_SHORTAGE_ALLOWED, + + + IS_EXCESS_ALLOWED, + + + IS_WHOLE_ORDER_POST, + + + IS_MANUALLY_CREATE, + + + IS_NO_TASK, + + + IS_NEGATIVE_INV, + + + IS_CHECK_SAFETY_STOCK, + + + IS_RECORD_INBOUND_TIME, + + + REMARK, + - #{createBy}, - #{createTime}, - #{updateBy}, - #{modifyDate}, - #{isActive}, - #{isDelete}, - #{code}, - #{name}, - #{flag}, - #{type}, - #{isDefault}, - #{isGlobal}, - #{isNeedUp}, - #{qualityType}, - #{isOutboundReview}, - #{waveStrategy}, - #{isMultipleAllowed}, - #{isShortageAllowed}, - #{isExcessAllowed}, - #{isWholeOrderPost}, - #{isManuallyCreate}, - #{isNoTask}, - #{isNegativeInv}, - #{isCheckSafetyStock}, - #{isRecordInboundTime}, - #{remark}, + + #{createBy}, + + + #{createTime}, + + + #{updateBy}, + + + #{modifyDate}, + + + #{isActive}, + + + #{isDelete}, + + + #{code}, + + + #{name}, + + + #{flag}, + + + #{type}, + + + #{isDefault}, + + + #{isGlobal}, + + + #{isNeedUp}, + + + #{qualityType}, + + + #{isOutboundReview}, + + + #{waveStrategy}, + + + #{isMultipleAllowed}, + + + #{isShortageAllowed}, + + + #{isExcessAllowed}, + + + #{isWholeOrderPost}, + + + #{isManuallyCreate}, + + + #{isNoTask}, + + + #{isNegativeInv}, + + + #{isCheckSafetyStock}, + + + #{isRecordInboundTime}, + + + #{remark}, + update WMS_BUSINESS_TYPE - CREATE_BY = #{createBy}, - CREATE_TIME = #{createTime}, - UPDATE_BY = #{updateBy}, - MODIFY_DATE = #{modifyDate}, - IS_ACTIVE = #{isActive}, - IS_DELETE = #{isDelete}, - CODE = #{code}, - NAME = #{name}, - FLAG = #{flag}, - TYPE = #{type}, - IS_DEFAULT = #{isDefault}, - IS_GLOBAL = #{isGlobal}, - IS_NEED_UP = #{isNeedUp}, - QUALITY_TYPE = #{qualityType}, - IS_OUTBOUND_REVIEW = #{isOutboundReview}, - WAVE_STRATEGY = #{waveStrategy}, - IS_MULTIPLE_ALLOWED = #{isMultipleAllowed}, - IS_SHORTAGE_ALLOWED = #{isShortageAllowed}, - IS_EXCESS_ALLOWED = #{isExcessAllowed}, - IS_WHOLE_ORDER_POST = #{isWholeOrderPost}, - IS_MANUALLY_CREATE = #{isManuallyCreate}, - IS_NO_TASK = #{isNoTask}, - IS_NEGATIVE_INV = #{isNegativeInv}, - IS_CHECK_SAFETY_STOCK = #{isCheckSafetyStock}, - IS_RECORD_INBOUND_TIME = #{isRecordInboundTime}, - REMARK = #{remark}, + + CREATE_BY = #{createBy}, + + + CREATE_TIME = #{createTime}, + + + UPDATE_BY = #{updateBy}, + + + MODIFY_DATE = #{modifyDate}, + + + IS_ACTIVE = #{isActive}, + + + IS_DELETE = #{isDelete}, + + + CODE = #{code}, + + + NAME = #{name}, + + + FLAG = #{flag}, + + + TYPE = #{type}, + + + IS_DEFAULT = #{isDefault}, + + + IS_GLOBAL = #{isGlobal}, + + + IS_NEED_UP = #{isNeedUp}, + + + QUALITY_TYPE = #{qualityType}, + + + IS_OUTBOUND_REVIEW = #{isOutboundReview}, + + + WAVE_STRATEGY = #{waveStrategy}, + + + IS_MULTIPLE_ALLOWED = #{isMultipleAllowed}, + + + IS_SHORTAGE_ALLOWED = #{isShortageAllowed}, + + + IS_EXCESS_ALLOWED = #{isExcessAllowed}, + + + IS_WHOLE_ORDER_POST = #{isWholeOrderPost}, + + + IS_MANUALLY_CREATE = #{isManuallyCreate}, + + + IS_NO_TASK = #{isNoTask}, + + + IS_NEGATIVE_INV = #{isNegativeInv}, + + + IS_CHECK_SAFETY_STOCK = #{isCheckSafetyStock}, + + + IS_RECORD_INBOUND_TIME = #{isRecordInboundTime}, + + + REMARK = #{remark}, + where TYPE_ID = #{typeId} @@ -216,9 +413,15 @@ - update WMS_BUSINESS_TYPE set IS_DELETE = 1 where TYPE_ID in + update WMS_BUSINESS_TYPE + set IS_DELETE = 1 where TYPE_ID in #{typeId} + + \ No newline at end of file