feat(wms): 增加redis连接超时时间
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
package com.klp.erp.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.erp.domain.vo.ErpPurchaseOrderVo;
|
||||
import com.klp.erp.domain.bo.ErpPurchaseOrderBo;
|
||||
import com.klp.erp.service.IErpPurchaseOrderService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购订单主
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/erp/purchaseOrder")
|
||||
public class ErpPurchaseOrderController extends BaseController {
|
||||
|
||||
private final IErpPurchaseOrderService iErpPurchaseOrderService;
|
||||
|
||||
/**
|
||||
* 查询采购订单主列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ErpPurchaseOrderVo> list(ErpPurchaseOrderBo bo, PageQuery pageQuery) {
|
||||
return iErpPurchaseOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购订单主列表
|
||||
*/
|
||||
@Log(title = "采购订单主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ErpPurchaseOrderBo bo, HttpServletResponse response) {
|
||||
List<ErpPurchaseOrderVo> list = iErpPurchaseOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "采购订单主", ErpPurchaseOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购订单主详细信息
|
||||
*
|
||||
* @param orderId 主键
|
||||
*/
|
||||
@GetMapping("/{orderId}")
|
||||
public R<ErpPurchaseOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long orderId) {
|
||||
return R.ok(iErpPurchaseOrderService.queryById(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单主
|
||||
*/
|
||||
@Log(title = "采购订单主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ErpPurchaseOrderBo bo) {
|
||||
return toAjax(iErpPurchaseOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单主
|
||||
*/
|
||||
@Log(title = "采购订单主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ErpPurchaseOrderBo bo) {
|
||||
return toAjax(iErpPurchaseOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单主
|
||||
*
|
||||
* @param orderIds 主键串
|
||||
*/
|
||||
@Log(title = "采购订单主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] orderIds) {
|
||||
return toAjax(iErpPurchaseOrderService.deleteWithValidByIds(Arrays.asList(orderIds), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user