采购入库和销售出库将检验单挪到行上,根据行上是否检验以及是否有检验单生成待检任务

This commit is contained in:
yinjinlu-pc\尹金路 2023-10-10 18:15:37 +08:00
parent 00f636a165
commit 5cd871df7d
8 changed files with 183 additions and 67 deletions

View File

@ -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',
@ -768,6 +771,9 @@ create table wm_product_salse_line (
area_id bigint(20) comment '库位ID',
area_code varchar(64) 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',

View File

@ -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));
}

View File

@ -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);

View File

@ -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,6 +292,31 @@ public class WmItemRecptLine extends BaseEntity
{
return expireDate;
}
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 +
'}';
}
}

View File

@ -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,6 +289,31 @@ public class WmProductSalseLine extends BaseEntity
{
return areaName;
}
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 +
'}';
}
}

View File

@ -24,6 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaCode" column="area_code" />
<result property="areaName" column="area_name" />
<result property="expireDate" column="expire_date" />
<result property="iqcCheck" column="iqc_check" ></result>
<result property="iqcId" column="iqc_id"></result>
<result property="iqcCode" column="iqc_code"></result>
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
@ -36,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmItemRecptLineVo">
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
</sql>
<select id="selectWmItemRecptLineList" parameterType="WmItemRecptLine" resultMap="WmItemRecptLineResult">
@ -90,6 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaCode != null">area_code,</if>
<if test="areaName != null">area_name,</if>
<if test="expireDate != null">expire_date,</if>
<if test="iqcCheck != null">iqc_check,</if>
<if test="iqcId != null">iqc_id,</if>
<if test="iqcCode != null">iqc_code,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@ -119,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaCode != null">#{areaCode},</if>
<if test="areaName != null">#{areaName},</if>
<if test="expireDate != null">#{expireDate},</if>
<if test="iqcCheck != null">#{iqcCheck},</if>
<if test="iqcId != null">#{iqcId},</if>
<if test="iqcCode != null">#{iqcCode},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
@ -152,6 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="areaName != null">area_name = #{areaName},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="iqcCheck != null">iqc_check = #{iqcCheck},</if>
<if test="iqcId != null">iqc_id = #{iqcId},</if>
<if test="iqcCode != null">iqc_code = #{iqcCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>

View File

@ -24,6 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaId" column="area_id" />
<result property="areaCode" column="area_code" />
<result property="areaName" column="area_name" />
<result property="oqcCheck" column="oqc_check"></result>
<result property="oqcId" column="oqc_id"></result>
<result property="oqcCode" column="oqc_code"></result>
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
@ -36,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmProductSalseLineVo">
select line_id, salse_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_salse, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_product_salse_line
select line_id, salse_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_salse, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, oqc_check,oqc_id,oqc_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_product_salse_line
</sql>
<select id="selectWmProductSalseLineList" parameterType="WmProductSalseLine" resultMap="WmProductSalseLineResult">
@ -90,6 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id,</if>
<if test="areaCode != null">area_code,</if>
<if test="areaName != null">area_name,</if>
<if test="oqcCheck != null">oqc_check,</if>
<if test="oqcId != null">oqc_id,</if>
<if test="oqcCode != null">oqc_code,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@ -119,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">#{areaId},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="areaName != null">#{areaName},</if>
<if test="oqcCheck != null">#{oqcCheck},</if>
<if test="oqcId != null">#{oqcId},</if>
<if test="oqcCode != null">#{oqcCode},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
@ -152,6 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id = #{areaId},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="areaName != null">area_name = #{areaName},</if>
<if test="oqcCheck != null">oqc_check = #{oqcCheck},</if>
<if test="oqcId != null">oqc_id = #{oqcId},</if>
<if test="oqcCode != null">oqc_code = #{oqcCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>