add:车间质量统计分析

This commit is contained in:
zhangzhiqiang
2023-10-10 16:41:52 +08:00
parent e33ca3fae9
commit 24ed153a81
10 changed files with 377 additions and 65 deletions

View File

@@ -12,7 +12,6 @@ import lombok.extern.slf4j.Slf4j;
import org.nl.common.TableDataInfo;
import org.nl.common.anno.Log;
import org.nl.common.domain.query.PageQuery;
import org.nl.wms.analysis_manage.productCapacity.dto.ProductCapQuery;
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -20,6 +19,8 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.nl.wms.analysis_manage.productCapacity.service.dto.ProductCapQuery;
import java.util.List;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
package org.nl.wms.analysis_manage.productCapacity.dto;
package org.nl.wms.analysis_manage.productCapacity.service.dto;
import lombok.Data;

View File

@@ -0,0 +1,189 @@
package org.nl.wms.analysis_manage.qlmanage.controller;
/*
* @author ZZQ
* @Date 2023/10/8 10:24
*/
import cn.hutool.core.date.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.nl.common.TableDataInfo;
import org.nl.common.anno.Log;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.MapOf;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.wms.analysis_manage.qlmanage.dto.QualityQuery;
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
import org.nl.wms.product_manage.service.workprocedure.IPdmBiWorkprocedureService;
import org.nl.wms.product_manage.service.workprocedure.dao.PdmBiWorkprocedure;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.spring.web.json.Json;
import java.util.*;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/api/qualityanalysis")
@Slf4j
public class QualityController {
@Autowired
private IPdmProduceWorkorderService workorderService;
@Autowired
private IPdmBiWorkprocedureService workprocedureService;
@GetMapping()
@Log("查询质量分析")
public ResponseEntity<Object> byMaterial(QualityQuery query, PageQuery page) {
long between = 30;
between = checkDateLimit(query, between);
QueryWrapper<PdmBiWorkprocedure> wrapper = new QueryWrapper<>();
if (StringUtils.isEmpty(query.getProduct_area())){
query.setProduct_area("A1");
}
wrapper.eq("product_area",query.getProduct_area());
if (!StringUtils.isEmpty(query.getWorkprocedure_id())){
wrapper.eq("workprocedure_id",query.getWorkprocedure_id());
}
Page<Map<String, Object>> page1 = workprocedureService.pageMaps(page.build(PdmBiWorkprocedure.class), wrapper);
String collect = page1.getRecords().stream().map(a->String.valueOf(a.get("workprocedure_id"))).collect(Collectors.joining("','"));
query.setWorkprocedure_id("('"+collect+"')");
List<Map> list = workorderService.qualityAna(query);
if (!CollectionUtils.isEmpty(list)){
System.out.println("有数据了!!!!"+list.size());
}
Map<String, List<Map>> workprocedure_idMap = list.stream().collect(Collectors.groupingBy(map -> String.valueOf(map.get("workprocedure_id"))));
//数据封装
List<Map<String,Object>> result = new ArrayList<>();
String time = query.getStart_time();
String mo =DatePattern.NORM_MONTH_FORMAT.format(DateUtil.parse(query.getStart_time()));
int minWeek = DateUtil.weekOfYear(DateUtil.parse(query.getStart_time()));
int minYear = DateUtil.year(DateUtil.parse(query.getStart_time()));
for (Map record : page1.getRecords()) {
Map<String, Object> item = new HashMap<>();
List<Map> maps = workprocedure_idMap.get(record.get("workprocedure_id"));
item.put("workprocedure_id",record.get("workprocedure_id"));
item.put("workprocedure_name",record.get("workprocedure_name"));
item.put("workprocedure_code",record.get("workprocedure_code"));
item.put("product_area",record.get("product_area"));
Map<String, Map> collectByAnalysis = new HashMap<>();
if (!CollectionUtils.isEmpty(maps)){
collectByAnalysis = maps.stream().collect(HashMap::new, (k, v) -> k.put(String.valueOf(v.get(query.getAnalysis())), v), HashMap::putAll);
}else {
maps = new ArrayList<>();
}
String weektime = minYear+"_"+minWeek;
String motime = mo;
String datetime = time;
for (int i = 1; i <= between; i++) {
switch (query.getAnalysis()){
case "1":
Map itemData = collectByAnalysis.get(datetime);
if (itemData==null){
maps.add(MapOf.of("order_count", "0", "plan_qty", "0", "real_qty", "0", "nok_qty", "0","nok_rate",0,"header",datetime,"sort",i));
}else {
itemData.put("sort",i);
itemData.put("header",datetime);
}
datetime = DatePattern.NORM_DATE_FORMAT.format(DateUtil.offset(DateUtil.parse(query.getStart_time()),DateField.DAY_OF_MONTH,i));
break;
case "2":
Map weekData = collectByAnalysis.get(weektime);
if (weekData==null){
maps.add(MapOf.of("order_count", "0", "plan_qty", "0", "real_qty", "0", "nok_qty", "0","nok_rate",0,"header",weektime,"sort",i));
}else {
weekData.put("sort",i);
weekData.put("header",weektime);
}
DateTime offset = DateUtil.offset(DateUtil.parse(query.getStart_time()), DateField.WEEK_OF_YEAR, i);
weektime = DateUtil.year(offset)+"_"+DateUtil.weekOfYear(offset);
break;
case "3":
Map moDAta = collectByAnalysis.get(motime);
if (moDAta==null){
maps.add(MapOf.of("order_count", "0", "plan_qty", "0", "real_qty", "0", "nok_qty", "0","nok_rate",0,"header",motime,"sort",i));
}else {
moDAta.put("header",motime);
moDAta.put("sort",i);
}
motime = DatePattern.NORM_MONTH_FORMAT.format(DateUtil.offset(DateUtil.parse(query.getStart_time()),DateField.MONTH,i));
break;
default:throw new BadRequestException("统计周期未定义");
}
}
maps.removeIf(map -> map.get("sort")==null);
maps.sort(Comparator.comparing(a->(int)a.get("sort")));
item.put("item",maps);
item.put("viewData",maps.stream().map(a->a.get("nok_rate")).collect(Collectors.toList()));
item.put("header",maps.stream().map(a->a.get("header")).collect(Collectors.toList()));
item.put("total_real_qty",maps.stream().mapToLong(a->Long.valueOf(String.valueOf(a.get("real_qty")))).sum());
item.put("total_nok_qty",maps.stream().mapToLong(a->Long.valueOf(String.valueOf(a.get("nok_qty")))).sum());
item.put("total_order_count",maps.stream().mapToLong(a->Long.valueOf(String.valueOf(a.get("order_count")))).sum());
result.add(item);
}
page1.setRecords(result);
System.out.println(list.size());
return new ResponseEntity<>(TableDataInfo.build(page1), HttpStatus.OK);
}
private long checkDateLimit(QualityQuery query, long between) {
if (StringUtils.isEmpty(query.getAnalysis())){
query.setAnalysis("1");
}
if (query.getAnalysis().equals("1")){
if (query.getStart_time()!=null){
between = DateUtil.between(DateUtil.parse(query.getStart_time()), DateUtil.parse(query.getEnd_time()), DateUnit.DAY);
if (between >30){
throw new BadRequestException("日汇总请选择时间周期为一个月之内");
}
}else {
query.setEnd_time(DateUtil.today());
query.setStart_time(DatePattern.NORM_DATE_FORMAT.format(DateUtil.lastMonth()));
}
}
if (query.getAnalysis().equals("2")){
if (query.getStart_time()!=null){
between = DateUtil.between(DateUtil.parse(query.getStart_time()), DateUtil.parse(query.getEnd_time()), DateUnit.WEEK);
if (between >30){
throw new BadRequestException("日汇总请选择时间周期为一个月之内");
}
}else {
query.setEnd_time(DateUtil.today());
query.setStart_time(DatePattern.NORM_DATE_FORMAT.format(DateUtil.offset(new Date(), DateField.WEEK_OF_MONTH, -30)));
}
}
if (query.getAnalysis().equals("3")){
if (query.getStart_time()!=null){
between = DateUtil.betweenMonth(DateUtil.parse(query.getStart_time()), DateUtil.parse(query.getEnd_time()),true)+1;
if (between >24){
throw new BadRequestException("月汇总请选择时间周期为2年之内");
}
}else {
query.setEnd_time(DateUtil.today());
query.setStart_time(DatePattern.NORM_DATE_FORMAT.format(DateUtil.offset(new Date(), DateField.MONTH, -24)));
between =24;
}
}
return between;
}
}

View File

@@ -0,0 +1,41 @@
package org.nl.wms.analysis_manage.qlmanage.dto;
import cn.hutool.core.date.DateUtil;
import lombok.Data;
import java.util.Date;
/*
* @author ZZQ
* @Date 2023/10/8 10:25
*/
@Data
public class QualityQuery {
/**
* 分析时间1日2周3月
*/
private String analysis;
/**
* 工序id
*/
private String workprocedure_id;
/**
* 车间
*/
private String product_area;
/**
* 日期
*/
private String[] create_time;
private String start_time;
private String end_time;
public void setCreate_time(String[] create_time) {
this.create_time = create_time;
if (create_time!=null && create_time.length == 2){
this.start_time = create_time[0];
this.end_time =create_time[1];
}
}
}

View File

@@ -5,7 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.wms.analysis_manage.productCapacity.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.productCapacity.service.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.qlmanage.dto.QualityQuery;
import org.nl.wms.analysis_manage.scrapRate.service.dto.ScrapRateQuery;
import org.nl.wms.analysis_manage.workingGoods.service.dto.ByProcessQuery;
import org.nl.wms.product_manage.service.workorder.dao.PdmProduceWorkorder;
@@ -178,6 +179,13 @@ public interface IPdmProduceWorkorderService extends IService<PdmProduceWorkorde
*/
List<Map> productCap(ProductCapQuery query);
/**
* 不合格品分析
* @param query
* @return
*/
List<Map> qualityAna(QualityQuery query);
void download(Map map, HttpServletResponse response)
throws IOException;
}

View File

@@ -1,9 +1,9 @@
package org.nl.wms.product_manage.service.workorder.dao.mapper;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.nl.wms.analysis_manage.productCapacity.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.productCapacity.service.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.qlmanage.dto.QualityQuery;
import org.nl.wms.analysis_manage.scrapRate.service.dto.ScrapRateQuery;
import org.nl.wms.analysis_manage.workingGoods.service.dto.ByProcessQuery;
import org.nl.wms.product_manage.service.workorder.dao.PdmProduceWorkorder;
@@ -61,5 +61,11 @@ public interface PdmProduceWorkorderMapper extends BaseMapper<PdmProduceWorkorde
* @return
*/
List<Map> productCap(ProductCapQuery query);
/**
* 工序质量统计
* @param query
* @return
*/
List<Map> qualityAnalysis(QualityQuery query);
}

View File

@@ -339,6 +339,46 @@
GROUP BY
device_code
</select>
<select id="qualityAnalysis" resultType="java.util.Map">
select COUNT(pdm_produce_workorder.workprocedure_id) order_count,
pdm_produce_workorder.workprocedure_id,
YEAR(pdm_produce_workorder.create_time) '4',
DATE_FORMAT(pdm_produce_workorder.create_time,'%Y-%m') '3',
CONCAT(YEAR(pdm_produce_workorder.create_time),"_",WEEK(pdm_produce_workorder.create_time)) '2',
DATE_FORMAT(pdm_produce_workorder.create_time,'%Y-%m-%d') '1',
sum(plan_qty) plan_qty,
SUM(real_qty) real_qty,
SUM(nok_qty) nok_qty,
IF( SUM(real_qty) > 0, sum( nok_qty )*100 / sum( real_qty ), 0 ) AS nok_rate
from pdm_produce_workorder
LEFT JOIN pdm_bi_workprocedure ON pdm_bi_workprocedure.workprocedure_id = pdm_produce_workorder.workprocedure_id
where workorder_status in ('6','7')
<if test="workprocedure_id != null and workprocedure_id != ''">
and pdm_produce_workorder.workprocedure_id in ${workprocedure_id}
</if>
<if test="start_time != null and start_time != ''">
and pdm_produce_workorder.create_time >= #{start_time}
</if>
<if test="product_area != null and product_area != ''">
and pdm_produce_workorder.product_area >= #{product_area}
</if>
<if test="end_time != null and end_time != ''">
and #{end_time} >= pdm_produce_workorder.create_time
</if>
GROUP BY pdm_produce_workorder.workprocedure_id
<choose>
<when test='analysis == "2"'>
,CONCAT(YEAR(pdm_produce_workorder.create_time),"_",WEEK(pdm_produce_workorder.create_time))
</when>
<when test='analysis == "3"'>
,DATE_FORMAT(pdm_produce_workorder.create_time,'%Y-%m')
</when>
<otherwise>
,DATE(pdm_produce_workorder.create_time)
</otherwise>
</choose>
</select>
</mapper>

View File

@@ -7,7 +7,6 @@ import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -28,7 +27,8 @@ import org.nl.common.utils.api.RestBusinessTemplate;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.FileUtil;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.analysis_manage.productCapacity.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.productCapacity.service.dto.ProductCapQuery;
import org.nl.wms.analysis_manage.qlmanage.dto.QualityQuery;
import org.nl.wms.analysis_manage.scrapRate.service.dto.ScrapRateQuery;
import org.nl.wms.analysis_manage.workingGoods.service.dto.ByProcessQuery;
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
@@ -36,7 +36,6 @@ import org.nl.wms.masterdata_manage.master.service.classstandard.IMdPbClassstand
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
import org.nl.wms.mps_manage.other.service.dto.ProduceshiftorderDto;
import org.nl.wms.mps_manage.saleorder.service.IMpsSaleOrderService;
import org.nl.wms.mps_manage.saleorder.service.dao.MpsSaleOrder;
import org.nl.wms.mps_manage.saleorder.service.impl.MpsSaleOrderServiceImpl;
import org.nl.wms.product_manage.service.workorder.dao.WorkorderRecord;
@@ -893,4 +892,10 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
List<Map> maps = this.baseMapper.productCap(query);
return maps;
}
@Override
public List<Map> qualityAna(QualityQuery query) {
List<Map> maps = this.baseMapper.qualityAnalysis(query);
return maps;
}
}

View File

@@ -47,12 +47,11 @@
</el-select>
</el-form-item>
<el-form-item label="统计类型">
<el-radio v-model="radioValue" :label="4">
指定
<el-select v-model="checkboxList" clearable placeholder="可多选" multiple style="width:100%">
<el-option v-for="item in 60" :key="item" :value="item-1">{{ item-1 }}</el-option>
</el-select>
</el-radio>
<el-radio-group v-model="query.analysis" size="small" @change="crud.toQuery">
<el-radio label="1"></el-radio>
<el-radio label="2"></el-radio>
<el-radio label="3"></el-radio>
</el-radio-group>
</el-form-item>
<rrOperation />
</el-form>
@@ -75,29 +74,44 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
:render-header="labelHead"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="index" width="80" label="序号"/>
<el-table-column prop="product_area" width="120" label="所属车间">
<template slot-scope="scope">
{{ dict.label.product_area[scope.row.product_area] }}
</template>
</el-table-column>
<el-table-column prop="device_code" label="设备编号" width="120" show-overflow-tooltip />
<el-table-column prop="device_name" label="设备名称" width="150" />
<el-table-column prop="workprocedure_name" label="工序名称" width="150" show-overflow-tooltip />
<el-table-column prop="plan_qty" label="计划生产数" width="120" />
<el-table-column prop="real_qty" label="实际生产数量" width="120" />
<el-table-column prop="hours" label="实际生产耗时(h)" width="120" :formatter="crud.formatNum0"/>
<el-table-column prop="theory" label="设计产能(ph)" width="120" />
<el-table-column prop="realty" label="实际产能(ph)" width="120" />
<el-table-column prop="realty" label="产能利用率(%)" width="120" >
<template slot-scope="scope" :formatter="crud.formatNum0">
<span>{{ Number(scope.row.realty/scope.row.theory).toFixed(3)}}</span>
</template>
<el-table-column prop="workprocedure_code" label="工序编号" width="120" show-overflow-tooltip />
<el-table-column prop="workprocedure_name" label="工序名称" width="150" />
<el-table-column prop="total_order_count" label="总工单数" width="100" />
<el-table-column prop="total_real_qty" label="生产数" width="150" />
<el-table-column prop="total_nok_qty" label="总废品数" width="150" />
<el-table-column :label="item" v-for="(item, index) in crud.data[0].header" :key="index" align="center">
<el-table-column label="工单数" width="60" >
<template slot-scope="scope">
<span>{{ scope.row.item[index].order_count }}</span>
</template>
</el-table-column>
<el-table-column label="生产数" width="120" >
<template slot-scope="scope">
<span>{{ scope.row.item[index].real_qty }}</span>
</template>
</el-table-column>
<el-table-column label="废品数" width="120" >
<template slot-scope="scope">
<span>{{ scope.row.item[index].nok_qty }}</span>
</template>
</el-table-column>
<el-table-column label="废品率%" width="120" >
<template slot-scope="scope">
<span>{{ scope.row.item[index].nok_rate}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="orders" label="工单列表" width="150" show-overflow-tooltip/>
</el-table>
<!--分页组件-->
<pagination />
@@ -108,7 +122,7 @@
</template>
<script>
import productCap from '@/views/wms/analysis_manage/productCapacity/productCap'
import qualityanilysis from '@/views/wms/analysis_manage/qlmanage/qualityanilysis'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
@@ -118,16 +132,8 @@ import crudDevice from '@/api/wms/pdm/device'
import echarts from 'echarts'
const defaultForm = {
product_area: null,
device_code: null,
device_name: null,
workprocedure_name: null,
theory: null,
real_qty: null,
plan_qty: null,
realty: null,
hours: null,
orders: null,
analysis: '1',
product_area : 'A1',
}
export default {
name: 'WorkGood',
@@ -138,9 +144,9 @@ export default {
return CRUD({
title: '废品统计',
optShow: { add: false, reset: true },
url: 'api/productCap',
url: 'api/qualityanalysis',
idField: 'id',
crudMethod: { ...productCap }
crudMethod: { ...qualityanilysis }
})
},
data() {
@@ -161,6 +167,8 @@ export default {
measure_unit: [],
sects: [],
workList: [],
headerData:[],
product_area: 'A1',
downloadLoading: false,
permission: {
add: ['admin', 'dept:add'],
@@ -172,9 +180,17 @@ export default {
},
created() {
this.getWorkprocedure()
this.query.product_area = 'A1'
this.query.analysis = '1'
},
methods: {
labelHead(h,{column,index}){ //动态表头渲染
//let l = column.label.length;
//let f = 12; //每个字大小,其实是每个字的比例值,大概会比字体大小打差不多大
//column.minWidth = f * l; //字大小乘个数即长度 ,注意不要加px像素这里minWidth只是一个比例值不是真正的长度
//然后将列标题放在一个div块中注意块的宽度一定要100%,否则表格显示不完全
return h('span',{class:'table-head',style:{width:'100%'}},[column.label])
},
sync() {
dailyStructivt.sync(Array.of('st_ivt_structivt_bcp', 'st_ivt_structivt_cp', 'st_ivt_structivt_yl')).then(result => {
this.crud.notify('同步成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@@ -186,39 +202,45 @@ export default {
})
},
[CRUD.HOOK.afterRefresh]() {
var pigdata =[]
var legendData =[]
var xAxisData =this.crud.data[0].header
var seriesData =[]
this.crud.data.forEach(a=>{
pigdata.push({"value":a.realty,"name":a.device_name})
legendData.push(a.workprocedure_name);
seriesData.push({"data":a.viewData,"name":a.workprocedure_name, "type": 'line',"stack": a.workprocedure_name})
}
)
var myChart = echarts.init(document.getElementById('main2'));
var option = {
title: {
text: '实际产能饼图',
left: 'center'
text: '工序废品率'
},
tooltip: {
trigger: 'item'
trigger: 'axis'
},
legend: {
orient: 'vertical',
left: 'left'
data: legendData
},
series: [
{
name: '实际产能',
type: 'pie',
radius: '70%',
data: pigdata,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
]
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData
},
yAxis: {
type: 'value',
},
series: seriesData
};
myChart.setOption(option);
},

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/scrapRate',
url: 'api/qualityanalysis',
method: 'post',
data
})
@@ -10,7 +10,7 @@ export function add(data) {
export function del(ids) {
return request({
url: 'api/scrapRate',
url: 'api/qualityanalysis',
method: 'delete',
data: ids
})
@@ -19,7 +19,7 @@ export function del(ids) {
export function edit(data) {
return request({
url: 'api/scrapRate',
url: 'api/qualityanalysis',
method: 'put',
data
})