feat(wmsCoilContractRel): 添加批量修改钢卷合同关联功能
- 在服务层接口中新增 batchUpdateContractId 方法定义 - 在控制器中添加 /batchUpdateContract 接口支持批量合同修改 - 实现批量更新逻辑,包括钢卷存在性校验和合同ID更新 - 添加缺失钢卷验证并抛出相应业务异常 - 更新后同步钢卷业务员信息 - 使用事务确保数据一致性
This commit is contained in:
@@ -85,6 +85,18 @@ public class WmsCoilContractRelController extends BaseController {
|
||||
return toAjax(iWmsCoilContractRelService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改钢卷所挂接的合同
|
||||
*/
|
||||
@Log(title = "钢卷与合同关联关系", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/batchUpdateContract")
|
||||
public R<Integer> batchUpdateContract(@NotNull(message = "合同ID不能为空") @RequestParam Long contractId,
|
||||
@NotEmpty(message = "钢卷ID列表不能为空") @RequestBody List<Long> coilIds) {
|
||||
int updated = iWmsCoilContractRelService.batchUpdateContractId(contractId, coilIds);
|
||||
return R.ok(updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钢卷与合同关联关系
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user