分号接口
This commit is contained in:
1 parent
2bdf31f419
commit
c5ca3b88cc
1 file changed
+1
-69
+1
-69
@@ -37,7 +37,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/sm/common" )
|
||||
@Tag(description = "smErpPurchase" , name = "采购计划" )
|
||||
@Tag(description = "smErpPurchase" , name = "超市公共部分接口" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class SmErpCommonController {
|
||||
|
||||
@@ -64,72 +64,4 @@ public class SmErpCommonController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增采购计划" , description = "新增采购计划" )
|
||||
@SysLog("新增采购计划" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_add')" )
|
||||
public R save(@RequestBody ErpCgPlanSaveDTO erpCgPlanSaveDTO) {
|
||||
SmErpInventoryRecordsEntity smErpInventoryRecordsEntity = BeanUtils.toBean(erpCgPlanSaveDTO, SmErpInventoryRecordsEntity.class);
|
||||
smErpInventoryRecordsEntity.setOrderType(OrderTypeEnum.RK.getType());
|
||||
return R.ok(smErpInventoryRecordsService.save(smErpInventoryRecordsEntity));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询出入库记录表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(smErpInventoryRecordsService.getById(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改出入库记录表
|
||||
* @param smErpInventoryRecords 出入库记录表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改出入库记录表" , description = "修改出入库记录表" )
|
||||
@SysLog("修改出入库记录表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_edit')" )
|
||||
public R updateById(@RequestBody SmErpInventoryRecordsEntity smErpInventoryRecords) {
|
||||
return R.ok(smErpInventoryRecordsService.updateById(smErpInventoryRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除出入库记录表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除出入库记录表" , description = "通过id删除出入库记录表" )
|
||||
@SysLog("通过id删除出入库记录表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(smErpInventoryRecordsService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param smErpInventoryRecords 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('supermarket_smErpInventoryRecords_export')" )
|
||||
public List<SmErpInventoryRecordsEntity> export(SmErpInventoryRecordsEntity smErpInventoryRecords,Long[] ids) {
|
||||
return smErpInventoryRecordsService.list(Wrappers.lambdaQuery(smErpInventoryRecords).in(ArrayUtil.isNotEmpty(ids), SmErpInventoryRecordsEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user