Commit 7009dd2f authored by 耿迪迪's avatar 耿迪迪

装配进度

parent 1430fc7a
...@@ -42,6 +42,8 @@ public class TProductDevice extends BaseEntity ...@@ -42,6 +42,8 @@ public class TProductDevice extends BaseEntity
/** 创建人 */ /** 创建人 */
private Long createId; private Long createId;
private String speed;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
...@@ -115,6 +117,14 @@ public class TProductDevice extends BaseEntity ...@@ -115,6 +117,14 @@ public class TProductDevice extends BaseEntity
return createId; return createId;
} }
public String getSpeed() {
return speed;
}
public void setSpeed(String speed) {
this.speed = speed;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -28,7 +28,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,7 +28,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
device.create_time, device.create_time,
device.create_id, device.create_id,
ins.batch_no as batchNo, ins.batch_no as batchNo,
(select nick_name from sys_user us where us.user_id = device.create_id) as createBy (select nick_name from sys_user us where us.user_id = device.create_id) as createBy,
(
select
concat(
if(count(md.id)=0,0,
round((select count(dm.id) from t_product_device_mark dm where dm.device_id = device.id)/count(md.id))*100
)
,'%')
from
t_product_inspect_detail ind,t_product_mark_detail md
where ind.type_id = md.mark_id and ind.type = 3 and ind.inspect_id = device.inspect_id
)as speed
FROM FROM
t_product_device device t_product_device device
LEFT JOIN t_product_inspect ins ON ins.id = device.inspect_id LEFT JOIN t_product_inspect ins ON ins.id = device.inspect_id
......
...@@ -131,9 +131,11 @@ ...@@ -131,9 +131,11 @@
methods:{ methods:{
getExecuteDetail(){ getExecuteDetail(){
listDetail({inspectId:this.inspectId,type:3}).then(res =>{ listDetail({inspectId:this.inspectId,type:3}).then(res =>{
this.getMarkInfo(res.rows[0].typeId); if(res.code == 200 && res.rows.length > 0){
this.queryParams.markId = res.rows[0].typeId; this.getMarkInfo(res.rows[0].typeId);
this.getMarkDetail(); this.queryParams.markId = res.rows[0].typeId;
this.getMarkDetail();
}
}) })
}, },
//模版信息 //模版信息
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<el-table-column label="设备编号" align="center" prop="deviceNo" /> <el-table-column label="设备编号" align="center" prop="deviceNo" />
<el-table-column label="设备名称" align="center" prop="title" /> <el-table-column label="设备名称" align="center" prop="title" />
<el-table-column label="设备状态" align="center" prop="status" :formatter="statusFormat" /> <el-table-column label="设备状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="装配进度" align="center" prop="speed" />
<el-table-column label="创建时间" align="center" prop="createTime"> <el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment