更新胶料编码为胶料别名,调整相关字段和描述,新增数据库字段以支持胶料信息补全
This commit is contained in:
@@ -138,7 +138,7 @@ public class MesXslOpenMillParamController extends JeecgController<MesXslOpenMil
|
||||
return "所选胶料不存在,请重新选择";
|
||||
}
|
||||
model.setMaterialName(material.getMaterialName());
|
||||
model.setMaterialCode(material.getMaterialCode());
|
||||
model.setMaterialCode(oConvertUtils.isEmpty(material.getAliasName()) ? "" : material.getAliasName());
|
||||
String timeErr = validateTimeFields(model);
|
||||
if (timeErr != null) {
|
||||
return timeErr;
|
||||
|
||||
@@ -39,8 +39,8 @@ public class MesXslOpenMillParam implements Serializable {
|
||||
@Schema(description = "胶料名称冗余")
|
||||
private String materialName;
|
||||
|
||||
@Excel(name = "胶料编码", width = 15)
|
||||
@Schema(description = "胶料编码冗余")
|
||||
@Excel(name = "胶料别名", width = 15)
|
||||
@Schema(description = "胶料别名冗余(取自 mes_material.alias_name)")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "R0进胶时间(秒)", width = 14)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
-- mes_material 胶料字段补全(幂等,可重复执行)
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
SET @db = DATABASE();
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'erp_code') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `erp_code` varchar(64) DEFAULT NULL COMMENT ''ERP编号'' AFTER `customer_id`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'final_shelf_life_days') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `final_shelf_life_days` int DEFAULT NULL COMMENT ''终炼胶保质期(天)'' AFTER `erp_code`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'master_shelf_life_days') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `master_shelf_life_days` int DEFAULT NULL COMMENT ''母炼胶保质期(天)'' AFTER `final_shelf_life_days`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'min_standing_hours') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `min_standing_hours` int DEFAULT NULL COMMENT ''最小停放时间(时)'' AFTER `master_shelf_life_days`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @sql = IF(
|
||||
(SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_material' AND COLUMN_NAME = 'is_special_rubber') = 0,
|
||||
'ALTER TABLE `mes_material` ADD COLUMN `is_special_rubber` tinyint DEFAULT 0 COMMENT ''是否为特种胶(0否1是)'' AFTER `enable_flag`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
@@ -2,7 +2,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{ title: '胶料名称', align: 'center', dataIndex: 'materialName', width: 160 },
|
||||
{ title: '胶料编码', align: 'center', dataIndex: 'materialCode', width: 130 },
|
||||
{ title: '胶料别名', align: 'center', dataIndex: 'materialCode', width: 130 },
|
||||
{ title: 'R0进胶时间(秒)', align: 'center', dataIndex: 'r0FeedTime', width: 120 },
|
||||
{ title: 'R0成环时间(秒)', align: 'center', dataIndex: 'r0RingTime', width: 120 },
|
||||
{ title: 'R0拉断时间(秒)', align: 'center', dataIndex: 'r0BreakTime', width: 120 },
|
||||
@@ -27,7 +27,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{ label: '胶料编码', field: 'materialCode', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '胶料别名', field: 'materialCode', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '胶料名称', field: 'materialName', component: 'JInput', colProps: { span: 6 } },
|
||||
];
|
||||
|
||||
@@ -47,10 +47,10 @@ export const formSchema: FormSchema[] = [
|
||||
componentProps: { disabled: true, placeholder: '选择胶料后自动带出' },
|
||||
},
|
||||
{
|
||||
label: '胶料编码',
|
||||
label: '胶料别名',
|
||||
field: 'materialCode',
|
||||
component: 'Input',
|
||||
componentProps: { disabled: true, placeholder: '选择胶料后自动带出' },
|
||||
componentProps: { disabled: true, placeholder: '选择胶料后自动带出别名' },
|
||||
},
|
||||
{
|
||||
label: 'R0进胶时间',
|
||||
@@ -111,7 +111,7 @@ export const superQuerySchema = {
|
||||
dictCode: 'id',
|
||||
dictText: 'material_name',
|
||||
},
|
||||
materialCode: { title: '胶料编码', order: 1, view: 'text' },
|
||||
materialCode: { title: '胶料别名', order: 1, view: 'text' },
|
||||
materialName: { title: '胶料名称', order: 2, view: 'text' },
|
||||
r0FeedTime: { title: 'R0进胶时间', order: 3, view: 'number' },
|
||||
r0RingTime: { title: 'R0成环时间', order: 4, view: 'number' },
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
const row = (raw as Recordable)?.materialName != null ? raw : (raw as Recordable)?.result;
|
||||
if (row) {
|
||||
model.materialName = row.materialName ?? '';
|
||||
model.materialCode = row.materialCode ?? '';
|
||||
model.materialCode = row.aliasName ?? '';
|
||||
}
|
||||
} catch {
|
||||
model.materialName = '';
|
||||
|
||||
Reference in New Issue
Block a user