设备部位新增
This commit is contained in:
@@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_part` (
|
||||
`id` varchar(32) NOT NULL COMMENT '主键',
|
||||
`equipment_category_id` varchar(32) NOT NULL COMMENT '所属设备类别主键 mes_xsl_equipment_category.id',
|
||||
`equipment_category_name` varchar(128) DEFAULT NULL COMMENT '设备类别名称冗余展示',
|
||||
`dept_name` varchar(128) NOT NULL COMMENT '部门名称',
|
||||
`part_name` varchar(128) NOT NULL COMMENT '部位名称',
|
||||
`part_code` varchar(64) NOT NULL COMMENT '部位代码(同租户未删除数据中唯一)',
|
||||
`part_description` varchar(500) DEFAULT NULL COMMENT '部位描述',
|
||||
`enable_status` varchar(1) NOT NULL DEFAULT '0' COMMENT '是否启用(字典xslmes_unit_status:0启用1停用)',
|
||||
|
||||
@@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_part` (
|
||||
`id` varchar(32) NOT NULL COMMENT '主键',
|
||||
`equipment_category_id` varchar(32) NOT NULL COMMENT '所属设备类别主键 mes_xsl_equipment_category.id',
|
||||
`equipment_category_name` varchar(128) DEFAULT NULL COMMENT '设备类别名称冗余展示',
|
||||
`dept_name` varchar(128) NOT NULL COMMENT '部门名称',
|
||||
`part_name` varchar(128) NOT NULL COMMENT '部位名称',
|
||||
`part_code` varchar(64) NOT NULL COMMENT '部位代码(同租户未删除数据中唯一)',
|
||||
`part_description` varchar(500) DEFAULT NULL COMMENT '部位描述',
|
||||
`enable_status` varchar(1) NOT NULL DEFAULT '0' COMMENT '是否启用(字典xslmes_unit_status:0启用1停用)',
|
||||
|
||||
@@ -195,8 +195,8 @@ public class MesXslEquipmentPartController extends JeecgController<MesXslEquipme
|
||||
return Result.error("文件导入失败:第 " + rowNo + " 条部位代码【" + pc + "】不能重复(同租户未删除数据中已存在)");
|
||||
}
|
||||
|
||||
if (row.getDeptName() != null) {
|
||||
row.setDeptName(row.getDeptName().trim());
|
||||
if (row.getPartName() != null) {
|
||||
row.setPartName(row.getPartName().trim());
|
||||
}
|
||||
if (row.getPartDescription() != null) {
|
||||
row.setPartDescription(row.getPartDescription().trim());
|
||||
@@ -257,10 +257,10 @@ public class MesXslEquipmentPartController extends JeecgController<MesXslEquipme
|
||||
return "部位代码不能重复";
|
||||
}
|
||||
|
||||
if (oConvertUtils.isEmpty(model.getDeptName()) || model.getDeptName().trim().isEmpty()) {
|
||||
return "部门名称不能为空";
|
||||
if (oConvertUtils.isEmpty(model.getPartName()) || model.getPartName().trim().isEmpty()) {
|
||||
return "部位名称不能为空";
|
||||
}
|
||||
model.setDeptName(model.getDeptName().trim());
|
||||
model.setPartName(model.getPartName().trim());
|
||||
|
||||
String en = model.getEnableStatus();
|
||||
if (en != null) {
|
||||
|
||||
@@ -37,9 +37,9 @@ public class MesXslEquipmentPart implements Serializable {
|
||||
@Schema(description = "设备类别名称冗余展示")
|
||||
private String equipmentCategoryName;
|
||||
|
||||
@Excel(name = "部门名称", width = 20)
|
||||
@Schema(description = "部门名称")
|
||||
private String deptName;
|
||||
@Excel(name = "部位名称", width = 20)
|
||||
@Schema(description = "部位名称")
|
||||
private String partName;
|
||||
|
||||
@Excel(name = "部位代码", width = 16)
|
||||
@Schema(description = "部位代码(同租户未删除数据中唯一)")
|
||||
|
||||
@@ -116,3 +116,11 @@ jeecgboot-vue3/src/views/xslmes/mesXslEquipmentPart/components/MesXslEquipmentPa
|
||||
-- author:jiangxh---date:20260515--for: 【MES】设备部位:明确部位代码仅同租户全局唯一(不按设备类别);去掉选类别后重验部位代码 ---
|
||||
jeecgboot-vue3/src/views/xslmes/mesXslEquipmentPart/MesXslEquipmentPart.data.ts
|
||||
jeecgboot-vue3/src/views/xslmes/mesXslEquipmentPart/components/MesXslEquipmentPartModal.vue
|
||||
|
||||
-- author:jiangxh---date:20260515--for: 【MES】设备部位:部门名称字段改为部位名称(dept_name->part_name,实体partName) ---
|
||||
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslEquipmentPart.java
|
||||
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslEquipmentPartController.java
|
||||
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_58__mes_xsl_equipment_part_dept_name_to_part_name.sql
|
||||
jeecg-boot/db/mes-xsl-equipment-part.sql
|
||||
jeecg-boot/db/mes-xsl-equipment-part-menu-permission.sql
|
||||
jeecgboot-vue3/src/views/xslmes/mesXslEquipmentPart/MesXslEquipmentPart.data.ts
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
-- 设备部位:部门名称字段更名为部位名称(dept_name -> part_name)
|
||||
SET @col_exists := (
|
||||
SELECT COUNT(1)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'mes_xsl_equipment_part'
|
||||
AND COLUMN_NAME = 'dept_name'
|
||||
);
|
||||
SET @ddl_sql := IF(
|
||||
@col_exists > 0,
|
||||
'ALTER TABLE `mes_xsl_equipment_part` CHANGE COLUMN `dept_name` `part_name` varchar(128) NOT NULL COMMENT ''部位名称''',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt_mep_part_name FROM @ddl_sql;
|
||||
EXECUTE stmt_mep_part_name;
|
||||
DEALLOCATE PREPARE stmt_mep_part_name;
|
||||
@@ -4,7 +4,7 @@ import { checkPartCode } from './MesXslEquipmentPart.api';
|
||||
export const columns: BasicColumn[] = [
|
||||
{ title: '部位代码', align: 'center', dataIndex: 'partCode', width: 120 },
|
||||
{ title: '类别名称', align: 'center', dataIndex: 'equipmentCategoryName', width: 160 },
|
||||
{ title: '部门名称', align: 'center', dataIndex: 'deptName', width: 140 },
|
||||
{ title: '部位名称', align: 'center', dataIndex: 'partName', width: 140 },
|
||||
{ title: '部位描述', align: 'center', dataIndex: 'partDescription', width: 200, ellipsis: true },
|
||||
{ title: '是否启用', align: 'center', dataIndex: 'enableStatus_dictText', width: 100 },
|
||||
{ title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 },
|
||||
@@ -21,7 +21,7 @@ export const columns: BasicColumn[] = [
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{ label: '部位代码', field: 'partCode', component: 'Input', colProps: { span: 6 } },
|
||||
{ label: '类别名称', field: 'equipmentCategoryName', component: 'Input', colProps: { span: 6 } },
|
||||
{ label: '部门名称', field: 'deptName', component: 'Input', colProps: { span: 6 } },
|
||||
{ label: '部位名称', field: 'partName', component: 'Input', colProps: { span: 6 } },
|
||||
{
|
||||
label: '是否启用',
|
||||
field: 'enableStatus',
|
||||
@@ -66,11 +66,11 @@ export const formSchema: FormSchema[] = [
|
||||
slot: 'equipmentCategoryPicker',
|
||||
},
|
||||
{
|
||||
label: '部门名称',
|
||||
field: 'deptName',
|
||||
label: '部位名称',
|
||||
field: 'partName',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
componentProps: { placeholder: '请输入部门名称' },
|
||||
componentProps: { placeholder: '请输入部位名称' },
|
||||
},
|
||||
{ label: '部位描述', field: 'partDescription', component: 'InputTextArea', componentProps: { rows: 3 } },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user