diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index cbb04c5..4f604f4 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -703,6 +703,16 @@ public class BaseKnifeController extends BaseController for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) { WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity(); wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i++).getBaseKnifeId()); + wmsOutPlanDetailEntity.setAreaCode(baseKnifeListOutPlan.get(i++).getAreaCode()); + wmsOutPlanDetailEntity.setItemOrProduct(baseKnifeListOutPlan.get(i++).getItemOrProduct()); + wmsOutPlanDetailEntity.setKnifeCode(baseKnifeListOutPlan.get(i++).getKnifeCode()); + wmsOutPlanDetailEntity.setKnifeName(baseKnifeListOutPlan.get(i++).getKnifeName()); + wmsOutPlanDetailEntity.setPlanSheet(baseKnifeListOutPlan.get(i++).getPlanSheet()); + wmsOutPlanDetailEntity.setKnifeLife(baseKnifeListOutPlan.get(i++).getKnifeLife()); + wmsOutPlanDetailEntity.setResetCount(baseKnifeListOutPlan.get(i++).getResetCount()); + wmsOutPlanDetailEntity.setKnifeUnit(baseKnifeListOutPlan.get(i++).getKnifeUnit()); + wmsOutPlanDetailEntity.setSafeStock(baseKnifeListOutPlan.get(i++).getKnifeType()); + wmsOutPlanDetailEntity.setStandardQuantity(baseKnifeListOutPlan.get(i++).getStandardQuantity()); wmsOutPlanDetailEntity.setWmsOutPlanDetailId(outPlanDetail.getWmsOutPlanDetailId()); wmsOutPlanDetailEntity.setCreateBy(getUsername()); wmsOutPlanDetailEntity.setCreateTime(DateUtils.getNowDate()); diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutPlanDetailEntity.java b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutPlanDetailEntity.java index 0f7690e..0673036 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutPlanDetailEntity.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsOutPlanDetailEntity.java @@ -1,15 +1,15 @@ 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 com.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; /** * 出库计划明细实体对象 WMS_OUT_PLAN_DETAIL_ENTITY * * @author yinjinlu - * @date 2024-11-01 + * @date 2024-11-11 */ public class WmsOutPlanDetailEntity extends BaseEntity { private static final long serialVersionUID = 1L; @@ -20,15 +20,15 @@ public class WmsOutPlanDetailEntity extends BaseEntity { private Long wmsOutPlanDetailEntityId; /** - * 出库计划明细 + * 所属出库计划明细 */ - @Excel(name = "出库计划明细") + @Excel(name = "所属出库计划明细") private Long wmsOutPlanDetailId; /** - * 工具台账 + * 所属工具台账 */ - @Excel(name = "工具台账") + @Excel(name = "所属工具台账") private Long baseKnifeId; /** @@ -51,62 +51,202 @@ public class WmsOutPlanDetailEntity extends BaseEntity { */ private Integer attr4; - public Long getWmsOutPlanDetailEntityId() { - return wmsOutPlanDetailEntityId; - } + /** + * 库位编码 + */ + @Excel(name = "库位编码") + private String areaCode; + + /** + * 物料或整刀 + */ + @Excel(name = "物料或整刀") + private String itemOrProduct; + + /** + * 工具编码 + */ + @Excel(name = "工具编码") + private String knifeCode; + + /** + * 工具名称 + */ + @Excel(name = "工具名称") + private String knifeName; + + /** + * 归属计划单 + */ + @Excel(name = "归属计划单") + private String planSheet; + + /** + * 工具寿命 + */ + @Excel(name = "工具寿命") + private Integer knifeLife; + + /** + * 重置次数 + */ + @Excel(name = "重置次数") + private Integer resetCount; + + /** + * 计量单位 + */ + @Excel(name = "计量单位") + private String knifeUnit; + + /** + * 安全库存 + */ + @Excel(name = "安全库存") + private String safeStock; + + /** + * 标准数量 + */ + @Excel(name = "标准数量") + private String standardQuantity; public void setWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId) { this.wmsOutPlanDetailEntityId = wmsOutPlanDetailEntityId; } - public Long getWmsOutPlanDetailId() { - return wmsOutPlanDetailId; + public Long getWmsOutPlanDetailEntityId() { + return wmsOutPlanDetailEntityId; } public void setWmsOutPlanDetailId(Long wmsOutPlanDetailId) { this.wmsOutPlanDetailId = wmsOutPlanDetailId; } - public Long getBaseKnifeId() { - return baseKnifeId; + public Long getWmsOutPlanDetailId() { + return wmsOutPlanDetailId; } public void setBaseKnifeId(Long baseKnifeId) { this.baseKnifeId = baseKnifeId; } - public String getAttr1() { - return attr1; + public Long getBaseKnifeId() { + return baseKnifeId; } public void setAttr1(String attr1) { this.attr1 = attr1; } - public String getAttr2() { - return attr2; + public String getAttr1() { + return attr1; } public void setAttr2(String attr2) { this.attr2 = attr2; } - public Integer getAttr3() { - return attr3; + public String getAttr2() { + return attr2; } public void setAttr3(Integer attr3) { this.attr3 = attr3; } - public Integer getAttr4() { - return attr4; + public Integer getAttr3() { + return attr3; } public void setAttr4(Integer attr4) { this.attr4 = attr4; } + public Integer getAttr4() { + return attr4; + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaCode() { + return areaCode; + } + + public void setItemOrProduct(String itemOrProduct) { + this.itemOrProduct = itemOrProduct; + } + + public String getItemOrProduct() { + return itemOrProduct; + } + + public void setKnifeCode(String knifeCode) { + this.knifeCode = knifeCode; + } + + public String getKnifeCode() { + return knifeCode; + } + + public void setKnifeName(String knifeName) { + this.knifeName = knifeName; + } + + public String getKnifeName() { + return knifeName; + } + + public void setPlanSheet(String planSheet) { + this.planSheet = planSheet; + } + + public String getPlanSheet() { + return planSheet; + } + + public void setKnifeLife(Integer knifeLife) { + this.knifeLife = knifeLife; + } + + public Integer getKnifeLife() { + return knifeLife; + } + + public void setResetCount(Integer resetCount) { + this.resetCount = resetCount; + } + + public Integer getResetCount() { + return resetCount; + } + + public void setKnifeUnit(String knifeUnit) { + this.knifeUnit = knifeUnit; + } + + public String getKnifeUnit() { + return knifeUnit; + } + + public void setSafeStock(String safeStock) { + this.safeStock = safeStock; + } + + public String getSafeStock() { + return safeStock; + } + + public void setStandardQuantity(String standardQuantity) { + this.standardQuantity = standardQuantity; + } + + public String getStandardQuantity() { + return standardQuantity; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) @@ -122,6 +262,16 @@ public class WmsOutPlanDetailEntity extends BaseEntity { .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("areaCode", getAreaCode()) + .append("itemOrProduct", getItemOrProduct()) + .append("knifeCode", getKnifeCode()) + .append("knifeName", getKnifeName()) + .append("planSheet", getPlanSheet()) + .append("knifeLife", getKnifeLife()) + .append("resetCount", getResetCount()) + .append("knifeUnit", getKnifeUnit()) + .append("safeStock", getSafeStock()) + .append("standardQuantity", getStandardQuantity()) .toString(); } -} +} \ No newline at end of file diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsOutPlanDetailEntityMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsOutPlanDetailEntityMapper.java index 748f22d..b36de7a 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsOutPlanDetailEntityMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsOutPlanDetailEntityMapper.java @@ -1,14 +1,14 @@ package com.ktg.mes.md.mapper; -import com.ktg.mes.md.domain.WmsOutPlanDetailEntity; - import java.util.List; +import com.ktg.mes.md.domain.WmsOutPlanDetailEntity; + /** * 出库计划明细实体Mapper接口 * * @author yinjinlu - * @date 2024-11-01 + * @date 2024-11-11 */ public interface WmsOutPlanDetailEntityMapper { /** @@ -17,7 +17,7 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntityId 出库计划明细实体主键 * @return 出库计划明细实体 */ - WmsOutPlanDetailEntity selectWmsOutPlanDetailEntityByWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId); + public WmsOutPlanDetailEntity selectWmsOutPlanDetailEntityByWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId); /** * 查询出库计划明细实体列表 @@ -25,7 +25,7 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntity 出库计划明细实体 * @return 出库计划明细实体集合 */ - List selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); + public List selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); /** * 新增出库计划明细实体 @@ -33,7 +33,7 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntity 出库计划明细实体 * @return 结果 */ - int insertWmsOutPlanDetailEntity(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); + public int insertWmsOutPlanDetailEntity(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); /** * 修改出库计划明细实体 @@ -41,7 +41,7 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntity 出库计划明细实体 * @return 结果 */ - int updateWmsOutPlanDetailEntity(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); + public int updateWmsOutPlanDetailEntity(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); /** * 删除出库计划明细实体 @@ -49,7 +49,7 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntityId 出库计划明细实体主键 * @return 结果 */ - int deleteWmsOutPlanDetailEntityByWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId); + public int deleteWmsOutPlanDetailEntityByWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId); /** * 批量删除出库计划明细实体 @@ -57,5 +57,5 @@ public interface WmsOutPlanDetailEntityMapper { * @param wmsOutPlanDetailEntityIds 需要删除的数据主键集合 * @return 结果 */ - int deleteWmsOutPlanDetailEntityByWmsOutPlanDetailEntityIds(Long[] wmsOutPlanDetailEntityIds); -} + public int deleteWmsOutPlanDetailEntityByWmsOutPlanDetailEntityIds(Long[] wmsOutPlanDetailEntityIds); +} \ No newline at end of file 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 37d253b..ea07902 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 @@ -158,6 +158,16 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity(); wmsOutPlanDetailEntity.setWmsOutPlanDetailId(wmsOutPlanDetail.getWmsOutPlanDetailId()); wmsOutPlanDetailEntity.setBaseKnifeId(baseKnife.getBaseKnifeId()); + wmsOutPlanDetailEntity.setAreaCode(baseKnife.getAreaCode()); + wmsOutPlanDetailEntity.setItemOrProduct(baseKnife.getItemOrProduct()); + wmsOutPlanDetailEntity.setKnifeCode(baseKnife.getKnifeCode()); + wmsOutPlanDetailEntity.setKnifeName(baseKnife.getKnifeName()); + wmsOutPlanDetailEntity.setPlanSheet(baseKnife.getPlanSheet()); + wmsOutPlanDetailEntity.setKnifeLife(baseKnife.getKnifeLife()); + wmsOutPlanDetailEntity.setResetCount(baseKnife.getResetCount()); + wmsOutPlanDetailEntity.setKnifeUnit(baseKnife.getKnifeUnit()); + wmsOutPlanDetailEntity.setSafeStock(baseKnife.getKnifeType()); + wmsOutPlanDetailEntity.setStandardQuantity(baseKnife.getStandardQuantity()); // 插入出库计划明细实体 this.wmsOutPlanDetailEntityMapper.insertWmsOutPlanDetailEntity(wmsOutPlanDetailEntity); @@ -325,6 +335,16 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity(); wmsOutPlanDetailEntity.setWmsOutPlanDetailId(wmsOutPlanDetail.getWmsOutPlanDetailId()); wmsOutPlanDetailEntity.setBaseKnifeId(baseKnife.getBaseKnifeId()); + wmsOutPlanDetailEntity.setAreaCode(baseKnife.getAreaCode()); + wmsOutPlanDetailEntity.setItemOrProduct(baseKnife.getItemOrProduct()); + wmsOutPlanDetailEntity.setKnifeCode(baseKnife.getKnifeCode()); + wmsOutPlanDetailEntity.setKnifeName(baseKnife.getKnifeName()); + wmsOutPlanDetailEntity.setPlanSheet(baseKnife.getPlanSheet()); + wmsOutPlanDetailEntity.setKnifeLife(baseKnife.getKnifeLife()); + wmsOutPlanDetailEntity.setResetCount(baseKnife.getResetCount()); + wmsOutPlanDetailEntity.setKnifeUnit(baseKnife.getKnifeUnit()); + wmsOutPlanDetailEntity.setSafeStock(baseKnife.getKnifeType()); + wmsOutPlanDetailEntity.setStandardQuantity(baseKnife.getStandardQuantity()); wmsOutPlanDetailEntity.setRemark("一键清退无寿命物品"); wmsOutPlanDetailEntity.setCreateBy(username); wmsOutPlanDetailEntity.setCreateTime(new Date()); 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 ee6637f..2feba77 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 @@ -97,6 +97,8 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { outTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime()); hashMap.put("outTime", outTime); // 出库时间 hashMap.put("baseKnifeId", nowWmsOutPlanDetailEntity.getBaseKnifeId()); + hashMap.put("knifeLife", nowWmsOutPlanDetailEntity.getKnifeLife()); + hashMap.put("resetCount", nowWmsOutPlanDetailEntity.getResetCount()); hashMapList.add(hashMap); // 注入出库信息对象 diff --git a/ktg-mes/src/main/resources/mapper/md/WmsOutPlanDetailEntityMapper.xml b/ktg-mes/src/main/resources/mapper/md/WmsOutPlanDetailEntityMapper.xml index eb71f9f..45971d7 100644 --- a/ktg-mes/src/main/resources/mapper/md/WmsOutPlanDetailEntityMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/WmsOutPlanDetailEntityMapper.xml @@ -3,6 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + @@ -16,6 +17,16 @@ + + + + + + + + + + @@ -30,7 +41,17 @@ CREATE_BY, CREATE_TIME, UPDATE_BY, - UPDATE_TIME + UPDATE_TIME, + AREA_CODE, + ITEM_OR_PRODUCT, + KNIFE_CODE, + KNIFE_NAME, + PLAN_SHEET, + KNIFE_LIFE, + RESET_COUNT, + KNIFE_UNIT, + SAFE_STOCK, + STANDARD_QUANTITY from WMS_OUT_PLAN_DETAIL_ENTITY @@ -38,26 +59,24 @@ resultMap="WmsOutPlanDetailEntityResult"> - - and WMS_OUT_PLAN_DETAIL_ID = #{wmsOutPlanDetailId} - - - and BASE_KNIFE_ID = #{baseKnifeId} - - - and REMARK like concat('%', #{remark}, '%') - - - and CREATE_BY = #{createBy} - - - and CREATE_TIME = #{createTime} - - - and UPDATE_BY = #{updateBy} - - - and UPDATE_TIME = #{updateTime} + and WMS_OUT_PLAN_DETAIL_ID = #{wmsOutPlanDetailId} + and BASE_KNIFE_ID = #{baseKnifeId} + and REMARK like concat('%', #{remark}, '%') + and CREATE_BY = #{createBy} + and CREATE_TIME = #{createTime} + and UPDATE_BY = #{updateBy} + and UPDATE_TIME = #{updateTime} + and AREA_CODE = #{areaCode} + and ITEM_OR_PRODUCT = #{itemOrProduct} + and KNIFE_CODE = #{knifeCode} + and KNIFE_NAME = #{knifeName} + and PLAN_SHEET = #{planSheet} + and KNIFE_LIFE = #{knifeLife} + and RESET_COUNT = #{resetCount} + and KNIFE_UNIT = #{knifeUnit} + and SAFE_STOCK = #{safeStock} + and STANDARD_QUANTITY = + #{standardQuantity} @@ -72,113 +91,77 @@ keyProperty="wmsOutPlanDetailEntityId"> insert into WMS_OUT_PLAN_DETAIL_ENTITY - - WMS_OUT_PLAN_DETAIL_ID, - - - BASE_KNIFE_ID, - - - REMARK, - - - ATTR1, - - - ATTR2, - - - ATTR3, - - - ATTR4, - - - CREATE_BY, - - - CREATE_TIME, - - - UPDATE_BY, - - - UPDATE_TIME, - + WMS_OUT_PLAN_DETAIL_ID, + BASE_KNIFE_ID, + REMARK, + ATTR1, + ATTR2, + ATTR3, + ATTR4, + CREATE_BY, + CREATE_TIME, + UPDATE_BY, + UPDATE_TIME, + AREA_CODE, + ITEM_OR_PRODUCT, + KNIFE_CODE, + KNIFE_NAME, + PLAN_SHEET, + KNIFE_LIFE, + RESET_COUNT, + KNIFE_UNIT, + SAFE_STOCK, + STANDARD_QUANTITY, - - #{wmsOutPlanDetailId}, - - - #{baseKnifeId}, - - - #{remark}, - - - #{attr1}, - - - #{attr2}, - - - #{attr3}, - - - #{attr4}, - - - #{createBy}, - - - #{createTime}, - - - #{updateBy}, - - - #{updateTime}, - + #{wmsOutPlanDetailId}, + #{baseKnifeId}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{areaCode}, + #{itemOrProduct}, + #{knifeCode}, + #{knifeName}, + #{planSheet}, + #{knifeLife}, + #{resetCount}, + #{knifeUnit}, + #{safeStock}, + #{standardQuantity}, update WMS_OUT_PLAN_DETAIL_ENTITY - - WMS_OUT_PLAN_DETAIL_ID = #{wmsOutPlanDetailId}, - - - BASE_KNIFE_ID = #{baseKnifeId}, - - - REMARK = #{remark}, - - - ATTR1 = #{attr1}, - - - ATTR2 = #{attr2}, - - - ATTR3 = #{attr3}, - - - ATTR4 = #{attr4}, - - - CREATE_BY = #{createBy}, - - - CREATE_TIME = #{createTime}, - - - UPDATE_BY = #{updateBy}, - - - UPDATE_TIME = #{updateTime}, - + WMS_OUT_PLAN_DETAIL_ID = #{wmsOutPlanDetailId}, + BASE_KNIFE_ID = #{baseKnifeId}, + REMARK = #{remark}, + ATTR1 = #{attr1}, + ATTR2 = #{attr2}, + ATTR3 = #{attr3}, + ATTR4 = #{attr4}, + CREATE_BY = #{createBy}, + CREATE_TIME = #{createTime}, + UPDATE_BY = #{updateBy}, + UPDATE_TIME = #{updateTime}, + AREA_CODE = #{areaCode}, + ITEM_OR_PRODUCT = #{itemOrProduct}, + KNIFE_CODE = #{knifeCode}, + KNIFE_NAME = #{knifeName}, + PLAN_SHEET = #{planSheet}, + KNIFE_LIFE = #{knifeLife}, + RESET_COUNT = #{resetCount}, + KNIFE_UNIT = #{knifeUnit}, + SAFE_STOCK = #{safeStock}, + STANDARD_QUANTITY = #{standardQuantity}, where WMS_OUT_PLAN_DETAIL_ENTITY_ID = #{wmsOutPlanDetailEntityId} @@ -190,8 +173,7 @@ - delete - from WMS_OUT_PLAN_DETAIL_ENTITY where WMS_OUT_PLAN_DETAIL_ENTITY_ID in + delete from WMS_OUT_PLAN_DETAIL_ENTITY where WMS_OUT_PLAN_DETAIL_ENTITY_ID in #{wmsOutPlanDetailEntityId}