Appearance
POST /dm-device/outsource/add
Content-Type: application/json
触发按钮:addAjax
入参
无
出参
传递对象:ResultData
无
前端校验规则
前端校验
├── 权限校验
│ └── 新增按钮权限
│ └── v-auth: 'repair:outsourcing:add:popup'
└── 表单校验
├── deviceCode(设备编号)
│ └── required: true, trigger: blur
├── outsourceCompany(外委单位)
│ └── required: true, trigger: blur
└── predictCost(预计金额)
├── 仅允许数字
├── 不能小于 0
└── 最多 2 位小数(trigger: blur)后端逻辑
业务流程:生成委外单号 -> 初始化委外信息 -> 保存委外维修单 -> 关联附件
├── 生成委外单号
│ ├── RedisService.getResetSeqNo :155
│ └── 编号规则
│ └── WW + yyyyMMdd + 3位流水
├── 初始化委外信息
├── 保存委外维修单
│ └── RepairOutsourceServiceImpl.save :179
└── 关联附件
├── 条件: 存在附件时保存附件关系 :193-195
├── 删除待移除附件:FileClient.deleteFilesByType :210
│ └── FileServiceImpl.deleteFilesByType :277-286
└── 保存附件关系:FileClient.saveJustFileList :213
└── FileServiceImpl.saveJustFileList :266-272后端校验规则
无涉及数据库表
| 库名.表名 | mapper.statement | 描述 |
|---|---|---|
| outsourcing | OutsourcingMapper.insert | 新增outsourcing数据 |