diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityShippingDevice.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityShippingDevice.java new file mode 100644 index 00000000..de8c3287 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityShippingDevice.java @@ -0,0 +1,247 @@ +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_shipping_device + * + * @author ruoyi + * @date 2024-11-18 + */ +public class QualityShippingDevice extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 出货设备编号 */ + private Long shippingDeviceCode; + + /** 出货设备id */ + @Excel(name = "出货设备id") + private String shippingDeviceId; + + /** 品质单号 */ + @Excel(name = "品质单号") + private String qualityOrderCode; + + /** 关联销售订单号 */ + @Excel(name = "关联销售订单号") + private String salesOrderCode; + + /** 关联生产订单号 */ + @Excel(name = "关联生产订单号") + private String makeNo; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 品牌 */ + @Excel(name = "品牌") + private String materialBrand; + + /** 描述 */ + @Excel(name = "描述") + private String materialDescribe; + + /** 物料型号 */ + @Excel(name = "物料型号") + private String materialModelCode; + + /** 设备型号 */ + @Excel(name = "设备型号") + private String deviceModelCode; + + /** 追踪码 */ + @Excel(name = "追踪码") + private String deviceRunningNumber; + + /** 品质状态 */ + @Excel(name = "品质状态") + private String qualityStatus; + + /** 品质审核状态(0未提交,1审核通过,2审核拒绝,3已提交待审核) */ + @Excel(name = "品质审核状态") + private String qualityAuditStatus; + + public void setShippingDeviceCode(Long shippingDeviceCode) + { + this.shippingDeviceCode = shippingDeviceCode; + } + + public Long getShippingDeviceCode() + { + return shippingDeviceCode; + } + public void setShippingDeviceId(String shippingDeviceId) + { + this.shippingDeviceId = shippingDeviceId; + } + + public String getShippingDeviceId() + { + return shippingDeviceId; + } + public void setQualityOrderCode(String qualityOrderCode) + { + this.qualityOrderCode = qualityOrderCode; + } + + public String getQualityOrderCode() + { + return qualityOrderCode; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + 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 setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setMaterialModelCode(String materialModelCode) + { + this.materialModelCode = materialModelCode; + } + + public String getMaterialModelCode() + { + return materialModelCode; + } + public void setDeviceModelCode(String deviceModelCode) + { + this.deviceModelCode = deviceModelCode; + } + + public String getDeviceModelCode() + { + return deviceModelCode; + } + public void setDeviceRunningNumber(String deviceRunningNumber) + { + this.deviceRunningNumber = deviceRunningNumber; + } + + public String getDeviceRunningNumber() + { + return deviceRunningNumber; + } + public void setQualityStatus(String qualityStatus) + { + this.qualityStatus = qualityStatus; + } + + public String getQualityStatus() + { + return qualityStatus; + } + public void setQualityAuditStatus(String qualityAuditStatus) + { + this.qualityAuditStatus = qualityAuditStatus; + } + + public String getQualityAuditStatus() + { + return qualityAuditStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("shippingDeviceCode", getShippingDeviceCode()) + .append("shippingDeviceId", getShippingDeviceId()) + .append("qualityOrderCode", getQualityOrderCode()) + .append("salesOrderCode", getSalesOrderCode()) + .append("makeNo", getMakeNo()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialUnit", getMaterialUnit()) + .append("materialBrand", getMaterialBrand()) + .append("materialDescribe", getMaterialDescribe()) + .append("materialModelCode", getMaterialModelCode()) + .append("deviceModelCode", getDeviceModelCode()) + .append("deviceRunningNumber", getDeviceRunningNumber()) + .append("qualityStatus", getQualityStatus()) + .append("qualityAuditStatus", getQualityAuditStatus()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityShippingDeviceMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityShippingDeviceMapper.java new file mode 100644 index 00000000..1a0426f3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityShippingDeviceMapper.java @@ -0,0 +1,82 @@ +package com.ruoyi.quality.mapper; + +import java.util.List; +import com.ruoyi.quality.domain.QualityShippingDevice; + +/** + * 品质单关联出货设备Mapper接口 + * + * @author ruoyi + * @date 2024-11-18 + */ +public interface QualityShippingDeviceMapper +{ + /** + * 查询品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 品质单关联出货设备 + */ + public QualityShippingDevice selectQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 查询品质单关联出货设备 + */ + public QualityShippingDevice selectQualityShippingDeviceByDeviceId(String shippingDeviceId); + + /** + * 查询品质单关联出货设备列表 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 品质单关联出货设备集合 + */ + public List selectQualityShippingDeviceList(QualityShippingDevice qualityShippingDevice); + + /** + * 新增品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + public int insertQualityShippingDevice(QualityShippingDevice qualityShippingDevice); + + /** + * 修改品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + public int updateQualityShippingDevice(QualityShippingDevice qualityShippingDevice); + + /** + * 删除品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + public int deleteQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 批量删除品质单关联出货设备 + * + * @param shippingDeviceCodes 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityShippingDeviceByIds(String[] shippingDeviceCodes); + + /** + * 作废品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + public int cancelQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 恢复品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + public int restoreQualityShippingDeviceById(Long shippingDeviceCode); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityShippingDeviceService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityShippingDeviceService.java new file mode 100644 index 00000000..30932263 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityShippingDeviceService.java @@ -0,0 +1,75 @@ +package com.ruoyi.quality.service; + +import java.util.List; +import com.ruoyi.quality.domain.QualityShippingDevice; + +/** + * 品质单关联出货设备Service接口 + * + * @author ruoyi + * @date 2024-11-18 + */ +public interface IQualityShippingDeviceService +{ + /** + * 查询品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 品质单关联出货设备 + */ + public QualityShippingDevice selectQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 查询品质单关联出货设备列表 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 品质单关联出货设备集合 + */ + public List selectQualityShippingDeviceList(QualityShippingDevice qualityShippingDevice); + + /** + * 新增品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + public int insertQualityShippingDevice(QualityShippingDevice qualityShippingDevice); + + /** + * 修改品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + public int updateQualityShippingDevice(QualityShippingDevice qualityShippingDevice); + + /** + * 批量删除品质单关联出货设备 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityShippingDeviceByIds(String ids); + + /** + * 删除品质单关联出货设备信息 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + public int deleteQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 作废品质单关联出货设备 + * @param shippingDeviceCode 品质单关联出货设备ID + * @return + */ + int cancelQualityShippingDeviceById(Long shippingDeviceCode); + + /** + * 恢复品质单关联出货设备 + * @param shippingDeviceCode 品质单关联出货设备ID + * @return + */ + int restoreQualityShippingDeviceById(Long shippingDeviceCode); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityShippingDeviceServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityShippingDeviceServiceImpl.java new file mode 100644 index 00000000..dc4d35ca --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityShippingDeviceServiceImpl.java @@ -0,0 +1,118 @@ +package com.ruoyi.quality.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.quality.mapper.QualityShippingDeviceMapper; +import com.ruoyi.quality.domain.QualityShippingDevice; +import com.ruoyi.quality.service.IQualityShippingDeviceService; +import com.ruoyi.common.core.text.Convert; + +/** + * 品质单关联出货设备Service业务层处理 + * + * @author ruoyi + * @date 2024-11-18 + */ +@Service +public class QualityShippingDeviceServiceImpl implements IQualityShippingDeviceService +{ + @Autowired + private QualityShippingDeviceMapper qualityShippingDeviceMapper; + + /** + * 查询品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 品质单关联出货设备 + */ + @Override + public QualityShippingDevice selectQualityShippingDeviceById(Long shippingDeviceCode) + { + return qualityShippingDeviceMapper.selectQualityShippingDeviceById(shippingDeviceCode); + } + + /** + * 查询品质单关联出货设备列表 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 品质单关联出货设备 + */ + @Override + public List selectQualityShippingDeviceList(QualityShippingDevice qualityShippingDevice) + { + return qualityShippingDeviceMapper.selectQualityShippingDeviceList(qualityShippingDevice); + } + + /** + * 新增品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + @Override + public int insertQualityShippingDevice(QualityShippingDevice qualityShippingDevice) + { + return qualityShippingDeviceMapper.insertQualityShippingDevice(qualityShippingDevice); + } + + /** + * 修改品质单关联出货设备 + * + * @param qualityShippingDevice 品质单关联出货设备 + * @return 结果 + */ + @Override + public int updateQualityShippingDevice(QualityShippingDevice qualityShippingDevice) + { + return qualityShippingDeviceMapper.updateQualityShippingDevice(qualityShippingDevice); + } + + /** + * 删除品质单关联出货设备对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteQualityShippingDeviceByIds(String ids) + { + return qualityShippingDeviceMapper.deleteQualityShippingDeviceByIds(Convert.toStrArray(ids)); + } + + /** + * 删除品质单关联出货设备信息 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + @Override + public int deleteQualityShippingDeviceById(Long shippingDeviceCode) + { + return qualityShippingDeviceMapper.deleteQualityShippingDeviceById(shippingDeviceCode); + } + + /** + * 作废品质单关联出货设备 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + @Override + public int cancelQualityShippingDeviceById(Long shippingDeviceCode) + { + return qualityShippingDeviceMapper.cancelQualityShippingDeviceById(shippingDeviceCode); + } + + /** + * 恢复品质单关联出货设备信息 + * + * @param shippingDeviceCode 品质单关联出货设备ID + * @return 结果 + */ + @Override + public int restoreQualityShippingDeviceById(Long shippingDeviceCode) + { + return qualityShippingDeviceMapper.restoreQualityShippingDeviceById(shippingDeviceCode); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityShippingDeviceMapper.xml new file mode 100644 index 00000000..fa0b78c9 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityShippingDeviceMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select shipping_device_code, shipping_device_id, quality_order_code, sales_order_code, make_no, material_no, material_name, material_type, material_unit, material_brand, material_describe, material_model_code, device_model_code, device_running_number, quality_status, quality_audit_status from quality_shipping_device + + + + + + + + + + insert into quality_shipping_device + + shipping_device_id, + quality_order_code, + sales_order_code, + make_no, + material_no, + material_name, + material_type, + material_unit, + material_brand, + material_describe, + material_model_code, + device_model_code, + device_running_number, + quality_status, + quality_audit_status, + + + #{shippingDeviceId}, + #{qualityOrderCode}, + #{salesOrderCode}, + #{makeNo}, + #{materialNo}, + #{materialName}, + #{materialType}, + #{materialUnit}, + #{materialBrand}, + #{materialDescribe}, + #{materialModelCode}, + #{deviceModelCode}, + #{deviceRunningNumber}, + #{qualityStatus}, + #{qualityAuditStatus}, + + + + + update quality_shipping_device + + shipping_device_id = #{shippingDeviceId}, + quality_order_code = #{qualityOrderCode}, + sales_order_code = #{salesOrderCode}, + make_no = #{makeNo}, + material_no = #{materialNo}, + material_name = #{materialName}, + material_type = #{materialType}, + material_unit = #{materialUnit}, + material_brand = #{materialBrand}, + material_describe = #{materialDescribe}, + material_model_code = #{materialModelCode}, + device_model_code = #{deviceModelCode}, + device_running_number = #{deviceRunningNumber}, + quality_status = #{qualityStatus}, + quality_audit_status = #{qualityAuditStatus}, + + where shipping_device_code = #{shippingDeviceCode} + + + + delete from quality_shipping_device where shipping_device_code = #{shippingDeviceCode} + + + + delete from quality_shipping_device where shipping_device_code in + + #{shippingDeviceCode} + + + + + update quality_shipping_device set del_flag = '1' where shipping_device_code = #{shippingDeviceCode} + + + + update quality_shipping_device set del_flag = '0' where shipping_device_code = #{shippingDeviceCode} + + + \ No newline at end of file