Browse Source

[feat]

品质管理 品质单
修改品质单跳转来料品质单开始品质页面controller;
修改品质报告实体类,调整导出字段,添加注解;
新增品质报告按单号批量查询品质报告mapper和service方法;
修改品质报告导出controller,实现多选和全部导出;
dev
王晓迪 3 days ago
parent
commit
acfd56c9cc
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java
  2. 16
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java
  3. 85
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java
  5. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java
  6. 7
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java
  7. 10
      ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml

6
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java

@ -160,13 +160,15 @@ public class QualityOrderController extends BaseController
} }
/** /**
* 品质单开始品质 * 来料品质单开始品质
*/ */
@GetMapping("/startingQuality/{qualityOrderId}") @GetMapping("/startingQuality/{qualityOrderId}")
public String startingQuality(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) public String startingQuality(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap)
{ {
QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
mmap.put("qualityOrder", qualityOrder); QualityOrderDetail qualityOrderDetail = detailService.selectQualityOrderDetailByCode(qualityOrder.getQualityOrderCode());
mmap.put("qualityOrderDetail",qualityOrderDetail);
// mmap.put("qualityOrder", qualityOrder);
return prefix + "/startingQuality"; return prefix + "/startingQuality";
} }

16
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java

@ -1,5 +1,6 @@
package com.ruoyi.quality.controller; package com.ruoyi.quality.controller;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -11,6 +12,7 @@ import com.ruoyi.quality.service.IQualityOrderReportUnqualifiedService;
import com.ruoyi.quality.service.IQualityShippingDeviceService; import com.ruoyi.quality.service.IQualityShippingDeviceService;
import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild;
import com.ruoyi.warehouse.service.IWarehouseOutOrderService; import com.ruoyi.warehouse.service.IWarehouseOutOrderService;
import org.activiti.engine.RuntimeService; import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
@ -22,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
@ -108,11 +111,18 @@ public class QualityOrderReportController extends BaseController
@Log(title = "品质管理品质单报告", businessType = BusinessType.EXPORT) @Log(title = "品质管理品质单报告", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(QualityOrderReportVO qualityOrderReport) public AjaxResult export(QualityOrderReportVO qualityOrderReport,String ids)
{ {
List<QualityOrderReportVO> list = qualityOrderReportService.selectQualityOrderReportList(qualityOrderReport); if (StringUtils.isEmpty(ids)){
List<QualityOrderReportVO> list = qualityOrderReportService.selectQualityOrderReportListByQualityCOde(qualityOrderReport);
ExcelUtil<QualityOrderReportVO> util = new ExcelUtil<QualityOrderReportVO>(QualityOrderReportVO.class); ExcelUtil<QualityOrderReportVO> util = new ExcelUtil<QualityOrderReportVO>(QualityOrderReportVO.class);
return util.exportExcel(list, "品质管理品质单报告数据"); return util.exportExcel(list, "品质报告单数据");
}else {
String[] reportCodes = ids.split(",");
List<QualityOrderReportVO> list = qualityOrderReportService.selectQualityOrderReportListByCodes(reportCodes);
ExcelUtil<QualityOrderReportVO> util = new ExcelUtil<QualityOrderReportVO>(QualityOrderReportVO.class);
return util.exportExcel(list, ids);
}
} }
/** /**

85
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java

@ -32,89 +32,79 @@ public class QualityOrderReport extends BaseEntity
private String qualityOrderReportType; private String qualityOrderReportType;
/** 品质单号 */ /** 品质单号 */
@Excel(name = "品质单号") @Excel(name = "品质单号",sort = 1)
private String qualityOrderCode; private String qualityOrderCode;
/** 供应商Id */ /** 供应商Id */
@Excel(name = "供应商Id")
private String supplierCode; private String supplierCode;
/** 供应商名称 */ /** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName; private String supplierName;
/** 料号 */ /** 料号 */
@Excel(name = "料号") @Excel(name = "料号",sort = 6)
private String materialNo; private String materialNo;
/** 物料名称 */ /** 物料名称 */
@Excel(name = "物料名称") @Excel(name = "物料名称",sort = 7)
private String materialName; private String materialName;
/** 生产订单数 */ /** 生产订单数 */
@Excel(name = "生产订单数")
private Integer makeTotal; private Integer makeTotal;
/** 原实际到货数量 */ /** 原实际到货数量 */
@Excel(name = "检验数") @Excel(name = "检验数",sort = 8)
private int checkNum; private int checkNum;
//交付质检时间 //交付质检时间
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交检时间",sort = 11,dateFormat = "yyyy-MM-dd")
private Date deliveryInspectionTime; private Date deliveryInspectionTime;
/** 入库单号 */ /** 入库单号 */
@Excel(name = "入库单号") @Excel(name = "入库单号",sort = 3)
private String inStorageCode; private String inStorageCode;
/** 品质单订单类型 */ /** 品质单订单类型 */
@Excel(name = "品质单订单类型") @Excel(name = "订单类型",sort = 4,dictType = "quality_order_type")
private String qualityOrderType; private String qualityOrderType;
/** 品质单入库类型 */ /** 品质单入库类型 */
@Excel(name = "品质单入库类型") @Excel(name = "入库类型",sort = 5,dictType = "quality_storage_status")
private String qualityStorageStatus; private String qualityStorageStatus;
/** 品质已合格数 */ /** 品质已合格数 */
@Excel(name = "合格数") @Excel(name = "合格数",sort = 9)
private Integer qualityHasqualifiedNum; private Integer qualityHasqualifiedNum;
/** ok允收数 */ /** ok允收数 */
@Excel(name = "ok允收数")
private Integer okAcceptedNum; private Integer okAcceptedNum;
/** ok报告图片 */ /** ok报告图片 */
@Excel(name = "ok报告图片")
private String okReportUrl; private String okReportUrl;
/** 特采/让步数 */ /** 特采/让步数 */
@Excel(name = "特采/让步数")
private Integer specialConcessionsNum; private Integer specialConcessionsNum;
/** 特采报告图片 */ /** 特采报告图片 */
@Excel(name = "特采报告图片")
private String specialReportUrl; private String specialReportUrl;
/** 检验完成时间 */ /** 检验完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "检验完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkoutCompletionTime; private Date checkoutCompletionTime;
/** 不良分类 */ /** 不良分类 */
@Excel(name = "不良分类")
private String processBadClassification; private String processBadClassification;
/** 不良等级 */ /** 不良等级 */
@Excel(name = "不良等级")
private String processBadGrade; private String processBadGrade;
/** 不良数量 */ /** 不良数量 */
@Excel(name = "不良数") @Excel(name = "不良数",sort = 10)
private Integer processBadNum; private Integer processBadNum;
/** 不合格报告url */ /** 不合格报告url */
@Excel(name = "不合格报告url")
private String unqualifiedReportUrl; private String unqualifiedReportUrl;
/*不合格数集合*/ /*不合格数集合*/
@ -123,10 +113,9 @@ public class QualityOrderReport extends BaseEntity
//品质报告单包含出货设备ID集合 //品质报告单包含出货设备ID集合
List<String> qualityReportDeviceIds; List<String> qualityReportDeviceIds;
@Excel(name = "使用状态")
private String useStatus; private String useStatus;
@Excel(name = "审核状态") @Excel(name = "审核状态",sort = 2,dictType = "auditStatus")
private String auditStatus; private String auditStatus;
/** 流程实例ID */ /** 流程实例ID */
@ -154,6 +143,18 @@ public class QualityOrderReport extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime; private Date applyTime;
@Excel(name = "录入人",sort = 12)
private String createBy;
@Excel(name = "录入时间",sort = 13,dateFormat = "yyyy-MM-dd")
private Date createTime;
@Excel(name = "更新人",sort = 14)
private String updateBy;
@Excel(name = "更新时间",sort = 15,dateFormat = "yyyy-MM-dd")
private Date updateTime;
public void setQualityOrderReportId(Long qualityOrderReportId) public void setQualityOrderReportId(Long qualityOrderReportId)
{ {
this.qualityOrderReportId = qualityOrderReportId; this.qualityOrderReportId = qualityOrderReportId;
@ -471,6 +472,46 @@ public class QualityOrderReport extends BaseEntity
this.qualityOrderReportType = qualityOrderReportType; this.qualityOrderReportType = qualityOrderReportType;
} }
@Override
public String getCreateBy() {
return createBy;
}
@Override
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String getUpdateBy() {
return updateBy;
}
@Override
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

5
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java

@ -95,4 +95,9 @@ public interface QualityOrderReportMapper
* */ * */
QualityOrderReportVO selectMakeInOrderReportByNoAndCode(QualityOrderReportVO qualityOrderReportVO); QualityOrderReportVO selectMakeInOrderReportByNoAndCode(QualityOrderReportVO qualityOrderReportVO);
/*
* 按单号批量查询品质报告
* */
List<QualityOrderReportVO> selectQualityOrderReportListByCodes(String[] ids);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java

@ -35,6 +35,11 @@ public interface IQualityOrderReportService
* 查询品质报告单列表*/ * 查询品质报告单列表*/
List<QualityOrderReportVO> selectQualityOrderReportListByQualityCOde(QualityOrderReportVO qualityReportVO); List<QualityOrderReportVO> selectQualityOrderReportListByQualityCOde(QualityOrderReportVO qualityReportVO);
/*
* 按单号批量查询品质报告
* */
List<QualityOrderReportVO> selectQualityOrderReportListByCodes(String[] ids);
/** /**
* 新增品质管理品质单报告 * 新增品质管理品质单报告
* *

7
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java

@ -200,6 +200,13 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService
return qualityOrderReportMapper.selectQualityOrderReportList(qualityReportVO); return qualityOrderReportMapper.selectQualityOrderReportList(qualityReportVO);
} }
/*
* 按单号批量查询品质报告
* */
@Override
public List<QualityOrderReportVO> selectQualityOrderReportListByCodes(String[] ids){
return qualityOrderReportMapper.selectQualityOrderReportListByCodes(ids);
}
/** /**
* 新增生产成品品质单报告 * 新增生产成品品质单报告
* *

10
ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml

@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="qualityOrderReportType != null and qualityOrderReportType != ''"> and quality_order_report_type = #{qualityOrderReportType}</if> <if test="qualityOrderReportType != null and qualityOrderReportType != ''"> and quality_order_report_type = #{qualityOrderReportType}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="qualityStorageStatus != null and qualityStorageStatus != ''"> and quality_storage_status = #{qualityStorageStatus}</if> <if test="qualityStorageStatus != null and qualityStorageStatus != ''"> and quality_storage_status = #{qualityStorageStatus}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and Date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> <if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if> <if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
</where> </where>
@ -293,4 +293,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update quality_order_report set del_flag = '0' where quality_order_report_id = #{qualityOrderReportId} update quality_order_report set del_flag = '0' where quality_order_report_id = #{qualityOrderReportId}
</update> </update>
<select id="selectQualityOrderReportListByCodes" parameterType="String" resultMap="QualityOrderReportResult">
<include refid="selectQualityOrderReportVo"/>
where quality_order_report_code in
<foreach item="qualityOrderReportCode" collection="array" open="(" separator="," close=")">
#{qualityOrderReportCode}
</foreach>
</select>
</mapper> </mapper>
Loading…
Cancel
Save