diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingMaterialProcess.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingMaterialProcess.java new file mode 100644 index 00000000..e6559128 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingMaterialProcess.java @@ -0,0 +1,196 @@ +package com.ruoyi.quality.domain; + +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_material_process + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public class QualityManufacturingMaterialProcess extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 物料生产工序Id */ + private Long manufacturingMaterialProcessId; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 制程工序编号 */ + @Excel(name = "制程工序编号") + private String manufacturingProcessCode; + + /** 制程工序名称 */ + @Excel(name = "制程工序名称") + private String manufacturingProcessName; + + /** 设备名称 */ + @Excel(name = "设备名称") + private String deviceName; + + /** 设备型号 */ + @Excel(name = "设备型号") + private String deviceModelCode; + + /** 工序顺序 */ + @Excel(name = "工序顺序") + private String processSequence; + + /** 车间名称 */ + @Excel(name = "车间名称") + private String workshopName; + + /** 零件名称 */ + @Excel(name = "零件名称") + private String modName; + + /** OK允收数 */ + @Excel(name = "OK允收数") + private String okAcceptedNum; + + /** 特采/让步数 */ + @Excel(name = "特采/让步数") + private String specialConcessionsNum; + + public void setManufacturingMaterialProcessId(Long manufacturingMaterialProcessId) + { + this.manufacturingMaterialProcessId = manufacturingMaterialProcessId; + } + + public Long getManufacturingMaterialProcessId() + { + return manufacturingMaterialProcessId; + } + 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 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 setDeviceName(String deviceName) + { + this.deviceName = deviceName; + } + + public String getDeviceName() + { + return deviceName; + } + public void setDeviceModelCode(String deviceModelCode) + { + this.deviceModelCode = deviceModelCode; + } + + public String getDeviceModelCode() + { + return deviceModelCode; + } + public void setProcessSequence(String processSequence) + { + this.processSequence = processSequence; + } + + public String getProcessSequence() + { + return processSequence; + } + public void setWorkshopName(String workshopName) + { + this.workshopName = workshopName; + } + + public String getWorkshopName() + { + return workshopName; + } + public void setModName(String modName) + { + this.modName = modName; + } + + public String getModName() + { + return modName; + } + public void setOkAcceptedNum(String okAcceptedNum) + { + this.okAcceptedNum = okAcceptedNum; + } + + public String getOkAcceptedNum() + { + return okAcceptedNum; + } + public void setSpecialConcessionsNum(String specialConcessionsNum) + { + this.specialConcessionsNum = specialConcessionsNum; + } + + public String getSpecialConcessionsNum() + { + return specialConcessionsNum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("manufacturingMaterialProcessId", getManufacturingMaterialProcessId()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("manufacturingProcessCode", getManufacturingProcessCode()) + .append("manufacturingProcessName", getManufacturingProcessName()) + .append("deviceName", getDeviceName()) + .append("deviceModelCode", getDeviceModelCode()) + .append("processSequence", getProcessSequence()) + .append("workshopName", getWorkshopName()) + .append("modName", getModName()) + .append("okAcceptedNum", getOkAcceptedNum()) + .append("specialConcessionsNum", getSpecialConcessionsNum()) + .append("remark", getRemark()) + .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/QualityManufacturingMaterialProcessMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingMaterialProcessMapper.java new file mode 100644 index 00000000..b4676281 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingMaterialProcessMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.quality.mapper; + +import java.util.List; +import com.ruoyi.quality.domain.QualityManufacturingMaterialProcess; + +/** + * 品质管理制程检验物料生产工序Mapper接口 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public interface QualityManufacturingMaterialProcessMapper +{ + /** + * 查询品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 品质管理制程检验物料生产工序 + */ + public QualityManufacturingMaterialProcess selectQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 查询品质管理制程检验物料生产工序列表 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 品质管理制程检验物料生产工序集合 + */ + public List selectQualityManufacturingMaterialProcessList(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 新增品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + public int insertQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 修改品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + public int updateQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 删除品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + public int deleteQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 批量删除品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessIds 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityManufacturingMaterialProcessByIds(String[] manufacturingMaterialProcessIds); + + /** + * 作废品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + public int cancelQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 恢复品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + public int restoreQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingMaterialProcessService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingMaterialProcessService.java new file mode 100644 index 00000000..5ec3455e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingMaterialProcessService.java @@ -0,0 +1,75 @@ +package com.ruoyi.quality.service; + +import java.util.List; +import com.ruoyi.quality.domain.QualityManufacturingMaterialProcess; + +/** + * 品质管理制程检验物料生产工序Service接口 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +public interface IQualityManufacturingMaterialProcessService +{ + /** + * 查询品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 品质管理制程检验物料生产工序 + */ + public QualityManufacturingMaterialProcess selectQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 查询品质管理制程检验物料生产工序列表 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 品质管理制程检验物料生产工序集合 + */ + public List selectQualityManufacturingMaterialProcessList(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 新增品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + public int insertQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 修改品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + public int updateQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess); + + /** + * 批量删除品质管理制程检验物料生产工序 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityManufacturingMaterialProcessByIds(String ids); + + /** + * 删除品质管理制程检验物料生产工序信息 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + public int deleteQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 作废品质管理制程检验物料生产工序 + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return + */ + int cancelQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); + + /** + * 恢复品质管理制程检验物料生产工序 + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return + */ + int restoreQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingMaterialProcessServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingMaterialProcessServiceImpl.java new file mode 100644 index 00000000..572458b8 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingMaterialProcessServiceImpl.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.QualityManufacturingMaterialProcessMapper; +import com.ruoyi.quality.domain.QualityManufacturingMaterialProcess; +import com.ruoyi.quality.service.IQualityManufacturingMaterialProcessService; +import com.ruoyi.common.core.text.Convert; + +/** + * 品质管理制程检验物料生产工序Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-05-13 + */ +@Service +public class QualityManufacturingMaterialProcessServiceImpl implements IQualityManufacturingMaterialProcessService +{ + @Autowired + private QualityManufacturingMaterialProcessMapper qualityManufacturingMaterialProcessMapper; + + /** + * 查询品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 品质管理制程检验物料生产工序 + */ + @Override + public QualityManufacturingMaterialProcess selectQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId) + { + return qualityManufacturingMaterialProcessMapper.selectQualityManufacturingMaterialProcessById(manufacturingMaterialProcessId); + } + + /** + * 查询品质管理制程检验物料生产工序列表 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 品质管理制程检验物料生产工序 + */ + @Override + public List selectQualityManufacturingMaterialProcessList(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess) + { + return qualityManufacturingMaterialProcessMapper.selectQualityManufacturingMaterialProcessList(qualityManufacturingMaterialProcess); + } + + /** + * 新增品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + @Override + public int insertQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess) + { + String loginName = ShiroUtils.getLoginName(); + qualityManufacturingMaterialProcess.setCreateBy(loginName); + qualityManufacturingMaterialProcess.setCreateTime(DateUtils.getNowDate()); + return qualityManufacturingMaterialProcessMapper.insertQualityManufacturingMaterialProcess(qualityManufacturingMaterialProcess); + } + + /** + * 修改品质管理制程检验物料生产工序 + * + * @param qualityManufacturingMaterialProcess 品质管理制程检验物料生产工序 + * @return 结果 + */ + @Override + public int updateQualityManufacturingMaterialProcess(QualityManufacturingMaterialProcess qualityManufacturingMaterialProcess) + { + String loginName = ShiroUtils.getLoginName(); + qualityManufacturingMaterialProcess.setUpdateBy(loginName); + qualityManufacturingMaterialProcess.setUpdateTime(DateUtils.getNowDate()); + return qualityManufacturingMaterialProcessMapper.updateQualityManufacturingMaterialProcess(qualityManufacturingMaterialProcess); + } + + /** + * 删除品质管理制程检验物料生产工序对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteQualityManufacturingMaterialProcessByIds(String ids) + { + return qualityManufacturingMaterialProcessMapper.deleteQualityManufacturingMaterialProcessByIds(Convert.toStrArray(ids)); + } + + /** + * 删除品质管理制程检验物料生产工序信息 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + @Override + public int deleteQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId) + { + return qualityManufacturingMaterialProcessMapper.deleteQualityManufacturingMaterialProcessById(manufacturingMaterialProcessId); + } + + /** + * 作废品质管理制程检验物料生产工序 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + @Override + public int cancelQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId) + { + return qualityManufacturingMaterialProcessMapper.cancelQualityManufacturingMaterialProcessById(manufacturingMaterialProcessId); + } + + /** + * 恢复品质管理制程检验物料生产工序信息 + * + * @param manufacturingMaterialProcessId 品质管理制程检验物料生产工序ID + * @return 结果 + */ + @Override + public int restoreQualityManufacturingMaterialProcessById(Long manufacturingMaterialProcessId) + { + return qualityManufacturingMaterialProcessMapper.restoreQualityManufacturingMaterialProcessById(manufacturingMaterialProcessId); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java index 737fb709..6ea81d53 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.system.mapper; +import com.ruoyi.framework.web.domain.server.Sys; import com.ruoyi.system.domain.SysMakeOrder; import com.ruoyi.system.dto.SysMakeorderMaterialDto; @@ -101,4 +102,10 @@ public interface SysMakeOrderMapper * 品质管理制程检验工序关联生产单号 * */ List selectAllMakeNos(); + + /* + * 品质管理通过生产单号查询销售单号 + * */ + SysMakeOrder selectSaleNoByMakeNo(String makeNo); + } diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingMaterialProcessMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingMaterialProcessMapper.xml new file mode 100644 index 00000000..141bf8a4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingMaterialProcessMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select manufacturing_material_process_id, material_no, material_name, manufacturing_process_code, manufacturing_process_name, device_name, device_model_code, process_sequence, workshop_name, mod_name, ok_accepted_num, special_concessions_num, remark, create_by, create_time, update_by, update_time from quality_manufacturing_material_process + + + + + + + + insert into quality_manufacturing_material_process + + material_no, + material_name, + manufacturing_process_code, + manufacturing_process_name, + device_name, + device_model_code, + process_sequence, + workshop_name, + mod_name, + ok_accepted_num, + special_concessions_num, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{materialNo}, + #{materialName}, + #{manufacturingProcessCode}, + #{manufacturingProcessName}, + #{deviceName}, + #{deviceModelCode}, + #{processSequence}, + #{workshopName}, + #{modName}, + #{okAcceptedNum}, + #{specialConcessionsNum}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update quality_manufacturing_material_process + + material_no = #{materialNo}, + material_name = #{materialName}, + manufacturing_process_code = #{manufacturingProcessCode}, + manufacturing_process_name = #{manufacturingProcessName}, + device_name = #{deviceName}, + device_model_code = #{deviceModelCode}, + process_sequence = #{processSequence}, + workshop_name = #{workshopName}, + mod_name = #{modName}, + ok_accepted_num = #{okAcceptedNum}, + special_concessions_num = #{specialConcessionsNum}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where manufacturing_material_process_id = #{manufacturingMaterialProcessId} + + + + delete from quality_manufacturing_material_process where manufacturing_material_process_id = #{manufacturingMaterialProcessId} + + + + delete from quality_manufacturing_material_process where manufacturing_material_process_id in + + #{manufacturingMaterialProcessId} + + + + + update quality_manufacturing_material_process set del_flag = '1' where manufacturing_material_process_id = #{manufacturingMaterialProcessId} + + + + update quality_manufacturing_material_process set del_flag = '0' where manufacturing_material_process_id = #{manufacturingMaterialProcessId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml index 8386e978..489cd7f7 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml @@ -251,4 +251,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select makeNo from sys_makeorder + + \ No newline at end of file