diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingCheckoutMaterial.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingCheckoutMaterial.java new file mode 100644 index 00000000..9d0c77b6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingCheckoutMaterial.java @@ -0,0 +1,312 @@ +package com.ruoyi.quality.domain; + +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.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 品质管理制程检验物料对象 quality_manufacturing_checkout_material + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public class QualityManufacturingCheckoutMaterial extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 制程检验物料Id */ + private Long manufacturingCheckoutMaterialId; + + /** 制程检验单号 */ + @Excel(name = "制程检验单号") + private String manufacturingCheckoutCode; + + /** 关联生产订单号 */ + @Excel(name = "关联生产订单号") + private String makeNo; + + /** 检验时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date checkoutTime; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料图片地址 */ + @Excel(name = "物料图片地址") + private String materialPhotourl; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String materialBrand; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 物料加工方式 */ + @Excel(name = "物料加工方式") + private String materialProcessMethod; + + /** 生产订单数 */ + @Excel(name = "生产订单数") + private String makeTotal; + + /** 已检验数 */ + @Excel(name = "已检验数") + private String checkedNum; + + /** 本次检验数 */ + @Excel(name = "本次检验数") + private String currentCheckoutNum; + + /** 工序合格数 */ + @Excel(name = "工序合格数") + private String processQualifiedNum; + + /** 工序不合格数 */ + @Excel(name = "工序不合格数") + private String processUnqualifiedNum; + + /** 制程工序编号 */ + @Excel(name = "制程工序编号") + private String manufacturingProcessCode; + + /** 制程工序名称 */ + @Excel(name = "制程工序名称") + private String manufacturingProcessName; + + /** 检验完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检验完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date checkoutCompletionTime; + + public void setManufacturingCheckoutMaterialId(Long manufacturingCheckoutMaterialId) + { + this.manufacturingCheckoutMaterialId = manufacturingCheckoutMaterialId; + } + + public Long getManufacturingCheckoutMaterialId() + { + return manufacturingCheckoutMaterialId; + } + public void setManufacturingCheckoutCode(String manufacturingCheckoutCode) + { + this.manufacturingCheckoutCode = manufacturingCheckoutCode; + } + + public String getManufacturingCheckoutCode() + { + return manufacturingCheckoutCode; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + public void setCheckoutTime(Date checkoutTime) + { + this.checkoutTime = checkoutTime; + } + + public Date getCheckoutTime() + { + return checkoutTime; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setMaterialPhotourl(String materialPhotourl) + { + this.materialPhotourl = materialPhotourl; + } + + public String getMaterialPhotourl() + { + return materialPhotourl; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + public void setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setMaterialProcessMethod(String materialProcessMethod) + { + this.materialProcessMethod = materialProcessMethod; + } + + public String getMaterialProcessMethod() + { + return materialProcessMethod; + } + public void setMakeTotal(String makeTotal) + { + this.makeTotal = makeTotal; + } + + public String getMakeTotal() + { + return makeTotal; + } + public void setCheckedNum(String checkedNum) + { + this.checkedNum = checkedNum; + } + + public String getCheckedNum() + { + return checkedNum; + } + public void setCurrentCheckoutNum(String currentCheckoutNum) + { + this.currentCheckoutNum = currentCheckoutNum; + } + + public String getCurrentCheckoutNum() + { + return currentCheckoutNum; + } + public void setProcessQualifiedNum(String processQualifiedNum) + { + this.processQualifiedNum = processQualifiedNum; + } + + public String getProcessQualifiedNum() + { + return processQualifiedNum; + } + public void setProcessUnqualifiedNum(String processUnqualifiedNum) + { + this.processUnqualifiedNum = processUnqualifiedNum; + } + + public String getProcessUnqualifiedNum() + { + return processUnqualifiedNum; + } + public void setManufacturingProcessCode(String manufacturingProcessCode) + { + this.manufacturingProcessCode = manufacturingProcessCode; + } + + public String getManufacturingProcessCode() + { + return manufacturingProcessCode; + } + public void setManufacturingProcessName(String manufacturingProcessName) + { + this.manufacturingProcessName = manufacturingProcessName; + } + + public String getManufacturingProcessName() + { + return manufacturingProcessName; + } + public void setCheckoutCompletionTime(Date checkoutCompletionTime) + { + this.checkoutCompletionTime = checkoutCompletionTime; + } + + public Date getCheckoutCompletionTime() + { + return checkoutCompletionTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("manufacturingCheckoutMaterialId", getManufacturingCheckoutMaterialId()) + .append("manufacturingCheckoutCode", getManufacturingCheckoutCode()) + .append("makeNo", getMakeNo()) + .append("checkoutTime", getCheckoutTime()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialPhotourl", getMaterialPhotourl()) + .append("materialBrand", getMaterialBrand()) + .append("materialUnit", getMaterialUnit()) + .append("materialDescribe", getMaterialDescribe()) + .append("materialProcessMethod", getMaterialProcessMethod()) + .append("makeTotal", getMakeTotal()) + .append("checkedNum", getCheckedNum()) + .append("currentCheckoutNum", getCurrentCheckoutNum()) + .append("processQualifiedNum", getProcessQualifiedNum()) + .append("processUnqualifiedNum", getProcessUnqualifiedNum()) + .append("manufacturingProcessCode", getManufacturingProcessCode()) + .append("manufacturingProcessName", getManufacturingProcessName()) + .append("remark", getRemark()) + .append("checkoutCompletionTime", getCheckoutCompletionTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java new file mode 100644 index 00000000..b4662698 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.quality.mapper; + +import java.util.List; +import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; + +/** + * 品质管理制程检验物料Mapper接口 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public interface QualityManufacturingCheckoutMaterialMapper +{ + /** + * 查询品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 品质管理制程检验物料 + */ + public QualityManufacturingCheckoutMaterial selectQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 查询品质管理制程检验物料列表 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 品质管理制程检验物料集合 + */ + public List selectQualityManufacturingCheckoutMaterialList(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 新增品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + public int insertQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 修改品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + public int updateQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 删除品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + public int deleteQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 批量删除品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialIds 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityManufacturingCheckoutMaterialByIds(String[] manufacturingCheckoutMaterialIds); + + /** + * 作废品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + public int cancelQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 恢复品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + public int restoreQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutMaterialService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutMaterialService.java new file mode 100644 index 00000000..e0831918 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutMaterialService.java @@ -0,0 +1,75 @@ +package com.ruoyi.quality.service; + +import java.util.List; +import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; + +/** + * 品质管理制程检验物料Service接口 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public interface IQualityManufacturingCheckoutMaterialService +{ + /** + * 查询品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 品质管理制程检验物料 + */ + public QualityManufacturingCheckoutMaterial selectQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 查询品质管理制程检验物料列表 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 品质管理制程检验物料集合 + */ + public List selectQualityManufacturingCheckoutMaterialList(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 新增品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + public int insertQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 修改品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + public int updateQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial); + + /** + * 批量删除品质管理制程检验物料 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityManufacturingCheckoutMaterialByIds(String ids); + + /** + * 删除品质管理制程检验物料信息 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + public int deleteQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 作废品质管理制程检验物料 + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return + */ + int cancelQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /** + * 恢复品质管理制程检验物料 + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return + */ + int restoreQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutMaterialServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutMaterialServiceImpl.java new file mode 100644 index 00000000..58505b14 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutMaterialServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.quality.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.quality.mapper.QualityManufacturingCheckoutMaterialMapper; +import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; +import com.ruoyi.quality.service.IQualityManufacturingCheckoutMaterialService; +import com.ruoyi.common.core.text.Convert; + +/** + * 品质管理制程检验物料Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +@Service +public class QualityManufacturingCheckoutMaterialServiceImpl implements IQualityManufacturingCheckoutMaterialService +{ + @Autowired + private QualityManufacturingCheckoutMaterialMapper qualityManufacturingCheckoutMaterialMapper; + + /** + * 查询品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 品质管理制程检验物料 + */ + @Override + public QualityManufacturingCheckoutMaterial selectQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId) + { + return qualityManufacturingCheckoutMaterialMapper.selectQualityManufacturingCheckoutMaterialById(manufacturingCheckoutMaterialId); + } + + /** + * 查询品质管理制程检验物料列表 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 品质管理制程检验物料 + */ + @Override + public List selectQualityManufacturingCheckoutMaterialList(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial) + { + return qualityManufacturingCheckoutMaterialMapper.selectQualityManufacturingCheckoutMaterialList(qualityManufacturingCheckoutMaterial); + } + + /** + * 新增品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + @Override + public int insertQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial) + { + String loginName = ShiroUtils.getLoginName(); + qualityManufacturingCheckoutMaterial.setCreateBy(loginName); + qualityManufacturingCheckoutMaterial.setCreateTime(DateUtils.getNowDate()); + return qualityManufacturingCheckoutMaterialMapper.insertQualityManufacturingCheckoutMaterial(qualityManufacturingCheckoutMaterial); + } + + /** + * 修改品质管理制程检验物料 + * + * @param qualityManufacturingCheckoutMaterial 品质管理制程检验物料 + * @return 结果 + */ + @Override + public int updateQualityManufacturingCheckoutMaterial(QualityManufacturingCheckoutMaterial qualityManufacturingCheckoutMaterial) + { + String loginName = ShiroUtils.getLoginName(); + qualityManufacturingCheckoutMaterial.setUpdateBy(loginName); + qualityManufacturingCheckoutMaterial.setUpdateTime(DateUtils.getNowDate()); + return qualityManufacturingCheckoutMaterialMapper.updateQualityManufacturingCheckoutMaterial(qualityManufacturingCheckoutMaterial); + } + + /** + * 删除品质管理制程检验物料对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteQualityManufacturingCheckoutMaterialByIds(String ids) + { + return qualityManufacturingCheckoutMaterialMapper.deleteQualityManufacturingCheckoutMaterialByIds(Convert.toStrArray(ids)); + } + + /** + * 删除品质管理制程检验物料信息 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + @Override + public int deleteQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId) + { + return qualityManufacturingCheckoutMaterialMapper.deleteQualityManufacturingCheckoutMaterialById(manufacturingCheckoutMaterialId); + } + + /** + * 作废品质管理制程检验物料 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + @Override + public int cancelQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId) + { + return qualityManufacturingCheckoutMaterialMapper.cancelQualityManufacturingCheckoutMaterialById(manufacturingCheckoutMaterialId); + } + + /** + * 恢复品质管理制程检验物料信息 + * + * @param manufacturingCheckoutMaterialId 品质管理制程检验物料ID + * @return 结果 + */ + @Override + public int restoreQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId) + { + return qualityManufacturingCheckoutMaterialMapper.restoreQualityManufacturingCheckoutMaterialById(manufacturingCheckoutMaterialId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml new file mode 100644 index 00000000..8e65883e --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select manufacturing_checkout_material_id, manufacturing_checkout_code, make_no, checkout_time, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, make_total, checked_num, current_checkout_num, process_qualified_num, process_unqualified_num, manufacturing_process_code, manufacturing_process_name, remark, checkout_completion_time, create_by, create_time, update_by, update_time from quality_manufacturing_checkout_material + + + + + + + + insert into quality_manufacturing_checkout_material + + manufacturing_checkout_code, + make_no, + checkout_time, + material_no, + material_name, + material_type, + material_photoUrl, + material_brand, + material_unit, + material_describe, + material_process_method, + make_total, + checked_num, + current_checkout_num, + process_qualified_num, + process_unqualified_num, + manufacturing_process_code, + manufacturing_process_name, + remark, + checkout_completion_time, + create_by, + create_time, + update_by, + update_time, + + + #{manufacturingCheckoutCode}, + #{makeNo}, + #{checkoutTime}, + #{materialNo}, + #{materialName}, + #{materialType}, + #{materialPhotourl}, + #{materialBrand}, + #{materialUnit}, + #{materialDescribe}, + #{materialProcessMethod}, + #{makeTotal}, + #{checkedNum}, + #{currentCheckoutNum}, + #{processQualifiedNum}, + #{processUnqualifiedNum}, + #{manufacturingProcessCode}, + #{manufacturingProcessName}, + #{remark}, + #{checkoutCompletionTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update quality_manufacturing_checkout_material + + manufacturing_checkout_code = #{manufacturingCheckoutCode}, + make_no = #{makeNo}, + checkout_time = #{checkoutTime}, + material_no = #{materialNo}, + material_name = #{materialName}, + material_type = #{materialType}, + material_photoUrl = #{materialPhotourl}, + material_brand = #{materialBrand}, + material_unit = #{materialUnit}, + material_describe = #{materialDescribe}, + material_process_method = #{materialProcessMethod}, + make_total = #{makeTotal}, + checked_num = #{checkedNum}, + current_checkout_num = #{currentCheckoutNum}, + process_qualified_num = #{processQualifiedNum}, + process_unqualified_num = #{processUnqualifiedNum}, + manufacturing_process_code = #{manufacturingProcessCode}, + manufacturing_process_name = #{manufacturingProcessName}, + remark = #{remark}, + checkout_completion_time = #{checkoutCompletionTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where manufacturing_checkout_material_id = #{manufacturingCheckoutMaterialId} + + + + delete from quality_manufacturing_checkout_material where manufacturing_checkout_material_id = #{manufacturingCheckoutMaterialId} + + + + delete from quality_manufacturing_checkout_material where manufacturing_checkout_material_id in + + #{manufacturingCheckoutMaterialId} + + + + + update quality_manufacturing_checkout_material set del_flag = '1' where manufacturing_checkout_material_id = #{manufacturingCheckoutMaterialId} + + + + update quality_manufacturing_checkout_material set del_flag = '0' where manufacturing_checkout_material_id = #{manufacturingCheckoutMaterialId} + + + \ No newline at end of file