diff --git a/doc/设计文档/数据库设计/mes-wm.sql b/doc/设计文档/数据库设计/mes-wm.sql index 1c3ba13..cbc9a8a 100644 --- a/doc/设计文档/数据库设计/mes-wm.sql +++ b/doc/设计文档/数据库设计/mes-wm.sql @@ -238,6 +238,9 @@ create table wm_item_recpt_line ( area_code varchar(64) comment '库位编码', area_name varchar(255) comment '库位名称', expire_date datetime comment '有效期', + iqc_check char(1) comment '是否来料检验', + iqc_id bigint(20) comment '来料检验单ID', + iqc_code varchar(64) comment '来料检验单编号', remark varchar(500) default '' comment '备注', attr1 varchar(64) default null comment '预留字段1', attr2 varchar(255) default null comment '预留字段2', @@ -767,7 +770,10 @@ create table wm_product_salse_line ( location_name varchar(255) comment '库区名称', area_id bigint(20) comment '库位ID', area_code varchar(64) comment '库位编码', - area_name varchar(255) comment '库位名称', + area_name varchar(255) comment '库位名称', + oqc_check char(1) comment '是否出货检验', + oqc_id bigint(20) comment '出货检验单ID', + oqc_code varchar(64) comment '出货检验单编号', remark varchar(500) default '' comment '备注', attr1 varchar(64) default null comment '预留字段1', attr2 varchar(255) default null comment '预留字段2', diff --git a/doc/设计文档/数据库设计/数据库设计.xlsx b/doc/设计文档/数据库设计/数据库设计.xlsx index fb142eb..55f1a41 100644 Binary files a/doc/设计文档/数据库设计/数据库设计.xlsx and b/doc/设计文档/数据库设计/数据库设计.xlsx differ diff --git a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProFeedbackController.java b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProFeedbackController.java index ea149d8..c213d0f 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProFeedbackController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProFeedbackController.java @@ -20,6 +20,7 @@ import com.ktg.mes.wm.domain.tx.ProductProductTxBean; import com.ktg.mes.wm.service.IStorageCoreService; import com.ktg.mes.wm.service.IWmItemConsumeService; import com.ktg.mes.wm.service.IWmProductProduceService; +import com.ktg.system.strategy.AutoCodeUtil; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -73,6 +74,9 @@ public class ProFeedbackController extends BaseController @Autowired private IStorageCoreService storageCoreService; + @Autowired + private AutoCodeUtil autoCodeUtil; + /** * 查询生产报工记录列表 */ @@ -147,7 +151,8 @@ public class ProFeedbackController extends BaseController return AjaxResult.error("请输入合格品和不良品数量!"); } } - + String feedbackCode = autoCodeUtil.genSerialCode(UserConstants.FEEDBACK_CODE,""); + proFeedback.setFeedbackCode(feedbackCode); proFeedback.setCreateBy(getUsername()); return toAjax(proFeedbackService.insertProFeedback(proFeedback)); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/mobile/ProFeedBackMobController.java b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/mobile/ProFeedBackMobController.java index 563d46a..07ff0fb 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/mobile/ProFeedBackMobController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/mobile/ProFeedBackMobController.java @@ -14,6 +14,7 @@ import com.ktg.mes.pro.domain.ProFeedback; import com.ktg.mes.pro.domain.ProRouteProcess; import com.ktg.mes.pro.service.IProFeedbackService; import com.ktg.mes.pro.service.IProRouteProcessService; +import com.ktg.system.strategy.AutoCodeUtil; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -36,6 +37,9 @@ public class ProFeedBackMobController extends BaseController { @Autowired private IProRouteProcessService proRouteProcessService; + @Autowired + private AutoCodeUtil autoCodeUtil; + /** * 新增生产报工记录 */ @@ -77,7 +81,8 @@ public class ProFeedBackMobController extends BaseController { return AjaxResult.error("请输入合格品和不良品数量!"); } } - + String feedbackCode = autoCodeUtil.genSerialCode(UserConstants.FEEDBACK_CODE,""); + proFeedback.setFeedbackCode(feedbackCode); proFeedback.setCreateBy(getUsername()); proFeedbackService.insertProFeedback(proFeedback); return AjaxResult.success(proFeedback); diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmItemRecptLine.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmItemRecptLine.java index 58f66a4..4976c15 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmItemRecptLine.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmItemRecptLine.java @@ -94,6 +94,21 @@ public class WmItemRecptLine extends BaseEntity @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd") private Date expireDate; + /** + * 是否来料检验 + */ + private String iqcCheck; + + /** + * 来料检验单ID + */ + private Long iqcId; + + /** + * 来料检验单编码 + */ + private String iqcCode; + /** 预留字段1 */ private String attr1; @@ -277,7 +292,32 @@ public class WmItemRecptLine extends BaseEntity { return expireDate; } - public void setAttr1(String attr1) + + public String getIqcCheck() { + return iqcCheck; + } + + public void setIqcCheck(String iqcCheck) { + this.iqcCheck = iqcCheck; + } + + public Long getIqcId() { + return iqcId; + } + + public void setIqcId(Long iqcId) { + this.iqcId = iqcId; + } + + public String getIqcCode() { + return iqcCode; + } + + public void setIqcCode(String iqcCode) { + this.iqcCode = iqcCode; + } + + public void setAttr1(String attr1) { this.attr1 = attr1; } @@ -316,35 +356,33 @@ public class WmItemRecptLine extends BaseEntity @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("lineId", getLineId()) - .append("recptId", getRecptId()) - .append("itemId", getItemId()) - .append("itemCode", getItemCode()) - .append("itemName", getItemName()) - .append("specification", getSpecification()) - .append("unitOfMeasure", getUnitOfMeasure()) - .append("quantityRecived", getQuantityRecived()) - .append("batchCode", getBatchCode()) - .append("warehouseId", getWarehouseId()) - .append("warehouseCode", getWarehouseCode()) - .append("warehouseName", getWarehouseName()) - .append("locationId", getLocationId()) - .append("locationCode", getLocationCode()) - .append("locationName", getLocationName()) - .append("areaId", getAreaId()) - .append("areaCode", getAreaCode()) - .append("areaName", getAreaName()) - .append("expireDate", getExpireDate()) - .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 "WmItemRecptLine{" + + "lineId=" + lineId + + ", recptId=" + recptId + + ", itemId=" + itemId + + ", itemCode='" + itemCode + '\'' + + ", itemName='" + itemName + '\'' + + ", specification='" + specification + '\'' + + ", unitOfMeasure='" + unitOfMeasure + '\'' + + ", quantityRecived=" + quantityRecived + + ", batchCode='" + batchCode + '\'' + + ", warehouseId=" + warehouseId + + ", warehouseCode='" + warehouseCode + '\'' + + ", warehouseName='" + warehouseName + '\'' + + ", locationId=" + locationId + + ", locationCode='" + locationCode + '\'' + + ", locationName='" + locationName + '\'' + + ", areaId=" + areaId + + ", areaCode='" + areaCode + '\'' + + ", areaName='" + areaName + '\'' + + ", expireDate=" + expireDate + + ", iqcCheck='" + iqcCheck + '\'' + + ", iqcId=" + iqcId + + ", iqcCode='" + iqcCode + '\'' + + ", attr1='" + attr1 + '\'' + + ", attr2='" + attr2 + '\'' + + ", attr3=" + attr3 + + ", attr4=" + attr4 + + '}'; } } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalseLine.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalseLine.java index ddfd79e..48cc9ef 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalseLine.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalseLine.java @@ -91,6 +91,21 @@ public class WmProductSalseLine extends BaseEntity @Excel(name = "库位名称") private String areaName; + /** + * 是否出厂检验 + */ + private String oqcCheck; + + /** + * 出厂检验单ID + */ + private Long oqcId; + + /** + * 出厂检验单编码 + */ + private String oqcCode; + /** 预留字段1 */ private String attr1; @@ -274,7 +289,32 @@ public class WmProductSalseLine extends BaseEntity { return areaName; } - public void setAttr1(String attr1) + + public String getOqcCheck() { + return oqcCheck; + } + + public void setOqcCheck(String oqcCheck) { + this.oqcCheck = oqcCheck; + } + + public Long getOqcId() { + return oqcId; + } + + public void setOqcId(Long oqcId) { + this.oqcId = oqcId; + } + + public String getOqcCode() { + return oqcCode; + } + + public void setOqcCode(String oqcCode) { + this.oqcCode = oqcCode; + } + + public void setAttr1(String attr1) { this.attr1 = attr1; } @@ -313,35 +353,33 @@ public class WmProductSalseLine extends BaseEntity @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("lineId", getLineId()) - .append("salseId", getSalseId()) - .append("materialStockId", getMaterialStockId()) - .append("itemId", getItemId()) - .append("itemCode", getItemCode()) - .append("itemName", getItemName()) - .append("specification", getSpecification()) - .append("unitOfMeasure", getUnitOfMeasure()) - .append("quantitySalse", getQuantitySalse()) - .append("batchCode", getBatchCode()) - .append("warehouseId", getWarehouseId()) - .append("warehouseCode", getWarehouseCode()) - .append("warehouseName", getWarehouseName()) - .append("locationId", getLocationId()) - .append("locationCode", getLocationCode()) - .append("locationName", getLocationName()) - .append("areaId", getAreaId()) - .append("areaCode", getAreaCode()) - .append("areaName", getAreaName()) - .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 "WmProductSalseLine{" + + "lineId=" + lineId + + ", salseId=" + salseId + + ", materialStockId=" + materialStockId + + ", itemId=" + itemId + + ", itemCode='" + itemCode + '\'' + + ", itemName='" + itemName + '\'' + + ", specification='" + specification + '\'' + + ", unitOfMeasure='" + unitOfMeasure + '\'' + + ", quantitySalse=" + quantitySalse + + ", batchCode='" + batchCode + '\'' + + ", warehouseId=" + warehouseId + + ", warehouseCode='" + warehouseCode + '\'' + + ", warehouseName='" + warehouseName + '\'' + + ", locationId=" + locationId + + ", locationCode='" + locationCode + '\'' + + ", locationName='" + locationName + '\'' + + ", areaId=" + areaId + + ", areaCode='" + areaCode + '\'' + + ", areaName='" + areaName + '\'' + + ", oqcCheck='" + oqcCheck + '\'' + + ", oqcId=" + oqcId + + ", oqcCode='" + oqcCode + '\'' + + ", attr1='" + attr1 + '\'' + + ", attr2='" + attr2 + '\'' + + ", attr3=" + attr3 + + ", attr4=" + attr4 + + '}'; } } diff --git a/ktg-mes/src/main/resources/mapper/wm/WmItemRecptLineMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmItemRecptLineMapper.xml index 43c2912..eb5d9df 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmItemRecptLineMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmItemRecptLineMapper.xml @@ -24,6 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -36,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select line_id, recpt_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_recived, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, expire_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt_line + select line_id, recpt_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_recived, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, expire_date,iqc_check,iqc_id,iqc_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt_line @@ -90,6 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" area_id, area_code, area_name, + oqc_check, + oqc_id, + oqc_code, remark, attr1, attr2, @@ -119,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{areaId}, #{areaCode}, #{areaName}, + #{oqcCheck}, + #{oqcId}, + #{oqcCode}, #{remark}, #{attr1}, #{attr2}, @@ -152,6 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" area_id = #{areaId}, area_code = #{areaCode}, area_name = #{areaName}, + oqc_check = #{oqcCheck}, + oqc_id = #{oqcId}, + oqc_code = #{oqcCode}, remark = #{remark}, attr1 = #{attr1}, attr2 = #{attr2},