feat: 新增产线维度数据隔离与异常挂接功能
1. 新增全局产线常量配置,统一设置当前产线为双机架 2. 为设备点检、换辊、轧辊管理等接口添加产线过滤逻辑 3. 新增异常记录挂接与撤回功能,完善异常管理流程 4. 重构生产指标、报表接口路径与参数命名 5. 为设备检查表新增产线字段并优化查询逻辑 6. 优化点检页面UI交互与空状态提示
This commit is contained in:
@@ -39,5 +39,8 @@ public class EqpEquipmentChecklist extends BaseEntity {
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@Excel(name = "产线")
|
||||
private String productionLine;
|
||||
|
||||
private String delFlag;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public class EqpEquipmentInspectionRecord extends BaseEntity {
|
||||
private String checkContent;
|
||||
private String checkStandard;
|
||||
private String partName;
|
||||
private String productionLine;
|
||||
|
||||
// 时间范围查询参数
|
||||
private String startInspectTime;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<result property="checkStandard" column="check_standard" />
|
||||
<result property="responsiblePerson" column="responsible_person" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="productionLine" column="production_line" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -20,29 +21,31 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEqpChecklistVo">
|
||||
select check_id, check_no, part_id, part_name, check_content, equipment_state,
|
||||
check_standard, responsible_person, remark, del_flag,
|
||||
create_by, create_time, update_by, update_time
|
||||
from eqp_equipment_checklist
|
||||
select c.check_id, c.check_no, c.part_id, c.part_name, c.check_content, c.equipment_state,
|
||||
c.check_standard, c.responsible_person, c.remark, p.production_line, c.del_flag,
|
||||
c.create_by, c.create_time, c.update_by, c.update_time
|
||||
from eqp_equipment_checklist c
|
||||
left join eqp_equipment_part p on c.part_id = p.part_id and p.del_flag = '0'
|
||||
</sql>
|
||||
|
||||
<select id="selectEqpChecklistList" parameterType="com.ruoyi.mill.domain.EqpEquipmentChecklist" resultMap="EqpChecklistResult">
|
||||
<include refid="selectEqpChecklistVo"/>
|
||||
<where>
|
||||
and del_flag = '0'
|
||||
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
|
||||
<if test="partId != null"> and part_id = #{partId}</if>
|
||||
<if test="partName != null and partName != ''"> and part_name like concat('%', #{partName}, '%')</if>
|
||||
<if test="equipmentState != null and equipmentState != ''"> and equipment_state = #{equipmentState}</if>
|
||||
<if test="checkStandard != null and checkStandard != ''"> and check_standard like concat('%', #{checkStandard}, '%')</if>
|
||||
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person like concat('%', #{responsiblePerson}, '%')</if>
|
||||
and c.del_flag = '0'
|
||||
<if test="checkNo != null and checkNo != ''"> and c.check_no like concat('%', #{checkNo}, '%')</if>
|
||||
<if test="partId != null"> and c.part_id = #{partId}</if>
|
||||
<if test="partName != null and partName != ''"> and c.part_name like concat('%', #{partName}, '%')</if>
|
||||
<if test="equipmentState != null and equipmentState != ''"> and c.equipment_state = #{equipmentState}</if>
|
||||
<if test="checkStandard != null and checkStandard != ''"> and c.check_standard like concat('%', #{checkStandard}, '%')</if>
|
||||
<if test="responsiblePerson != null and responsiblePerson != ''"> and c.responsible_person like concat('%', #{responsiblePerson}, '%')</if>
|
||||
<if test="productionLine != null and productionLine != ''"> and p.production_line = #{productionLine}</if>
|
||||
</where>
|
||||
order by check_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectEqpChecklistByCheckId" parameterType="Long" resultMap="EqpChecklistResult">
|
||||
<include refid="selectEqpChecklistVo"/>
|
||||
where check_id = #{checkId} and del_flag = '0'
|
||||
where c.check_id = #{checkId} and c.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertEqpChecklist" parameterType="com.ruoyi.mill.domain.EqpEquipmentChecklist" useGeneratedKeys="true" keyProperty="checkId">
|
||||
|
||||
@@ -21,15 +21,17 @@
|
||||
<result property="checkStandard" column="check_standard" />
|
||||
<result property="partName" column="part_name" />
|
||||
<result property="partId" column="part_id" />
|
||||
<result property="productionLine" column="production_line" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectEqpInspectionRecordList" parameterType="com.ruoyi.mill.domain.EqpEquipmentInspectionRecord" resultMap="EqpInspectionRecordResult">
|
||||
select r.record_id, r.check_id, r.shift, r.inspect_time, r.run_status,
|
||||
r.inspector, r.abnormal_desc, r.photo, r.remark, r.del_flag,
|
||||
r.create_by, r.create_time, r.update_by, r.update_time,
|
||||
c.check_content, c.check_standard, c.part_name, c.part_id
|
||||
c.check_content, c.check_standard, c.part_name, c.part_id, p.production_line
|
||||
from eqp_equipment_inspection_record r
|
||||
left join eqp_equipment_checklist c on r.check_id = c.check_id and c.del_flag = '0'
|
||||
left join eqp_equipment_part p on c.part_id = p.part_id and p.del_flag = '0'
|
||||
<where>
|
||||
and r.del_flag = '0'
|
||||
<if test="checkId != null"> and r.check_id = #{checkId}</if>
|
||||
@@ -38,6 +40,7 @@
|
||||
<if test="runStatus != null"> and r.run_status = #{runStatus}</if>
|
||||
<if test="inspector != null and inspector != ''"> and r.inspector like concat('%', #{inspector}, '%')</if>
|
||||
<if test="abnormalDesc != null and abnormalDesc != ''"> and r.abnormal_desc like concat('%', #{abnormalDesc}, '%')</if>
|
||||
<if test="productionLine != null and productionLine != ''"> and p.production_line = #{productionLine}</if>
|
||||
<if test="startInspectTime != null and startInspectTime != ''"> and r.inspect_time >= #{startInspectTime}</if>
|
||||
<if test="endInspectTime != null and endInspectTime != ''"> and r.inspect_time <= concat(#{endInspectTime}, ' 23:59:59')</if>
|
||||
</where>
|
||||
@@ -48,9 +51,10 @@
|
||||
select r.record_id, r.check_id, r.shift, r.inspect_time, r.run_status,
|
||||
r.inspector, r.abnormal_desc, r.photo, r.remark, r.del_flag,
|
||||
r.create_by, r.create_time, r.update_by, r.update_time,
|
||||
c.check_content, c.check_standard, c.part_name, c.part_id
|
||||
c.check_content, c.check_standard, c.part_name, c.part_id, p.production_line
|
||||
from eqp_equipment_inspection_record r
|
||||
left join eqp_equipment_checklist c on r.check_id = c.check_id and c.del_flag = '0'
|
||||
left join eqp_equipment_part p on c.part_id = p.part_id and p.del_flag = '0'
|
||||
where r.record_id = #{recordId} and r.del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询生产成本明细列表
|
||||
export function listProdDetail(query) {
|
||||
return request({
|
||||
url: '/cost/prodDetail/list',
|
||||
url: '/cost/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -12,7 +12,7 @@ export function listProdDetail(query) {
|
||||
// 查询生产成本明细详细
|
||||
export function getProdDetail(detailId) {
|
||||
return request({
|
||||
url: '/cost/prodDetail/' + detailId,
|
||||
url: '/cost/detail/' + detailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function getProdDetail(detailId) {
|
||||
// 新增生产成本明细
|
||||
export function addProdDetail(data) {
|
||||
return request({
|
||||
url: '/cost/prodDetail',
|
||||
url: '/cost/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -29,7 +29,7 @@ export function addProdDetail(data) {
|
||||
// 修改生产成本明细
|
||||
export function updateProdDetail(data) {
|
||||
return request({
|
||||
url: '/cost/prodDetail',
|
||||
url: '/cost/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -38,7 +38,7 @@ export function updateProdDetail(data) {
|
||||
// 删除生产成本明细
|
||||
export function delProdDetail(detailId) {
|
||||
return request({
|
||||
url: '/cost/prodDetail/' + detailId,
|
||||
url: '/cost/detail/' + detailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -46,7 +46,7 @@ export function delProdDetail(detailId) {
|
||||
// 批量保存生产成本明细(先删除再插入)
|
||||
export function batchSaveProdDetail(data) {
|
||||
return request({
|
||||
url: '/cost/prodDetail/batch',
|
||||
url: '/cost/detail/batch',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
||||
@@ -3,16 +3,16 @@ import request from '@/utils/request'
|
||||
// 查询生产指标明细列表
|
||||
export function listProdMetric(query) {
|
||||
return request({
|
||||
url: '/cost/prodMetric/list',
|
||||
url: '/cost/metric/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
params: { ...query }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询生产指标明细详细
|
||||
export function getProdMetric(metricId) {
|
||||
return request({
|
||||
url: '/cost/prodMetric/' + metricId,
|
||||
url: '/cost/metric/' + metricId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function getProdMetric(metricId) {
|
||||
// 新增生产指标明细
|
||||
export function addProdMetric(data) {
|
||||
return request({
|
||||
url: '/cost/prodMetric',
|
||||
url: '/cost/metric',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -29,7 +29,7 @@ export function addProdMetric(data) {
|
||||
// 修改生产指标明细
|
||||
export function updateProdMetric(data) {
|
||||
return request({
|
||||
url: '/cost/prodMetric',
|
||||
url: '/cost/metric',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -38,7 +38,7 @@ export function updateProdMetric(data) {
|
||||
// 删除生产指标明细
|
||||
export function delProdMetric(metricId) {
|
||||
return request({
|
||||
url: '/cost/prodMetric/' + metricId,
|
||||
url: '/cost/metric/' + metricId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
// 查询生产月报列表
|
||||
export function listProdReport(query) {
|
||||
return request({
|
||||
url: '/cost/prodReport/list',
|
||||
url: '/cost/report/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
params: { ...query, lineType: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询生产月报详细
|
||||
export function getProdReport(reportId) {
|
||||
return request({
|
||||
url: '/cost/prodReport/' + reportId,
|
||||
url: '/cost/report/' + reportId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,25 +21,25 @@ export function getProdReport(reportId) {
|
||||
// 新增生产月报
|
||||
export function addProdReport(data) {
|
||||
return request({
|
||||
url: '/cost/prodReport',
|
||||
url: '/cost/report',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: { ...data, lineType: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 修改生产月报
|
||||
export function updateProdReport(data) {
|
||||
return request({
|
||||
url: '/cost/prodReport',
|
||||
url: '/cost/report',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: { ...data, lineType: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 删除生产月报
|
||||
export function delProdReport(reportId) {
|
||||
return request({
|
||||
url: '/cost/prodReport/' + reportId,
|
||||
url: '/cost/report/' + reportId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -46,8 +47,8 @@ export function delProdReport(reportId) {
|
||||
// 复制生产月报
|
||||
export function copyProdReport(sourceId, data) {
|
||||
return request({
|
||||
url: '/cost/prodReport/copy/' + sourceId,
|
||||
url: '/cost/report/copy/' + sourceId,
|
||||
method: 'post',
|
||||
data: data
|
||||
data: { ...data }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -42,3 +42,20 @@ export function delRelation(relationId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 挂接:将二级异常数据新增到三级异常表
|
||||
export function bindRelation(secondAbnormalId) {
|
||||
return request({
|
||||
url: '/mill/relation/bind/' + secondAbnormalId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回:逻辑删除三级异常表中的挂接数据
|
||||
export function withdrawRelation(relationId, data) {
|
||||
return request({
|
||||
url: '/mill/relation/withdraw/' + relationId,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
|
||||
export function listEquipmentChecklist(query) {
|
||||
return request({ url: '/mill/eqp/checklist/list', method: 'get', params: query })
|
||||
return request({ url: '/mill/eqp/checklist/list', method: 'get', params: { ...query, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function getEquipmentChecklist(checkId) {
|
||||
@@ -9,11 +11,11 @@ export function getEquipmentChecklist(checkId) {
|
||||
}
|
||||
|
||||
export function addEquipmentChecklist(data) {
|
||||
return request({ url: '/mill/eqp/checklist', method: 'post', data: data })
|
||||
return request({ url: '/mill/eqp/checklist', method: 'post', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function updateEquipmentChecklist(data) {
|
||||
return request({ url: '/mill/eqp/checklist', method: 'put', data: data })
|
||||
return request({ url: '/mill/eqp/checklist', method: 'put', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function delEquipmentChecklist(checkId) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
export function listEquipmentInspectionRecord(query) {
|
||||
return request({ url: '/mill/eqp/record/list', method: 'get', params: query })
|
||||
return request({ url: '/mill/eqp/record/list', method: 'get', params: { ...query, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function getEquipmentInspectionRecord(recordId) {
|
||||
@@ -9,11 +10,11 @@ export function getEquipmentInspectionRecord(recordId) {
|
||||
}
|
||||
|
||||
export function addEquipmentInspectionRecord(data) {
|
||||
return request({ url: '/mill/eqp/record', method: 'post', data: data })
|
||||
return request({ url: '/mill/eqp/record', method: 'post', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function updateEquipmentInspectionRecord(data) {
|
||||
return request({ url: '/mill/eqp/record', method: 'put', data: data })
|
||||
return request({ url: '/mill/eqp/record', method: 'put', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function delEquipmentInspectionRecord(recordId) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
export function listEquipmentPart(query) {
|
||||
return request({ url: '/mill/eqp/part/list', method: 'get', params: query })
|
||||
return request({ url: '/mill/eqp/part/list', method: 'get', params: { ...query, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function getEquipmentPart(partId) {
|
||||
@@ -9,11 +10,11 @@ export function getEquipmentPart(partId) {
|
||||
}
|
||||
|
||||
export function addEquipmentPart(data) {
|
||||
return request({ url: '/mill/eqp/part', method: 'post', data: data })
|
||||
return request({ url: '/mill/eqp/part', method: 'post', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function updateEquipmentPart(data) {
|
||||
return request({ url: '/mill/eqp/part', method: 'put', data: data })
|
||||
return request({ url: '/mill/eqp/part', method: 'put', data: { ...data, productionLine: lineId } })
|
||||
}
|
||||
|
||||
export function delEquipmentPart(partId) {
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
// 查询换辊记录分页列表(支持按产线、机架、类型、时间筛选)
|
||||
export function listRollChange(query) {
|
||||
return request({
|
||||
url: '/mes/rollChange/list',
|
||||
url: '/mill/change/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
params: { ...query, lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询指定产线+机架当前在机轧辊(最近一次换辊记录)
|
||||
export function getCurrentRolls(lineId, standNo) {
|
||||
export function getCurrentRolls(_, standNo) {
|
||||
return request({
|
||||
url: '/mes/rollChange/current',
|
||||
url: '/mill/change/current',
|
||||
method: 'get',
|
||||
params: { lineId, standNo }
|
||||
params: { lineId: lineId, standNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询指定产线各机架各辊位实时工作绩效(workLength/coilCount/totalWeight)
|
||||
export function getRollPerformance(lineId) {
|
||||
export function getRollPerformance(_) {
|
||||
return request({
|
||||
url: '/mes/rollChange/performance',
|
||||
url: '/mill/change/performance',
|
||||
method: 'get',
|
||||
params: { lineId }
|
||||
params: { lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询换辊记录详细
|
||||
export function getRollChange(changeId) {
|
||||
return request({
|
||||
url: '/mes/rollChange/' + changeId,
|
||||
url: '/mill/change/' + changeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -38,25 +39,25 @@ export function getRollChange(changeId) {
|
||||
// 新增换辊记录(自动同步辊状态为 Online)
|
||||
export function addRollChange(data) {
|
||||
return request({
|
||||
url: '/mes/rollChange',
|
||||
url: '/mill/change',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: { ...data, lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 修改换辊记录
|
||||
export function updateRollChange(data) {
|
||||
return request({
|
||||
url: '/mes/rollChange',
|
||||
url: '/mill/change',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: { ...data, lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 删除换辊记录
|
||||
export function delRollChange(changeIds) {
|
||||
return request({
|
||||
url: '/mes/rollChange/' + changeIds,
|
||||
url: '/mill/change/' + changeIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
export function listRollInfo(query) {
|
||||
return request({ url: '/mill/roll/info/list', method: 'get', params: query })
|
||||
return request({ url: '/mill/roll/info/list', method: 'get', params: { ...query, lineId: lineId } })
|
||||
}
|
||||
|
||||
export function getRollStats() {
|
||||
@@ -9,7 +10,7 @@ export function getRollStats() {
|
||||
}
|
||||
|
||||
export function listRollOptions(rollType, status) {
|
||||
return request({ url: '/mill/roll/info/options', method: 'get', params: { rollType, status } })
|
||||
return request({ url: '/mill/roll/info/options', method: 'get', params: { lineId: lineId, rollType: rollType, status: status } })
|
||||
}
|
||||
|
||||
export function getRollInfo(rollId) {
|
||||
@@ -17,11 +18,11 @@ export function getRollInfo(rollId) {
|
||||
}
|
||||
|
||||
export function addRollInfo(data) {
|
||||
return request({ url: '/mill/roll/info', method: 'post', data })
|
||||
return request({ url: '/mill/roll/info', method: 'post', data: { ...data, lineId: lineId } })
|
||||
}
|
||||
|
||||
export function updateRollInfo(data) {
|
||||
return request({ url: '/mill/roll/info', method: 'put', data })
|
||||
return request({ url: '/mill/roll/info', method: 'put', data: { ...data, lineId: lineId } })
|
||||
}
|
||||
|
||||
export function delRollInfo(rollIds) {
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
import { lineId, lineName } from '@/utils/constant'
|
||||
|
||||
// 查询指定产线+机架下批轧辊列表
|
||||
export function listRollStandby(lineId, standNo) {
|
||||
export function listRollStandby(_, standNo) {
|
||||
return request({
|
||||
url: '/mes/rollStandby/list',
|
||||
url: '/mill/standby/list',
|
||||
method: 'get',
|
||||
params: { lineId, standNo }
|
||||
params: { lineId: lineId, standNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询下批轧辊详细
|
||||
export function getRollStandby(standbyId) {
|
||||
return request({
|
||||
url: '/mes/rollStandby/' + standbyId,
|
||||
url: '/mill/standby/' + standbyId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,34 +21,34 @@ export function getRollStandby(standbyId) {
|
||||
// 新增下批轧辊(自动同步辊状态为 Standby)
|
||||
export function addRollStandby(data) {
|
||||
return request({
|
||||
url: '/mes/rollStandby',
|
||||
url: '/mill/standby',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: { ...data, lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 修改下批轧辊
|
||||
export function updateRollStandby(data) {
|
||||
return request({
|
||||
url: '/mes/rollStandby',
|
||||
url: '/mill/standby',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: { ...data, lineId: lineId }
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单条下批轧辊(自动恢复辊状态为 Offline)
|
||||
export function delRollStandby(standbyId) {
|
||||
return request({
|
||||
url: '/mes/rollStandby/' + standbyId,
|
||||
url: '/mill/standby/' + standbyId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空指定产线+机架全部下批轧辊
|
||||
export function clearRollStandby(lineId, standNo) {
|
||||
export function clearRollStandby(_, standNo) {
|
||||
return request({
|
||||
url: '/mes/rollStandby/clear',
|
||||
url: '/mill/standby/clear',
|
||||
method: 'delete',
|
||||
params: { lineId, standNo }
|
||||
params: { lineId: lineId, standNo }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,5 +15,7 @@ const getters = {
|
||||
topbarRouters:state => state.permission.topbarRouters,
|
||||
defaultRoutes:state => state.permission.defaultRoutes,
|
||||
sidebarRouters:state => state.permission.sidebarRouters,
|
||||
lineName: state => state.app.lineName,
|
||||
lineId: state => state.app.lineId,
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -7,7 +7,9 @@ const state = {
|
||||
hide: false
|
||||
},
|
||||
device: 'desktop',
|
||||
size: Cookies.get('size') || 'medium'
|
||||
size: Cookies.get('size') || 'medium',
|
||||
lineName: '双机架',
|
||||
lineId: 5
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
||||
2
ruoyi-ui/src/utils/constant.js
Normal file
2
ruoyi-ui/src/utils/constant.js
Normal file
@@ -0,0 +1,2 @@
|
||||
export const lineId = '5'
|
||||
export const lineName = '双机架'
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="itemList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="itemId" v-if="true"/>
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="itemId" v-if="true"/> -->
|
||||
<el-table-column label="成本项目编码" align="center" prop="itemCode" />
|
||||
<el-table-column label="成本项目名称" align="center" prop="itemName" />
|
||||
<el-table-column label="成本分类" align="center" prop="category" />
|
||||
|
||||
@@ -44,10 +44,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="editable">
|
||||
<el-table-column label="挂接状态" align="center" width="100" v-if="showBindActions">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<template v-if="getRelationStatus(scope.row.abnormalId) === 1">
|
||||
<el-tag type="success">已挂接</el-tag>
|
||||
</template>
|
||||
<template v-else-if="getRelationStatus(scope.row.abnormalId) === 2">
|
||||
<el-tag type="info">已撤回</el-tag>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-tag type="warning">未挂接</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="editable || showBindActions">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="editable" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-if="editable" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button v-if="showBindActions && getRelationStatus(scope.row.abnormalId) !== 1" size="mini" type="text" icon="el-icon-upload2" @click="handleBind(scope.row)" v-hasPermi="['mill:relation:bind']">挂接</el-button>
|
||||
<el-button v-if="showBindActions && getRelationStatus(scope.row.abnormalId) === 1" size="mini" type="text" icon="el-icon-refresh-left" style="color: #f56c6c;" @click="handleWithdraw(scope.row)" v-hasPermi="['mill:relation:withdraw']">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -71,6 +86,14 @@ export default {
|
||||
coilInfo: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
showBindActions: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
relationMap: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
dicts: ['coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree'],
|
||||
@@ -85,6 +108,16 @@ export default {
|
||||
this.$emit('update', row);
|
||||
}
|
||||
},
|
||||
getRelationStatus(abnormalId) {
|
||||
const rel = this.relationMap[abnormalId];
|
||||
return rel ? rel.bindStatus : 0;
|
||||
},
|
||||
handleBind(row) {
|
||||
this.$emit('bind', row);
|
||||
},
|
||||
handleWithdraw(row) {
|
||||
this.$emit('withdraw', row);
|
||||
},
|
||||
// 计算目标列的异常挂载时机
|
||||
// 如果coilInfo.coilId存在,且与row.coilId相同,
|
||||
// 判断钢卷的createBy和row.createBy是否相同
|
||||
|
||||
@@ -168,8 +168,12 @@
|
||||
:list="abnormalList"
|
||||
:editable="true"
|
||||
:showCoil="false"
|
||||
:showBindActions="true"
|
||||
:relationMap="relationMap"
|
||||
@update="handleAbnormalUpdate"
|
||||
@delete="handleAbnormalDelete"
|
||||
@bind="handleBind"
|
||||
@withdraw="handleWithdraw"
|
||||
/>
|
||||
</el-card>
|
||||
<el-card shadow="never" v-else>
|
||||
@@ -191,12 +195,25 @@
|
||||
<el-button @click="abnormalOpen = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="撤回确认" :visible.sync="withdrawOpen" width="500px" append-to-body @closed="handleWithdrawDialogClosed">
|
||||
<el-form :model="{ remark: withdrawRemark }" label-width="80px">
|
||||
<el-form-item label="撤回原因">
|
||||
<el-input v-model="withdrawRemark" type="textarea" :rows="3" placeholder="请输入撤回原因" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitWithdraw">确 定</el-button>
|
||||
<el-button @click="withdrawOpen = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActual } from "@/api/mill/actual";
|
||||
import { listCoilAbnormal, addCoilAbnormal, updateCoilAbnormal, delCoilAbnormal } from "@/api/mill/coilAbnormal";
|
||||
import { listRelation, bindRelation, withdrawRelation } from "@/api/mill/coilAbnormalRelation";
|
||||
import AbnormalTable from "./components/AbnormalTable";
|
||||
import AbnormalForm from "./components/AbnormalForm";
|
||||
import ExceptionManager from "./components/ExceptionManager";
|
||||
@@ -216,6 +233,7 @@ export default {
|
||||
actualList: [],
|
||||
currentRow: null,
|
||||
abnormalList: [],
|
||||
relationMap: {},
|
||||
abnormalOpen: false,
|
||||
abnormalTitle: "",
|
||||
abnormalFormData: {},
|
||||
@@ -223,6 +241,9 @@ export default {
|
||||
exceptionTitle: "",
|
||||
exceptionCoilNo: "",
|
||||
exceptionRowData: null,
|
||||
withdrawOpen: false,
|
||||
withdrawRow: null,
|
||||
withdrawRemark: "",
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -301,10 +322,27 @@ export default {
|
||||
loadAbnormalList() {
|
||||
if (!this.currentRow || !this.currentRow.exitMatId) {
|
||||
this.abnormalList = [];
|
||||
this.relationMap = {};
|
||||
return;
|
||||
}
|
||||
listCoilAbnormal({ currentCoilNo: this.currentRow.exitMatId }).then(response => {
|
||||
this.abnormalList = response.rows || [];
|
||||
this.loadRelationMap();
|
||||
});
|
||||
},
|
||||
loadRelationMap() {
|
||||
if (!this.currentRow || !this.currentRow.exitMatId) {
|
||||
this.relationMap = {};
|
||||
return;
|
||||
}
|
||||
listRelation({ currentCoilNo: this.currentRow.exitMatId }).then(response => {
|
||||
const map = {};
|
||||
(response.rows || []).forEach(rel => {
|
||||
if (rel.secondAbnormalId) {
|
||||
map[rel.secondAbnormalId] = rel;
|
||||
}
|
||||
});
|
||||
this.relationMap = map;
|
||||
});
|
||||
},
|
||||
handleAbnormalAdd() {
|
||||
@@ -366,6 +404,36 @@ export default {
|
||||
if (this.$refs.abnormalFormRef && this.$refs.abnormalFormRef.resetFields) {
|
||||
this.$refs.abnormalFormRef.resetFields();
|
||||
}
|
||||
},
|
||||
handleBind(row) {
|
||||
this.$modal.confirm('确认将该异常记录挂接到三级异常表吗?').then(() => {
|
||||
return bindRelation(row.abnormalId);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("挂接成功");
|
||||
this.loadRelationMap();
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleWithdraw(row) {
|
||||
const rel = this.relationMap[row.abnormalId];
|
||||
if (!rel || !rel.relationId) {
|
||||
this.$modal.msgError("未找到挂接记录");
|
||||
return;
|
||||
}
|
||||
this.withdrawRow = rel;
|
||||
this.withdrawRemark = "";
|
||||
this.withdrawOpen = true;
|
||||
},
|
||||
submitWithdraw() {
|
||||
if (!this.withdrawRow) return;
|
||||
withdrawRelation(this.withdrawRow.relationId, { operateRemark: this.withdrawRemark }).then(() => {
|
||||
this.$modal.msgSuccess("撤回成功");
|
||||
this.withdrawOpen = false;
|
||||
this.loadRelationMap();
|
||||
});
|
||||
},
|
||||
handleWithdrawDialogClosed() {
|
||||
this.withdrawRow = null;
|
||||
this.withdrawRemark = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
</el-row>
|
||||
|
||||
<div v-loading="partLoading" style="flex: 1; overflow-y: auto; overflow-x: hidden;">
|
||||
<template v-if="!partLoading && equipmentPartList.length === 0">
|
||||
<el-empty description="暂无点检部位数据" />
|
||||
</template>
|
||||
<div v-for="item in equipmentPartList" :key="item.partId" class="part-card"
|
||||
:class="{ 'part-card-selected': isCurrentPart(item) }" @click="handlePartRowClick(item)">
|
||||
<el-checkbox :value="!!partCheckedMap[item.partId]" @click.stop @change="togglePartSelect(item)"
|
||||
@@ -69,13 +72,6 @@
|
||||
<el-input v-model="checklistQueryParams.checkNo" placeholder="请输入检验编号" clearable
|
||||
@keyup.enter.native="handleChecklistQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验部位" prop="partId">
|
||||
<el-select v-model="checklistQueryParams.partId" placeholder="请选择检验部位" clearable size="mini"
|
||||
@change="handleChecklistQuery" style="width: 150px;">
|
||||
<el-option v-for="item in equipmentPartList" :key="item.partId" :label="item.inspectPart"
|
||||
:value="item.partId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="equipmentState">
|
||||
<el-select v-model="checklistQueryParams.equipmentState" placeholder="请选择设备状态" clearable
|
||||
@change="handleChecklistQuery" style="width: 150px;">
|
||||
@@ -97,28 +93,35 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div v-loading="checklistLoading" style="flex: 1; overflow: hidden;">
|
||||
<el-table :data="equipmentChecklistList" height="calc(100% - 20px)"
|
||||
@selection-change="handleChecklistSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="检验编号" align="center" prop="checkNo" />
|
||||
<el-table-column label="设备部件名称" align="center" prop="partName" width="120" />
|
||||
<el-table-column label="检验内容" align="center" prop="checkContent" show-overflow-tooltip />
|
||||
<el-table-column label="设备状态" align="center" prop="equipmentState" />
|
||||
<el-table-column label="检验标准" align="center" prop="checkStandard" show-overflow-tooltip />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-document-copy"
|
||||
@click.stop="handleChecklistCopy(scope.row)">
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click.stop="handleChecklistUpdate(scope.row)"></el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click.stop="handleChecklistDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="flex: 1; overflow: hidden;">
|
||||
<template v-if="!currentPartId">
|
||||
<el-empty description="请在左侧选择点检部位" style="height: 100%;" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-loading="checklistLoading" style="height: 100%;">
|
||||
<el-table :data="equipmentChecklistList" height="calc(100% - 20px)"
|
||||
@selection-change="handleChecklistSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="检验编号" align="center" prop="checkNo" />
|
||||
<el-table-column label="设备部件名称" align="center" prop="partName" width="120" />
|
||||
<el-table-column label="检验内容" align="center" prop="checkContent" show-overflow-tooltip />
|
||||
<el-table-column label="设备状态" align="center" prop="equipmentState" />
|
||||
<el-table-column label="检验标准" align="center" prop="checkStandard" show-overflow-tooltip />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-document-copy"
|
||||
@click.stop="handleChecklistCopy(scope.row)">
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click.stop="handleChecklistUpdate(scope.row)"></el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click.stop="handleChecklistDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- <pagination v-show="checklistTotal > 0" :total="checklistTotal" :page.sync="checklistQueryParams.pageNum"
|
||||
@@ -276,7 +279,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getPartList();
|
||||
this.getChecklistList();
|
||||
},
|
||||
methods: {
|
||||
// ========== Part (Left) ==========
|
||||
|
||||
Reference in New Issue
Block a user