Skip to content

POST /dm-device/deviceType/:id

Content-Type: application/json

触发按钮:无

入参

出参

传递对象:ResultData

前端校验规则

前端校验
└── 权限校验
    └── 删除按钮权限
        └── code: 'information:deviceType:delete:popup'

后端逻辑

业务流程:校验设备类型是否可删 -> 软删除设备类型 -> 级联软删除关联子数据
├── 加载待删设备类型
├── 校验设备类型是否被设备引用
│   ├── DeviceCheckDelService.delCheck :699
│   └── DeviceMainService.list :32-33
├── 软删除设备类型记录
└── 软删除关联子数据
    ├── 备件耗材:SparePartConsumableService.update :711-714
    ├── 仪表配置:MeterConfigService.update :716-719
    ├── 安全提示:SafetyTipsService.update :721-724
    └── 规格参数:SpecificationParameterService.update :726-729

后端校验规则

后端校验
├── 数据存在性校验
│   └── 校验设备类型是否存在:deleteById :692-695
│       └── ExceptionCode.EX502010
└── 占用/冲突/前置条件校验
    └── 校验设备类型是否可删除:deleteById :697-700
        └── ExceptionCode.EX1000023

涉及数据库表

库名.表名mapper.statement描述
device_check_deldeviceCheckDelService.delCheckdeviceCheckDelService
spare_part_consumablesparePartConsumableService.updatesparePartConsumableService
meter_configmeterConfigService.updatemeterConfigService
safety_tipssafetyTipsService.updatesafetyTipsService
specification_parameterspecificationParameterService.updatespecificationParameterService