领料单退料单

This commit is contained in:
sxu 2025-07-07 13:20:59 +08:00
parent f8f0f4604c
commit 91c998c8e6
2 changed files with 238 additions and 238 deletions

View File

@ -1,119 +1,119 @@
package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.canteen.core.ims.domain.FetchMaterialDetail;
import com.bonus.canteen.core.ims.service.IFetchMaterialDetailService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 领料单明细Controller
*
* @author xsheng
* @date 2025-07-07
*/
@Api(tags = "领料单明细接口")
@RestController
@RequestMapping("/ims_fetch_material_detail")
public class FetchMaterialDetailController extends BaseController {
@Autowired
private IFetchMaterialDetailService fetchMaterialDetailService;
/**
* 查询领料单明细列表
*/
@ApiOperation(value = "查询领料单明细列表")
//@RequiresPermissions("ims:detail:list")
@GetMapping("/list")
public TableDataInfo list(FetchMaterialDetail fetchMaterialDetail) {
startPage();
List<FetchMaterialDetail> list = fetchMaterialDetailService.selectFetchMaterialDetailList(fetchMaterialDetail);
return getDataTable(list);
}
/**
* 导出领料单明细列表
*/
@ApiOperation(value = "导出领料单明细列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:export")
@SysLog(title = "领料单明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料单明细")
@PostMapping("/export")
public void export(HttpServletResponse response, FetchMaterialDetail fetchMaterialDetail) {
List<FetchMaterialDetail> list = fetchMaterialDetailService.selectFetchMaterialDetailList(fetchMaterialDetail);
ExcelUtil<FetchMaterialDetail> util = new ExcelUtil<FetchMaterialDetail>(FetchMaterialDetail.class);
util.exportExcel(response, list, "领料单明细数据");
}
/**
* 获取领料单明细详细信息
*/
@ApiOperation(value = "获取领料单明细详细信息")
//@RequiresPermissions("ims:detail:query")
@GetMapping(value = "/{fetchDetailId}")
public AjaxResult getInfo(@PathVariable("fetchDetailId") Long fetchDetailId) {
return success(fetchMaterialDetailService.selectFetchMaterialDetailByFetchDetailId(fetchDetailId));
}
/**
* 新增领料单明细
*/
@ApiOperation(value = "新增领料单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:add")
@SysLog(title = "领料单明细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料单明细")
@PostMapping
public AjaxResult add(@RequestBody FetchMaterialDetail fetchMaterialDetail) {
try {
return toAjax(fetchMaterialDetailService.insertFetchMaterialDetail(fetchMaterialDetail));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 修改领料单明细
*/
@ApiOperation(value = "修改领料单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:edit")
@SysLog(title = "领料单明细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改领料单明细")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody FetchMaterialDetail fetchMaterialDetail) {
try {
return toAjax(fetchMaterialDetailService.updateFetchMaterialDetail(fetchMaterialDetail));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 删除领料单明细
*/
@ApiOperation(value = "删除领料单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:remove")
@SysLog(title = "领料单明细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除领料单明细")
@PostMapping("/del/{fetchDetailIds}")
public AjaxResult remove(@PathVariable Long[] fetchDetailIds) {
return toAjax(fetchMaterialDetailService.deleteFetchMaterialDetailByFetchDetailIds(fetchDetailIds));
}
}
//package com.bonus.canteen.core.ims.controller;
//
//import java.util.List;
//import javax.servlet.http.HttpServletResponse;
//import com.bonus.common.log.enums.OperaType;
////import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.bonus.common.log.annotation.SysLog;
//import com.bonus.common.security.annotation.RequiresPermissions;
//import com.bonus.canteen.core.ims.domain.FetchMaterialDetail;
//import com.bonus.canteen.core.ims.service.IFetchMaterialDetailService;
//import com.bonus.common.core.web.controller.BaseController;
//import com.bonus.common.core.web.domain.AjaxResult;
//import com.bonus.common.core.utils.poi.ExcelUtil;
//import com.bonus.common.core.web.page.TableDataInfo;
//
///**
// * 领料单明细Controller
// *
// * @author xsheng
// * @date 2025-07-07
// */
//@Api(tags = "领料单明细接口")
//@RestController
//@RequestMapping("/ims_fetch_material_detail")
//public class FetchMaterialDetailController extends BaseController {
// @Autowired
// private IFetchMaterialDetailService fetchMaterialDetailService;
//
// /**
// * 查询领料单明细列表
// */
// @ApiOperation(value = "查询领料单明细列表")
// //@RequiresPermissions("ims:detail:list")
// @GetMapping("/list")
// public TableDataInfo list(FetchMaterialDetail fetchMaterialDetail) {
// startPage();
// List<FetchMaterialDetail> list = fetchMaterialDetailService.selectFetchMaterialDetailList(fetchMaterialDetail);
// return getDataTable(list);
// }
//
// /**
// * 导出领料单明细列表
// */
// @ApiOperation(value = "导出领料单明细列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:export")
// @SysLog(title = "领料单明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料单明细")
// @PostMapping("/export")
// public void export(HttpServletResponse response, FetchMaterialDetail fetchMaterialDetail) {
// List<FetchMaterialDetail> list = fetchMaterialDetailService.selectFetchMaterialDetailList(fetchMaterialDetail);
// ExcelUtil<FetchMaterialDetail> util = new ExcelUtil<FetchMaterialDetail>(FetchMaterialDetail.class);
// util.exportExcel(response, list, "领料单明细数据");
// }
//
// /**
// * 获取领料单明细详细信息
// */
// @ApiOperation(value = "获取领料单明细详细信息")
// //@RequiresPermissions("ims:detail:query")
// @GetMapping(value = "/{fetchDetailId}")
// public AjaxResult getInfo(@PathVariable("fetchDetailId") Long fetchDetailId) {
// return success(fetchMaterialDetailService.selectFetchMaterialDetailByFetchDetailId(fetchDetailId));
// }
//
// /**
// * 新增领料单明细
// */
// @ApiOperation(value = "新增领料单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:add")
// @SysLog(title = "领料单明细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料单明细")
// @PostMapping
// public AjaxResult add(@RequestBody FetchMaterialDetail fetchMaterialDetail) {
// try {
// return toAjax(fetchMaterialDetailService.insertFetchMaterialDetail(fetchMaterialDetail));
// } catch (Exception e) {
// return error(e.getMessage());
// }
// }
//
// /**
// * 修改领料单明细
// */
// @ApiOperation(value = "修改领料单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:edit")
// @SysLog(title = "领料单明细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改领料单明细")
// @PostMapping("/edit")
// public AjaxResult edit(@RequestBody FetchMaterialDetail fetchMaterialDetail) {
// try {
// return toAjax(fetchMaterialDetailService.updateFetchMaterialDetail(fetchMaterialDetail));
// } catch (Exception e) {
// return error(e.getMessage());
// }
// }
//
// /**
// * 删除领料单明细
// */
// @ApiOperation(value = "删除领料单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:remove")
// @SysLog(title = "领料单明细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除领料单明细")
// @PostMapping("/del/{fetchDetailIds}")
// public AjaxResult remove(@PathVariable Long[] fetchDetailIds) {
// return toAjax(fetchMaterialDetailService.deleteFetchMaterialDetailByFetchDetailIds(fetchDetailIds));
// }
//}

View File

@ -1,119 +1,119 @@
package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.canteen.core.ims.domain.RefundGoodsDetail;
import com.bonus.canteen.core.ims.service.IRefundGoodsDetailService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 退货单明细Controller
*
* @author xsheng
* @date 2025-07-07
*/
@Api(tags = "退货单明细接口")
@RestController
@RequestMapping("/ims_refund_goods_detail")
public class RefundGoodsDetailController extends BaseController {
@Autowired
private IRefundGoodsDetailService refundGoodsDetailService;
/**
* 查询退货单明细列表
*/
@ApiOperation(value = "查询退货单明细列表")
//@RequiresPermissions("ims:detail:list")
@GetMapping("/list")
public TableDataInfo list(RefundGoodsDetail refundGoodsDetail) {
startPage();
List<RefundGoodsDetail> list = refundGoodsDetailService.selectRefundGoodsDetailList(refundGoodsDetail);
return getDataTable(list);
}
/**
* 导出退货单明细列表
*/
@ApiOperation(value = "导出退货单明细列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:export")
@SysLog(title = "退货单明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出退货单明细")
@PostMapping("/export")
public void export(HttpServletResponse response, RefundGoodsDetail refundGoodsDetail) {
List<RefundGoodsDetail> list = refundGoodsDetailService.selectRefundGoodsDetailList(refundGoodsDetail);
ExcelUtil<RefundGoodsDetail> util = new ExcelUtil<RefundGoodsDetail>(RefundGoodsDetail.class);
util.exportExcel(response, list, "退货单明细数据");
}
/**
* 获取退货单明细详细信息
*/
@ApiOperation(value = "获取退货单明细详细信息")
//@RequiresPermissions("ims:detail:query")
@GetMapping(value = "/{refundDetailId}")
public AjaxResult getInfo(@PathVariable("refundDetailId") Long refundDetailId) {
return success(refundGoodsDetailService.selectRefundGoodsDetailByRefundDetailId(refundDetailId));
}
/**
* 新增退货单明细
*/
@ApiOperation(value = "新增退货单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:add")
@SysLog(title = "退货单明细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增退货单明细")
@PostMapping
public AjaxResult add(@RequestBody RefundGoodsDetail refundGoodsDetail) {
try {
return toAjax(refundGoodsDetailService.insertRefundGoodsDetail(refundGoodsDetail));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 修改退货单明细
*/
@ApiOperation(value = "修改退货单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:edit")
@SysLog(title = "退货单明细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改退货单明细")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody RefundGoodsDetail refundGoodsDetail) {
try {
return toAjax(refundGoodsDetailService.updateRefundGoodsDetail(refundGoodsDetail));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 删除退货单明细
*/
@ApiOperation(value = "删除退货单明细")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:detail:remove")
@SysLog(title = "退货单明细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除退货单明细")
@PostMapping("/del/{refundDetailIds}")
public AjaxResult remove(@PathVariable Long[] refundDetailIds) {
return toAjax(refundGoodsDetailService.deleteRefundGoodsDetailByRefundDetailIds(refundDetailIds));
}
}
//package com.bonus.canteen.core.ims.controller;
//
//import java.util.List;
//import javax.servlet.http.HttpServletResponse;
//import com.bonus.common.log.enums.OperaType;
////import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.bonus.common.log.annotation.SysLog;
//import com.bonus.common.security.annotation.RequiresPermissions;
//import com.bonus.canteen.core.ims.domain.RefundGoodsDetail;
//import com.bonus.canteen.core.ims.service.IRefundGoodsDetailService;
//import com.bonus.common.core.web.controller.BaseController;
//import com.bonus.common.core.web.domain.AjaxResult;
//import com.bonus.common.core.utils.poi.ExcelUtil;
//import com.bonus.common.core.web.page.TableDataInfo;
//
///**
// * 退货单明细Controller
// *
// * @author xsheng
// * @date 2025-07-07
// */
//@Api(tags = "退货单明细接口")
//@RestController
//@RequestMapping("/ims_refund_goods_detail")
//public class RefundGoodsDetailController extends BaseController {
// @Autowired
// private IRefundGoodsDetailService refundGoodsDetailService;
//
// /**
// * 查询退货单明细列表
// */
// @ApiOperation(value = "查询退货单明细列表")
// //@RequiresPermissions("ims:detail:list")
// @GetMapping("/list")
// public TableDataInfo list(RefundGoodsDetail refundGoodsDetail) {
// startPage();
// List<RefundGoodsDetail> list = refundGoodsDetailService.selectRefundGoodsDetailList(refundGoodsDetail);
// return getDataTable(list);
// }
//
// /**
// * 导出退货单明细列表
// */
// @ApiOperation(value = "导出退货单明细列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:export")
// @SysLog(title = "退货单明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出退货单明细")
// @PostMapping("/export")
// public void export(HttpServletResponse response, RefundGoodsDetail refundGoodsDetail) {
// List<RefundGoodsDetail> list = refundGoodsDetailService.selectRefundGoodsDetailList(refundGoodsDetail);
// ExcelUtil<RefundGoodsDetail> util = new ExcelUtil<RefundGoodsDetail>(RefundGoodsDetail.class);
// util.exportExcel(response, list, "退货单明细数据");
// }
//
// /**
// * 获取退货单明细详细信息
// */
// @ApiOperation(value = "获取退货单明细详细信息")
// //@RequiresPermissions("ims:detail:query")
// @GetMapping(value = "/{refundDetailId}")
// public AjaxResult getInfo(@PathVariable("refundDetailId") Long refundDetailId) {
// return success(refundGoodsDetailService.selectRefundGoodsDetailByRefundDetailId(refundDetailId));
// }
//
// /**
// * 新增退货单明细
// */
// @ApiOperation(value = "新增退货单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:add")
// @SysLog(title = "退货单明细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增退货单明细")
// @PostMapping
// public AjaxResult add(@RequestBody RefundGoodsDetail refundGoodsDetail) {
// try {
// return toAjax(refundGoodsDetailService.insertRefundGoodsDetail(refundGoodsDetail));
// } catch (Exception e) {
// return error(e.getMessage());
// }
// }
//
// /**
// * 修改退货单明细
// */
// @ApiOperation(value = "修改退货单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:edit")
// @SysLog(title = "退货单明细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改退货单明细")
// @PostMapping("/edit")
// public AjaxResult edit(@RequestBody RefundGoodsDetail refundGoodsDetail) {
// try {
// return toAjax(refundGoodsDetailService.updateRefundGoodsDetail(refundGoodsDetail));
// } catch (Exception e) {
// return error(e.getMessage());
// }
// }
//
// /**
// * 删除退货单明细
// */
// @ApiOperation(value = "删除退货单明细")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:detail:remove")
// @SysLog(title = "退货单明细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除退货单明细")
// @PostMapping("/del/{refundDetailIds}")
// public AjaxResult remove(@PathVariable Long[] refundDetailIds) {
// return toAjax(refundGoodsDetailService.deleteRefundGoodsDetailByRefundDetailIds(refundDetailIds));
// }
//}