Browse Source
品质单 新增品质单详情domian 新增品质单详情Mapper 新增品质单详情Mapper.xml 新增品质单详情Service 新增品质单详情ServiceImpl 新增开始品质页面startingQuality.html qualityOrder.html新增品质按钮dev
liuxiaoxu
6 months ago
7 changed files with 1277 additions and 36 deletions
@ -0,0 +1,423 @@ |
|||||
|
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_order_detail |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public class QualityOrderDetail extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 品质单详情Id */ |
||||
|
private Long qualityOrderDetailId; |
||||
|
|
||||
|
/** 品质单号 */ |
||||
|
@Excel(name = "品质单号") |
||||
|
private String qualityOrderCode; |
||||
|
|
||||
|
/** 入库单号 */ |
||||
|
@Excel(name = "入库单号") |
||||
|
private String inStorageCode; |
||||
|
|
||||
|
/** 关联订单号 */ |
||||
|
@Excel(name = "关联订单号") |
||||
|
private String relatedOrderCode; |
||||
|
|
||||
|
/** 品质状态 */ |
||||
|
@Excel(name = "品质状态") |
||||
|
private String qualityStatus; |
||||
|
|
||||
|
/** 品质单订单类型 */ |
||||
|
@Excel(name = "品质单订单类型") |
||||
|
private String qualityOrderType; |
||||
|
|
||||
|
/** 品质单入库类型 */ |
||||
|
@Excel(name = "品质单入库类型") |
||||
|
private String qualityStorageStatus; |
||||
|
|
||||
|
/** 交付质检时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "交付质检时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date deliveryInspectionTime; |
||||
|
|
||||
|
/** 仓库Id */ |
||||
|
@Excel(name = "仓库Id") |
||||
|
private String warehouseCode; |
||||
|
|
||||
|
/** 仓库名称 */ |
||||
|
@Excel(name = "仓库名称") |
||||
|
private String warehouseName; |
||||
|
|
||||
|
/** 供应商Id */ |
||||
|
@Excel(name = "供应商Id") |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 供应商名称 */ |
||||
|
@Excel(name = "供应商名称") |
||||
|
private String supplierName; |
||||
|
|
||||
|
/** 联系人 */ |
||||
|
@Excel(name = "联系人") |
||||
|
private String customerContact; |
||||
|
|
||||
|
/** 联系电话 */ |
||||
|
@Excel(name = "联系电话") |
||||
|
private String contactNumber; |
||||
|
|
||||
|
/** 公司地址 */ |
||||
|
@Excel(name = "公司地址") |
||||
|
private String supplierAddress; |
||||
|
|
||||
|
/** 料号 */ |
||||
|
@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 Long thisArrivedNum; |
||||
|
|
||||
|
/** 品质已合格数 */ |
||||
|
@Excel(name = "品质已合格数") |
||||
|
private Long qualityHasqualifiedNum; |
||||
|
|
||||
|
/** 品质合格数 */ |
||||
|
@Excel(name = "品质合格数") |
||||
|
private Long qualityQualifiedNum; |
||||
|
|
||||
|
/** 品质不合格数 */ |
||||
|
@Excel(name = "品质不合格数") |
||||
|
private Long qualityUnqualifiedNum; |
||||
|
|
||||
|
public void setQualityOrderDetailId(Long qualityOrderDetailId) |
||||
|
{ |
||||
|
this.qualityOrderDetailId = qualityOrderDetailId; |
||||
|
} |
||||
|
|
||||
|
public Long getQualityOrderDetailId() |
||||
|
{ |
||||
|
return qualityOrderDetailId; |
||||
|
} |
||||
|
public void setQualityOrderCode(String qualityOrderCode) |
||||
|
{ |
||||
|
this.qualityOrderCode = qualityOrderCode; |
||||
|
} |
||||
|
|
||||
|
public String getQualityOrderCode() |
||||
|
{ |
||||
|
return qualityOrderCode; |
||||
|
} |
||||
|
public void setInStorageCode(String inStorageCode) |
||||
|
{ |
||||
|
this.inStorageCode = inStorageCode; |
||||
|
} |
||||
|
|
||||
|
public String getInStorageCode() |
||||
|
{ |
||||
|
return inStorageCode; |
||||
|
} |
||||
|
public void setRelatedOrderCode(String relatedOrderCode) |
||||
|
{ |
||||
|
this.relatedOrderCode = relatedOrderCode; |
||||
|
} |
||||
|
|
||||
|
public String getRelatedOrderCode() |
||||
|
{ |
||||
|
return relatedOrderCode; |
||||
|
} |
||||
|
public void setQualityStatus(String qualityStatus) |
||||
|
{ |
||||
|
this.qualityStatus = qualityStatus; |
||||
|
} |
||||
|
|
||||
|
public String getQualityStatus() |
||||
|
{ |
||||
|
return qualityStatus; |
||||
|
} |
||||
|
public void setQualityOrderType(String qualityOrderType) |
||||
|
{ |
||||
|
this.qualityOrderType = qualityOrderType; |
||||
|
} |
||||
|
|
||||
|
public String getQualityOrderType() |
||||
|
{ |
||||
|
return qualityOrderType; |
||||
|
} |
||||
|
public void setQualityStorageStatus(String qualityStorageStatus) |
||||
|
{ |
||||
|
this.qualityStorageStatus = qualityStorageStatus; |
||||
|
} |
||||
|
|
||||
|
public String getQualityStorageStatus() |
||||
|
{ |
||||
|
return qualityStorageStatus; |
||||
|
} |
||||
|
public void setDeliveryInspectionTime(Date deliveryInspectionTime) |
||||
|
{ |
||||
|
this.deliveryInspectionTime = deliveryInspectionTime; |
||||
|
} |
||||
|
|
||||
|
public Date getDeliveryInspectionTime() |
||||
|
{ |
||||
|
return deliveryInspectionTime; |
||||
|
} |
||||
|
public void setWarehouseCode(String warehouseCode) |
||||
|
{ |
||||
|
this.warehouseCode = warehouseCode; |
||||
|
} |
||||
|
|
||||
|
public String getWarehouseCode() |
||||
|
{ |
||||
|
return warehouseCode; |
||||
|
} |
||||
|
public void setWarehouseName(String warehouseName) |
||||
|
{ |
||||
|
this.warehouseName = warehouseName; |
||||
|
} |
||||
|
|
||||
|
public String getWarehouseName() |
||||
|
{ |
||||
|
return warehouseName; |
||||
|
} |
||||
|
public void setSupplierCode(String supplierCode) |
||||
|
{ |
||||
|
this.supplierCode = supplierCode; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierCode() |
||||
|
{ |
||||
|
return supplierCode; |
||||
|
} |
||||
|
public void setSupplierName(String supplierName) |
||||
|
{ |
||||
|
this.supplierName = supplierName; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierName() |
||||
|
{ |
||||
|
return supplierName; |
||||
|
} |
||||
|
public void setCustomerContact(String customerContact) |
||||
|
{ |
||||
|
this.customerContact = customerContact; |
||||
|
} |
||||
|
|
||||
|
public String getCustomerContact() |
||||
|
{ |
||||
|
return customerContact; |
||||
|
} |
||||
|
public void setContactNumber(String contactNumber) |
||||
|
{ |
||||
|
this.contactNumber = contactNumber; |
||||
|
} |
||||
|
|
||||
|
public String getContactNumber() |
||||
|
{ |
||||
|
return contactNumber; |
||||
|
} |
||||
|
public void setSupplierAddress(String supplierAddress) |
||||
|
{ |
||||
|
this.supplierAddress = supplierAddress; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierAddress() |
||||
|
{ |
||||
|
return supplierAddress; |
||||
|
} |
||||
|
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 setThisArrivedNum(Long thisArrivedNum) |
||||
|
{ |
||||
|
this.thisArrivedNum = thisArrivedNum; |
||||
|
} |
||||
|
|
||||
|
public Long getThisArrivedNum() |
||||
|
{ |
||||
|
return thisArrivedNum; |
||||
|
} |
||||
|
public void setQualityHasqualifiedNum(Long qualityHasqualifiedNum) |
||||
|
{ |
||||
|
this.qualityHasqualifiedNum = qualityHasqualifiedNum; |
||||
|
} |
||||
|
|
||||
|
public Long getQualityHasqualifiedNum() |
||||
|
{ |
||||
|
return qualityHasqualifiedNum; |
||||
|
} |
||||
|
public void setQualityQualifiedNum(Long qualityQualifiedNum) |
||||
|
{ |
||||
|
this.qualityQualifiedNum = qualityQualifiedNum; |
||||
|
} |
||||
|
|
||||
|
public Long getQualityQualifiedNum() |
||||
|
{ |
||||
|
return qualityQualifiedNum; |
||||
|
} |
||||
|
public void setQualityUnqualifiedNum(Long qualityUnqualifiedNum) |
||||
|
{ |
||||
|
this.qualityUnqualifiedNum = qualityUnqualifiedNum; |
||||
|
} |
||||
|
|
||||
|
public Long getQualityUnqualifiedNum() |
||||
|
{ |
||||
|
return qualityUnqualifiedNum; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("qualityOrderDetailId", getQualityOrderDetailId()) |
||||
|
.append("qualityOrderCode", getQualityOrderCode()) |
||||
|
.append("inStorageCode", getInStorageCode()) |
||||
|
.append("relatedOrderCode", getRelatedOrderCode()) |
||||
|
.append("qualityStatus", getQualityStatus()) |
||||
|
.append("qualityOrderType", getQualityOrderType()) |
||||
|
.append("qualityStorageStatus", getQualityStorageStatus()) |
||||
|
.append("deliveryInspectionTime", getDeliveryInspectionTime()) |
||||
|
.append("warehouseCode", getWarehouseCode()) |
||||
|
.append("warehouseName", getWarehouseName()) |
||||
|
.append("supplierCode", getSupplierCode()) |
||||
|
.append("supplierName", getSupplierName()) |
||||
|
.append("customerContact", getCustomerContact()) |
||||
|
.append("contactNumber", getContactNumber()) |
||||
|
.append("supplierAddress", getSupplierAddress()) |
||||
|
.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("thisArrivedNum", getThisArrivedNum()) |
||||
|
.append("qualityHasqualifiedNum", getQualityHasqualifiedNum()) |
||||
|
.append("qualityQualifiedNum", getQualityQualifiedNum()) |
||||
|
.append("qualityUnqualifiedNum", getQualityUnqualifiedNum()) |
||||
|
.append("remark", getRemark()) |
||||
|
.append("createBy", getCreateBy()) |
||||
|
.append("createTime", getCreateTime()) |
||||
|
.append("updateBy", getUpdateBy()) |
||||
|
.append("updateTime", getUpdateTime()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
package com.ruoyi.quality.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.quality.domain.QualityOrderDetail; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单详情Mapper接口 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public interface QualityOrderDetailMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
public QualityOrderDetail selectQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 品质管理品质单详情集合 |
||||
|
*/ |
||||
|
public List<QualityOrderDetail> selectQualityOrderDetailList(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualityOrderDetail(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualityOrderDetail(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailIds 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderDetailByIds(String[] qualityOrderDetailIds); |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int cancelQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int restoreQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
QualityOrderDetail selectQualityOrderDetailByCode(String qualityOrderCode); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情集合 |
||||
|
*/ |
||||
|
List<QualityOrderDetail> selectQualityOrderDetailListByCode(String qualityOrderCode); |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
package com.ruoyi.quality.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.ruoyi.quality.domain.QualityOrder; |
||||
|
import com.ruoyi.quality.domain.QualityOrderDetail; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单详情Service接口 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
public interface IQualityOrderDetailService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
public QualityOrderDetail selectQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 品质管理品质单详情集合 |
||||
|
*/ |
||||
|
public List<QualityOrderDetail> selectQualityOrderDetailList(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualityOrderDetail(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualityOrderDetail(QualityOrderDetail qualityOrderDetail); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除品质管理品质单详情 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderDetailByIds(String ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单详情信息 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单详情 |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return |
||||
|
*/ |
||||
|
int cancelQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单详情 |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return |
||||
|
*/ |
||||
|
int restoreQualityOrderDetailById(Long qualityOrderDetailId); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
QualityOrderDetail selectQualityOrderDetailByCode(String qualityOrderCode); |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情集合 |
||||
|
*/ |
||||
|
List<QualityOrderDetail> selectQualityOrderDetailListByCode(String qualityOrderCode); |
||||
|
} |
@ -0,0 +1,152 @@ |
|||||
|
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.QualityOrderDetailMapper; |
||||
|
import com.ruoyi.quality.domain.QualityOrderDetail; |
||||
|
import com.ruoyi.quality.service.IQualityOrderDetailService; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* 品质管理品质单详情Service业务层处理 |
||||
|
* |
||||
|
* @author 刘晓旭 |
||||
|
* @date 2024-05-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class QualityOrderDetailServiceImpl implements IQualityOrderDetailService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private QualityOrderDetailMapper qualityOrderDetailMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
@Override |
||||
|
public QualityOrderDetail selectQualityOrderDetailById(Long qualityOrderDetailId) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.selectQualityOrderDetailById(qualityOrderDetailId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<QualityOrderDetail> selectQualityOrderDetailList(QualityOrderDetail qualityOrderDetail) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.selectQualityOrderDetailList(qualityOrderDetail); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertQualityOrderDetail(QualityOrderDetail qualityOrderDetail) |
||||
|
{ |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
qualityOrderDetail.setCreateBy(loginName); |
||||
|
qualityOrderDetail.setCreateTime(DateUtils.getNowDate()); |
||||
|
return qualityOrderDetailMapper.insertQualityOrderDetail(qualityOrderDetail); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetail 品质管理品质单详情 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateQualityOrderDetail(QualityOrderDetail qualityOrderDetail) |
||||
|
{ |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
qualityOrderDetail.setUpdateBy(loginName); |
||||
|
qualityOrderDetail.setUpdateTime(DateUtils.getNowDate()); |
||||
|
return qualityOrderDetailMapper.updateQualityOrderDetail(qualityOrderDetail); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单详情对象 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualityOrderDetailByIds(String ids) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.deleteQualityOrderDetailByIds(Convert.toStrArray(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除品质管理品质单详情信息 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualityOrderDetailById(Long qualityOrderDetailId) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.deleteQualityOrderDetailById(qualityOrderDetailId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 作废品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int cancelQualityOrderDetailById(Long qualityOrderDetailId) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.cancelQualityOrderDetailById(qualityOrderDetailId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 恢复品质管理品质单详情信息 |
||||
|
* |
||||
|
* @param qualityOrderDetailId 品质管理品质单详情ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int restoreQualityOrderDetailById(Long qualityOrderDetailId) |
||||
|
{ |
||||
|
return qualityOrderDetailMapper.restoreQualityOrderDetailById(qualityOrderDetailId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情 |
||||
|
*/ |
||||
|
@Override |
||||
|
public QualityOrderDetail selectQualityOrderDetailByCode(String qualityOrderCode) { |
||||
|
QualityOrderDetail qualityOrderDetail = qualityOrderDetailMapper.selectQualityOrderDetailByCode(qualityOrderCode); |
||||
|
return qualityOrderDetail; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询品质管理品质单详情列表 |
||||
|
* |
||||
|
* @param qualityOrderCode 品质单号 |
||||
|
* @return 品质管理品质单详情集合 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<QualityOrderDetail> selectQualityOrderDetailListByCode(String qualityOrderCode) { |
||||
|
|
||||
|
List<QualityOrderDetail> qualityOrderDetailList = qualityOrderDetailMapper.selectQualityOrderDetailListByCode(qualityOrderCode); |
||||
|
return qualityOrderDetailList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,199 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ruoyi.quality.mapper.QualityOrderDetailMapper"> |
||||
|
|
||||
|
<resultMap type="QualityOrderDetail" id="QualityOrderDetailResult"> |
||||
|
<result property="qualityOrderDetailId" column="quality_order_detail_id" /> |
||||
|
<result property="qualityOrderCode" column="quality_order_code" /> |
||||
|
<result property="inStorageCode" column="in_storage_code" /> |
||||
|
<result property="relatedOrderCode" column="related_order_code" /> |
||||
|
<result property="qualityStatus" column="quality_status" /> |
||||
|
<result property="qualityOrderType" column="quality_order_type" /> |
||||
|
<result property="qualityStorageStatus" column="quality_storage_status" /> |
||||
|
<result property="deliveryInspectionTime" column="delivery_inspection_time" /> |
||||
|
<result property="warehouseCode" column="warehouse_code" /> |
||||
|
<result property="warehouseName" column="warehouse_name" /> |
||||
|
<result property="supplierCode" column="supplier_code" /> |
||||
|
<result property="supplierName" column="supplier_name" /> |
||||
|
<result property="customerContact" column="customer_contact" /> |
||||
|
<result property="contactNumber" column="contact_number" /> |
||||
|
<result property="supplierAddress" column="supplier_address" /> |
||||
|
<result property="materialNo" column="material_no" /> |
||||
|
<result property="materialName" column="material_name" /> |
||||
|
<result property="materialType" column="material_type" /> |
||||
|
<result property="materialPhotourl" column="material_photoUrl" /> |
||||
|
<result property="materialBrand" column="material_brand" /> |
||||
|
<result property="materialUnit" column="material_unit" /> |
||||
|
<result property="materialDescribe" column="material_describe" /> |
||||
|
<result property="materialProcessMethod" column="material_process_method" /> |
||||
|
<result property="makeTotal" column="make_total" /> |
||||
|
<result property="thisArrivedNum" column="this_arrived_num" /> |
||||
|
<result property="qualityHasqualifiedNum" column="quality_hasqualified_num" /> |
||||
|
<result property="qualityQualifiedNum" column="quality_qualified_num" /> |
||||
|
<result property="qualityUnqualifiedNum" column="quality_unqualified_num" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
<result property="createBy" column="create_by" /> |
||||
|
<result property="createTime" column="create_time" /> |
||||
|
<result property="updateBy" column="update_by" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectQualityOrderDetailVo"> |
||||
|
select quality_order_detail_id, quality_order_code, in_storage_code, related_order_code, quality_status, quality_order_type, quality_storage_status, delivery_inspection_time, warehouse_code, warehouse_name, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, make_total, this_arrived_num, quality_hasqualified_num, quality_qualified_num, quality_unqualified_num, remark, create_by, create_time, update_by, update_time from quality_order_detail |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectQualityOrderDetailList" parameterType="QualityOrderDetail" resultMap="QualityOrderDetailResult"> |
||||
|
<include refid="selectQualityOrderDetailVo"/> |
||||
|
<where> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectQualityOrderDetailById" parameterType="Long" resultMap="QualityOrderDetailResult"> |
||||
|
<include refid="selectQualityOrderDetailVo"/> |
||||
|
where quality_order_detail_id = #{qualityOrderDetailId} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectQualityOrderDetailByCode" parameterType="String" resultMap="QualityOrderDetailResult"> |
||||
|
<include refid="selectQualityOrderDetailVo"/> |
||||
|
where quality_order_code = #{qualityOrderCode} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="selectQualityOrderDetailListByCode" parameterType="String" resultMap="QualityOrderDetailResult"> |
||||
|
<include refid="selectQualityOrderDetailVo"/> |
||||
|
where quality_order_code = #{qualityOrderCode} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertQualityOrderDetail" parameterType="QualityOrderDetail" useGeneratedKeys="true" keyProperty="qualityOrderDetailId"> |
||||
|
insert into quality_order_detail |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">quality_order_code,</if> |
||||
|
<if test="inStorageCode != null">in_storage_code,</if> |
||||
|
<if test="relatedOrderCode != null">related_order_code,</if> |
||||
|
<if test="qualityStatus != null">quality_status,</if> |
||||
|
<if test="qualityOrderType != null">quality_order_type,</if> |
||||
|
<if test="qualityStorageStatus != null">quality_storage_status,</if> |
||||
|
<if test="deliveryInspectionTime != null">delivery_inspection_time,</if> |
||||
|
<if test="warehouseCode != null">warehouse_code,</if> |
||||
|
<if test="warehouseName != null">warehouse_name,</if> |
||||
|
<if test="supplierCode != null">supplier_code,</if> |
||||
|
<if test="supplierName != null">supplier_name,</if> |
||||
|
<if test="customerContact != null">customer_contact,</if> |
||||
|
<if test="contactNumber != null">contact_number,</if> |
||||
|
<if test="supplierAddress != null">supplier_address,</if> |
||||
|
<if test="materialNo != null">material_no,</if> |
||||
|
<if test="materialName != null">material_name,</if> |
||||
|
<if test="materialType != null">material_type,</if> |
||||
|
<if test="materialPhotourl != null">material_photoUrl,</if> |
||||
|
<if test="materialBrand != null">material_brand,</if> |
||||
|
<if test="materialUnit != null">material_unit,</if> |
||||
|
<if test="materialDescribe != null">material_describe,</if> |
||||
|
<if test="materialProcessMethod != null">material_process_method,</if> |
||||
|
<if test="makeTotal != null">make_total,</if> |
||||
|
<if test="thisArrivedNum != null">this_arrived_num,</if> |
||||
|
<if test="qualityHasqualifiedNum != null">quality_hasqualified_num,</if> |
||||
|
<if test="qualityQualifiedNum != null">quality_qualified_num,</if> |
||||
|
<if test="qualityUnqualifiedNum != null">quality_unqualified_num,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
<if test="createBy != null">create_by,</if> |
||||
|
<if test="createTime != null">create_time,</if> |
||||
|
<if test="updateBy != null">update_by,</if> |
||||
|
<if test="updateTime != null">update_time,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">#{qualityOrderCode},</if> |
||||
|
<if test="inStorageCode != null">#{inStorageCode},</if> |
||||
|
<if test="relatedOrderCode != null">#{relatedOrderCode},</if> |
||||
|
<if test="qualityStatus != null">#{qualityStatus},</if> |
||||
|
<if test="qualityOrderType != null">#{qualityOrderType},</if> |
||||
|
<if test="qualityStorageStatus != null">#{qualityStorageStatus},</if> |
||||
|
<if test="deliveryInspectionTime != null">#{deliveryInspectionTime},</if> |
||||
|
<if test="warehouseCode != null">#{warehouseCode},</if> |
||||
|
<if test="warehouseName != null">#{warehouseName},</if> |
||||
|
<if test="supplierCode != null">#{supplierCode},</if> |
||||
|
<if test="supplierName != null">#{supplierName},</if> |
||||
|
<if test="customerContact != null">#{customerContact},</if> |
||||
|
<if test="contactNumber != null">#{contactNumber},</if> |
||||
|
<if test="supplierAddress != null">#{supplierAddress},</if> |
||||
|
<if test="materialNo != null">#{materialNo},</if> |
||||
|
<if test="materialName != null">#{materialName},</if> |
||||
|
<if test="materialType != null">#{materialType},</if> |
||||
|
<if test="materialPhotourl != null">#{materialPhotourl},</if> |
||||
|
<if test="materialBrand != null">#{materialBrand},</if> |
||||
|
<if test="materialUnit != null">#{materialUnit},</if> |
||||
|
<if test="materialDescribe != null">#{materialDescribe},</if> |
||||
|
<if test="materialProcessMethod != null">#{materialProcessMethod},</if> |
||||
|
<if test="makeTotal != null">#{makeTotal},</if> |
||||
|
<if test="thisArrivedNum != null">#{thisArrivedNum},</if> |
||||
|
<if test="qualityHasqualifiedNum != null">#{qualityHasqualifiedNum},</if> |
||||
|
<if test="qualityQualifiedNum != null">#{qualityQualifiedNum},</if> |
||||
|
<if test="qualityUnqualifiedNum != null">#{qualityUnqualifiedNum},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
<if test="createBy != null">#{createBy},</if> |
||||
|
<if test="createTime != null">#{createTime},</if> |
||||
|
<if test="updateBy != null">#{updateBy},</if> |
||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateQualityOrderDetail" parameterType="QualityOrderDetail"> |
||||
|
update quality_order_detail |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="qualityOrderCode != null">quality_order_code = #{qualityOrderCode},</if> |
||||
|
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if> |
||||
|
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if> |
||||
|
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if> |
||||
|
<if test="qualityOrderType != null">quality_order_type = #{qualityOrderType},</if> |
||||
|
<if test="qualityStorageStatus != null">quality_storage_status = #{qualityStorageStatus},</if> |
||||
|
<if test="deliveryInspectionTime != null">delivery_inspection_time = #{deliveryInspectionTime},</if> |
||||
|
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if> |
||||
|
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if> |
||||
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if> |
||||
|
<if test="supplierName != null">supplier_name = #{supplierName},</if> |
||||
|
<if test="customerContact != null">customer_contact = #{customerContact},</if> |
||||
|
<if test="contactNumber != null">contact_number = #{contactNumber},</if> |
||||
|
<if test="supplierAddress != null">supplier_address = #{supplierAddress},</if> |
||||
|
<if test="materialNo != null">material_no = #{materialNo},</if> |
||||
|
<if test="materialName != null">material_name = #{materialName},</if> |
||||
|
<if test="materialType != null">material_type = #{materialType},</if> |
||||
|
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if> |
||||
|
<if test="materialBrand != null">material_brand = #{materialBrand},</if> |
||||
|
<if test="materialUnit != null">material_unit = #{materialUnit},</if> |
||||
|
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if> |
||||
|
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> |
||||
|
<if test="makeTotal != null">make_total = #{makeTotal},</if> |
||||
|
<if test="thisArrivedNum != null">this_arrived_num = #{thisArrivedNum},</if> |
||||
|
<if test="qualityHasqualifiedNum != null">quality_hasqualified_num = #{qualityHasqualifiedNum},</if> |
||||
|
<if test="qualityQualifiedNum != null">quality_qualified_num = #{qualityQualifiedNum},</if> |
||||
|
<if test="qualityUnqualifiedNum != null">quality_unqualified_num = #{qualityUnqualifiedNum},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
<if test="createBy != null">create_by = #{createBy},</if> |
||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
|
</trim> |
||||
|
where quality_order_detail_id = #{qualityOrderDetailId} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteQualityOrderDetailById" parameterType="Long"> |
||||
|
delete from quality_order_detail where quality_order_detail_id = #{qualityOrderDetailId} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteQualityOrderDetailByIds" parameterType="String"> |
||||
|
delete from quality_order_detail where quality_order_detail_id in |
||||
|
<foreach item="qualityOrderDetailId" collection="array" open="(" separator="," close=")"> |
||||
|
#{qualityOrderDetailId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<update id="cancelQualityOrderDetailById" parameterType="Long"> |
||||
|
update quality_order_detail set del_flag = '1' where quality_order_detail_id = #{qualityOrderDetailId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="restoreQualityOrderDetailById" parameterType="Long"> |
||||
|
update quality_order_detail set del_flag = '0' where quality_order_detail_id = #{qualityOrderDetailId} |
||||
|
</update> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,223 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('开始品质')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
<style> |
||||
|
.supplier-value { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
|
||||
|
.supplier-value span { |
||||
|
margin-right: 10px; |
||||
|
} |
||||
|
|
||||
|
.info-separator::after { |
||||
|
content: "-"; |
||||
|
margin: 0 5px; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-qualityOrder-edit" th:object="${qualityOrder}"> |
||||
|
<input name="qualityOrderId" th:field="*{qualityOrderId}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">品质单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="qualityOrderCode" th:field="*{qualityOrderCode}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">入库单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="inStorageCode" th:field="*{inStorageCode}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">关联订单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">品质单订单类型:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="qualityOrderType" class="form-control m-b" th:with="type=${@dict.getType('quality_order_type')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityOrderType}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">品质单入库类型:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="qualityStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('quality_storage_status')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStorageStatus}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">交付质检时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="deliveryInspectionTime" th:value="${#dates.format(qualityOrder.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">仓库Id:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">仓库名称:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="container"> |
||||
|
<!--物料相关--> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12" id="tablesContainer"> |
||||
|
<!-- 表格将在这里动态生成 --> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
|
||||
|
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]] |
||||
|
|
||||
|
var prefix = ctx + "quality/qualityOrder"; |
||||
|
$("#form-qualityOrder-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/startingQuality", $('#form-qualityOrder-edit').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='deliveryInspectionTime']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
$(function() { |
||||
|
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 |
||||
|
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
||||
|
|
||||
|
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + qualityOrderCode, function(data) { |
||||
|
for (var supplierCode in data) { |
||||
|
if (data.hasOwnProperty(supplierCode)) { |
||||
|
var supplierData = data[supplierCode]; |
||||
|
createTableForSupplier(supplierCode, supplierData); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
function createTableForSupplier(supplierCode, supplierData) { |
||||
|
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); |
||||
|
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); |
||||
|
|
||||
|
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 |
||||
|
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 |
||||
|
|
||||
|
// 构建含有额外供应商信息的标题字符串 |
||||
|
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') + |
||||
|
' </br> ' + (supplierInfo.customerContact || 'N/A') + |
||||
|
' - ' + (supplierInfo.contactNumber || 'N/A') + |
||||
|
' - ' + (supplierInfo.supplierAddress || 'N/A'); |
||||
|
|
||||
|
var $header = $('<h4>' + headerTitle + '</h4>'); |
||||
|
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); |
||||
|
|
||||
|
$table.bootstrapTable({ |
||||
|
data: supplierData, |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, { |
||||
|
title: '料号', |
||||
|
field: 'materialNo' |
||||
|
}, { |
||||
|
title: '物料名称', |
||||
|
field: 'materialName' |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料类型', |
||||
|
field: 'materialType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料图片地址', |
||||
|
field: 'materialPhotourl', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料描述', |
||||
|
field: 'materialDescribe', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料品牌', |
||||
|
field: 'materialBrand', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料单位', |
||||
|
field: 'materialUnit', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料加工方式', |
||||
|
field: 'materialProcessMethod', |
||||
|
}, |
||||
|
{ |
||||
|
title: '订单数', |
||||
|
field: 'makeTotal', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质已合格数', |
||||
|
field: 'qualityHasqualifiedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '本次到货数', |
||||
|
field: 'thisArrivedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质报告', |
||||
|
align: 'center', |
||||
|
formatter: function(value, row, index) { |
||||
|
var actions = []; |
||||
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\')"><i class="fa fa-plus"></i>报告</a> '); |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质合格数', |
||||
|
field: 'qualityQualifiedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品质不合格数', |
||||
|
field: 'qualityUnqualifiedNum', |
||||
|
}] |
||||
|
}); |
||||
|
|
||||
|
$tableWrapper.append($header).append($table); |
||||
|
$('#tablesContainer').append($tableWrapper); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/*品质报告*/ |
||||
|
function qualityReport(materialNo){ |
||||
|
var url = ctx + 'quality/qualityOrder/qualityReport/'+materialNo; |
||||
|
$.modal.open("品质报告",url); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue