领料单退料单

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

View File

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