|
|
|
@ -64,27 +64,6 @@ public class ExpenseWarehouseDayController extends BladeController {
|
|
|
|
|
|
|
|
|
|
private final IExpenseWarehouseDayService expenseWarehouseDayService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 详情 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/detail") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "详情", notes = "传入expenseWarehouseDay") |
|
|
|
|
public R<ExpenseWarehouseDayVO> detail(ExpenseWarehouseDayEntity expenseWarehouseDay) { |
|
|
|
|
ExpenseWarehouseDayEntity detail = expenseWarehouseDayService.getOne(Condition.getQueryWrapper(expenseWarehouseDay)); |
|
|
|
|
return R.data(ExpenseWarehouseDayWrapper.build().entityVO(detail)); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 分页 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/list") |
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
@ApiOperation(value = "分页", notes = "传入expenseWarehouseDay") |
|
|
|
|
public R<IPage<ExpenseWarehouseDayVO>> list(@ApiIgnore @RequestParam Map<String, Object> expenseWarehouseDay, Query query) { |
|
|
|
|
IPage<ExpenseWarehouseDayEntity> pages = expenseWarehouseDayService.page(Condition.getPage(query), Condition.getQueryWrapper(expenseWarehouseDay, ExpenseWarehouseDayEntity.class)); |
|
|
|
|
return R.data(ExpenseWarehouseDayWrapper.build().pageVO(pages)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 自定义分页 |
|
|
|
|
*/ |
|
|
|
@ -96,61 +75,4 @@ public class ExpenseWarehouseDayController extends BladeController {
|
|
|
|
|
return R.data(pages); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 新增 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/save") |
|
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
|
@ApiOperation(value = "新增", notes = "传入expenseWarehouseDay") |
|
|
|
|
public R save(@Valid @RequestBody ExpenseWarehouseDayEntity expenseWarehouseDay) { |
|
|
|
|
return R.status(expenseWarehouseDayService.save(expenseWarehouseDay)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 修改 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/update") |
|
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
|
@ApiOperation(value = "修改", notes = "传入expenseWarehouseDay") |
|
|
|
|
public R update(@Valid @RequestBody ExpenseWarehouseDayEntity expenseWarehouseDay) { |
|
|
|
|
return R.status(expenseWarehouseDayService.updateById(expenseWarehouseDay)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 新增或修改 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/submit") |
|
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入expenseWarehouseDay") |
|
|
|
|
public R submit(@Valid @RequestBody ExpenseWarehouseDayEntity expenseWarehouseDay) { |
|
|
|
|
return R.status(expenseWarehouseDayService.saveOrUpdate(expenseWarehouseDay)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日仓储成本统计表 删除 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/remove") |
|
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return R.status(expenseWarehouseDayService.deleteLogic(Func.toLongList(ids))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 导出数据 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/export-expenseWarehouseDay") |
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
@ApiOperation(value = "导出数据", notes = "传入expenseWarehouseDay") |
|
|
|
|
public void exportExpenseWarehouseDay(@ApiIgnore @RequestParam Map<String, Object> expenseWarehouseDay, BladeUser bladeUser, HttpServletResponse response) { |
|
|
|
|
QueryWrapper<ExpenseWarehouseDayEntity> queryWrapper = Condition.getQueryWrapper(expenseWarehouseDay, ExpenseWarehouseDayEntity.class); |
|
|
|
|
//if (!AuthUtil.isAdministrator()) {
|
|
|
|
|
// queryWrapper.lambda().eq(ExpenseWarehouseDay::getTenantId, bladeUser.getTenantId());
|
|
|
|
|
//}
|
|
|
|
|
queryWrapper.lambda().eq(ExpenseWarehouseDayEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
|
|
|
|
List<ExpenseWarehouseDayExcel> list = expenseWarehouseDayService.exportExpenseWarehouseDay(queryWrapper); |
|
|
|
|
ExcelUtil.export(response, "日仓储成本统计表数据" + DateUtil.time(), "日仓储成本统计表数据表", list, ExpenseWarehouseDayExcel.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|