feat(wms): 新增会计科目和财务单据相关功能
- 添加了会计科目、财务单据、日记账凭证等领域的实体类、控制器、服务接口、Mapper接口和XML映射文件 - 实现了基本的CRUD操作,包括查询、新增、修改和删除 - 优化了数据校验和批量删除逻辑
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsAccountVo;
|
||||
import com.klp.domain.bo.WmsAccountBo;
|
||||
import com.klp.service.IWmsAccountService;
|
||||
|
||||
/**
|
||||
* 会计科目
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/account")
|
||||
public class WmsAccountController extends BaseController {
|
||||
|
||||
private final IWmsAccountService iWmsAccountService;
|
||||
|
||||
/**
|
||||
* 查询会计科目列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R<List<WmsAccountVo>> list(WmsAccountBo bo) {
|
||||
List<WmsAccountVo> list = iWmsAccountService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会计科目列表
|
||||
*/
|
||||
@Log(title = "会计科目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsAccountBo bo, HttpServletResponse response) {
|
||||
List<WmsAccountVo> list = iWmsAccountService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "会计科目", WmsAccountVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会计科目详细信息
|
||||
*
|
||||
* @param accountId 主键
|
||||
*/
|
||||
@GetMapping("/{accountId}")
|
||||
public R<WmsAccountVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long accountId) {
|
||||
return R.ok(iWmsAccountService.queryById(accountId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会计科目
|
||||
*/
|
||||
@Log(title = "会计科目", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsAccountBo bo) {
|
||||
return toAjax(iWmsAccountService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会计科目
|
||||
*/
|
||||
@Log(title = "会计科目", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsAccountBo bo) {
|
||||
return toAjax(iWmsAccountService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会计科目
|
||||
*
|
||||
* @param accountIds 主键串
|
||||
*/
|
||||
@Log(title = "会计科目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{accountIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] accountIds) {
|
||||
return toAjax(iWmsAccountService.deleteWithValidByIds(Arrays.asList(accountIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsFinancialDocumentVo;
|
||||
import com.klp.domain.bo.WmsFinancialDocumentBo;
|
||||
import com.klp.service.IWmsFinancialDocumentService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 财务单据
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/financialDocument")
|
||||
public class WmsFinancialDocumentController extends BaseController {
|
||||
|
||||
private final IWmsFinancialDocumentService iWmsFinancialDocumentService;
|
||||
|
||||
/**
|
||||
* 查询财务单据列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsFinancialDocumentVo> list(WmsFinancialDocumentBo bo, PageQuery pageQuery) {
|
||||
return iWmsFinancialDocumentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出财务单据列表
|
||||
*/
|
||||
@Log(title = "财务单据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsFinancialDocumentBo bo, HttpServletResponse response) {
|
||||
List<WmsFinancialDocumentVo> list = iWmsFinancialDocumentService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "财务单据", WmsFinancialDocumentVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取财务单据详细信息
|
||||
*
|
||||
* @param documentId 主键
|
||||
*/
|
||||
@GetMapping("/{documentId}")
|
||||
public R<WmsFinancialDocumentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long documentId) {
|
||||
return R.ok(iWmsFinancialDocumentService.queryById(documentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增财务单据
|
||||
*/
|
||||
@Log(title = "财务单据", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsFinancialDocumentBo bo) {
|
||||
return toAjax(iWmsFinancialDocumentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改财务单据
|
||||
*/
|
||||
@Log(title = "财务单据", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsFinancialDocumentBo bo) {
|
||||
return toAjax(iWmsFinancialDocumentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除财务单据
|
||||
*
|
||||
* @param documentIds 主键串
|
||||
*/
|
||||
@Log(title = "财务单据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{documentIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] documentIds) {
|
||||
return toAjax(iWmsFinancialDocumentService.deleteWithValidByIds(Arrays.asList(documentIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsJournalEntryVo;
|
||||
import com.klp.domain.bo.WmsJournalEntryBo;
|
||||
import com.klp.service.IWmsJournalEntryService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 日记账凭证(宽松版)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/journalEntry")
|
||||
public class WmsJournalEntryController extends BaseController {
|
||||
|
||||
private final IWmsJournalEntryService iWmsJournalEntryService;
|
||||
|
||||
/**
|
||||
* 查询日记账凭证(宽松版)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsJournalEntryVo> list(WmsJournalEntryBo bo, PageQuery pageQuery) {
|
||||
return iWmsJournalEntryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出日记账凭证(宽松版)列表
|
||||
*/
|
||||
@Log(title = "日记账凭证(宽松版)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsJournalEntryBo bo, HttpServletResponse response) {
|
||||
List<WmsJournalEntryVo> list = iWmsJournalEntryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "日记账凭证(宽松版)", WmsJournalEntryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日记账凭证(宽松版)详细信息
|
||||
*
|
||||
* @param entryId 主键
|
||||
*/
|
||||
@GetMapping("/{entryId}")
|
||||
public R<WmsJournalEntryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long entryId) {
|
||||
return R.ok(iWmsJournalEntryService.queryById(entryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增日记账凭证(宽松版)
|
||||
*/
|
||||
@Log(title = "日记账凭证(宽松版)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsJournalEntryBo bo) {
|
||||
return toAjax(iWmsJournalEntryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改日记账凭证(宽松版)
|
||||
*/
|
||||
@Log(title = "日记账凭证(宽松版)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsJournalEntryBo bo) {
|
||||
return toAjax(iWmsJournalEntryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日记账凭证(宽松版)
|
||||
*
|
||||
* @param entryIds 主键串
|
||||
*/
|
||||
@Log(title = "日记账凭证(宽松版)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{entryIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] entryIds) {
|
||||
return toAjax(iWmsJournalEntryService.deleteWithValidByIds(Arrays.asList(entryIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsOrderProfitVo;
|
||||
import com.klp.domain.bo.WmsOrderProfitBo;
|
||||
import com.klp.service.IWmsOrderProfitService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 订单盈亏
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/orderProfit")
|
||||
public class WmsOrderProfitController extends BaseController {
|
||||
|
||||
private final IWmsOrderProfitService iWmsOrderProfitService;
|
||||
|
||||
/**
|
||||
* 查询订单盈亏列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsOrderProfitVo> list(WmsOrderProfitBo bo, PageQuery pageQuery) {
|
||||
return iWmsOrderProfitService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单盈亏列表
|
||||
*/
|
||||
@Log(title = "订单盈亏", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsOrderProfitBo bo, HttpServletResponse response) {
|
||||
List<WmsOrderProfitVo> list = iWmsOrderProfitService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单盈亏", WmsOrderProfitVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单盈亏详细信息
|
||||
*
|
||||
* @param profitId 主键
|
||||
*/
|
||||
@GetMapping("/{profitId}")
|
||||
public R<WmsOrderProfitVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long profitId) {
|
||||
return R.ok(iWmsOrderProfitService.queryById(profitId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单盈亏
|
||||
*/
|
||||
@Log(title = "订单盈亏", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsOrderProfitBo bo) {
|
||||
return toAjax(iWmsOrderProfitService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单盈亏
|
||||
*/
|
||||
@Log(title = "订单盈亏", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsOrderProfitBo bo) {
|
||||
return toAjax(iWmsOrderProfitService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单盈亏
|
||||
*
|
||||
* @param profitIds 主键串
|
||||
*/
|
||||
@Log(title = "订单盈亏", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{profitIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] profitIds) {
|
||||
return toAjax(iWmsOrderProfitService.deleteWithValidByIds(Arrays.asList(profitIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsPayableVo;
|
||||
import com.klp.domain.bo.WmsPayableBo;
|
||||
import com.klp.service.IWmsPayableService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 应付款管理(宽松版)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/payable")
|
||||
public class WmsPayableController extends BaseController {
|
||||
|
||||
private final IWmsPayableService iWmsPayableService;
|
||||
|
||||
/**
|
||||
* 查询应付款管理(宽松版)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsPayableVo> list(WmsPayableBo bo, PageQuery pageQuery) {
|
||||
return iWmsPayableService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出应付款管理(宽松版)列表
|
||||
*/
|
||||
@Log(title = "应付款管理(宽松版)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsPayableBo bo, HttpServletResponse response) {
|
||||
List<WmsPayableVo> list = iWmsPayableService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "应付款管理(宽松版)", WmsPayableVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应付款管理(宽松版)详细信息
|
||||
*
|
||||
* @param payableId 主键
|
||||
*/
|
||||
@GetMapping("/{payableId}")
|
||||
public R<WmsPayableVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long payableId) {
|
||||
return R.ok(iWmsPayableService.queryById(payableId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应付款管理(宽松版)
|
||||
*/
|
||||
@Log(title = "应付款管理(宽松版)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsPayableBo bo) {
|
||||
return toAjax(iWmsPayableService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应付款管理(宽松版)
|
||||
*/
|
||||
@Log(title = "应付款管理(宽松版)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsPayableBo bo) {
|
||||
return toAjax(iWmsPayableService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应付款管理(宽松版)
|
||||
*
|
||||
* @param payableIds 主键串
|
||||
*/
|
||||
@Log(title = "应付款管理(宽松版)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{payableIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] payableIds) {
|
||||
return toAjax(iWmsPayableService.deleteWithValidByIds(Arrays.asList(payableIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsReceivableVo;
|
||||
import com.klp.domain.bo.WmsReceivableBo;
|
||||
import com.klp.service.IWmsReceivableService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 应收款管理(宽松版)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/receivable")
|
||||
public class WmsReceivableController extends BaseController {
|
||||
|
||||
private final IWmsReceivableService iWmsReceivableService;
|
||||
|
||||
/**
|
||||
* 查询应收款管理(宽松版)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsReceivableVo> list(WmsReceivableBo bo, PageQuery pageQuery) {
|
||||
return iWmsReceivableService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出应收款管理(宽松版)列表
|
||||
*/
|
||||
@Log(title = "应收款管理(宽松版)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsReceivableBo bo, HttpServletResponse response) {
|
||||
List<WmsReceivableVo> list = iWmsReceivableService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "应收款管理(宽松版)", WmsReceivableVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应收款管理(宽松版)详细信息
|
||||
*
|
||||
* @param receivableId 主键
|
||||
*/
|
||||
@GetMapping("/{receivableId}")
|
||||
public R<WmsReceivableVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long receivableId) {
|
||||
return R.ok(iWmsReceivableService.queryById(receivableId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应收款管理(宽松版)
|
||||
*/
|
||||
@Log(title = "应收款管理(宽松版)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsReceivableBo bo) {
|
||||
return toAjax(iWmsReceivableService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应收款管理(宽松版)
|
||||
*/
|
||||
@Log(title = "应收款管理(宽松版)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsReceivableBo bo) {
|
||||
return toAjax(iWmsReceivableService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应收款管理(宽松版)
|
||||
*
|
||||
* @param receivableIds 主键串
|
||||
*/
|
||||
@Log(title = "应收款管理(宽松版)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{receivableIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] receivableIds) {
|
||||
return toAjax(iWmsReceivableService.deleteWithValidByIds(Arrays.asList(receivableIds), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user