feat(wms): 添加生产任务和产品规范相关功能
- 新增生产任务管理功能,包括查询、新增、修改、删除等操作- 新增产品规范组管理功能,包括查询、新增、修改、删除等操作 - 新增产品规范(键值对模式)管理功能,包括查询、新增、修改、删除等操作 - 添加相关实体类、业务对象、视图对象、Mapper接口和XML文件
This commit is contained in:
@@ -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.WmsProductSpecVo;
|
||||
import com.klp.domain.bo.WmsProductSpecBo;
|
||||
import com.klp.service.IWmsProductSpecService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产品规范(键值对模式)
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/productSpec")
|
||||
public class WmsProductSpecController extends BaseController {
|
||||
|
||||
private final IWmsProductSpecService iWmsProductSpecService;
|
||||
|
||||
/**
|
||||
* 查询产品规范(键值对模式)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsProductSpecVo> list(WmsProductSpecBo bo, PageQuery pageQuery) {
|
||||
return iWmsProductSpecService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品规范(键值对模式)列表
|
||||
*/
|
||||
@Log(title = "产品规范(键值对模式)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsProductSpecBo bo, HttpServletResponse response) {
|
||||
List<WmsProductSpecVo> list = iWmsProductSpecService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品规范(键值对模式)", WmsProductSpecVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品规范(键值对模式)详细信息
|
||||
*
|
||||
* @param specId 主键
|
||||
*/
|
||||
@GetMapping("/{specId}")
|
||||
public R<WmsProductSpecVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long specId) {
|
||||
return R.ok(iWmsProductSpecService.queryById(specId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品规范(键值对模式)
|
||||
*/
|
||||
@Log(title = "产品规范(键值对模式)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsProductSpecBo bo) {
|
||||
return toAjax(iWmsProductSpecService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品规范(键值对模式)
|
||||
*/
|
||||
@Log(title = "产品规范(键值对模式)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsProductSpecBo bo) {
|
||||
return toAjax(iWmsProductSpecService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品规范(键值对模式)
|
||||
*
|
||||
* @param specIds 主键串
|
||||
*/
|
||||
@Log(title = "产品规范(键值对模式)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{specIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] specIds) {
|
||||
return toAjax(iWmsProductSpecService.deleteWithValidByIds(Arrays.asList(specIds), 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.WmsProductSpecGroupVo;
|
||||
import com.klp.domain.bo.WmsProductSpecGroupBo;
|
||||
import com.klp.service.IWmsProductSpecGroupService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产品规范组
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/productSpecGroup")
|
||||
public class WmsProductSpecGroupController extends BaseController {
|
||||
|
||||
private final IWmsProductSpecGroupService iWmsProductSpecGroupService;
|
||||
|
||||
/**
|
||||
* 查询产品规范组列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsProductSpecGroupVo> list(WmsProductSpecGroupBo bo, PageQuery pageQuery) {
|
||||
return iWmsProductSpecGroupService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品规范组列表
|
||||
*/
|
||||
@Log(title = "产品规范组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsProductSpecGroupBo bo, HttpServletResponse response) {
|
||||
List<WmsProductSpecGroupVo> list = iWmsProductSpecGroupService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品规范组", WmsProductSpecGroupVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品规范组详细信息
|
||||
*
|
||||
* @param groupId 主键
|
||||
*/
|
||||
@GetMapping("/{groupId}")
|
||||
public R<WmsProductSpecGroupVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long groupId) {
|
||||
return R.ok(iWmsProductSpecGroupService.queryById(groupId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品规范组
|
||||
*/
|
||||
@Log(title = "产品规范组", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsProductSpecGroupBo bo) {
|
||||
return toAjax(iWmsProductSpecGroupService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品规范组
|
||||
*/
|
||||
@Log(title = "产品规范组", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsProductSpecGroupBo bo) {
|
||||
return toAjax(iWmsProductSpecGroupService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品规范组
|
||||
*
|
||||
* @param groupIds 主键串
|
||||
*/
|
||||
@Log(title = "产品规范组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{groupIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] groupIds) {
|
||||
return toAjax(iWmsProductSpecGroupService.deleteWithValidByIds(Arrays.asList(groupIds), 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.WmsProductionTaskVo;
|
||||
import com.klp.domain.bo.WmsProductionTaskBo;
|
||||
import com.klp.service.IWmsProductionTaskService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产任务
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/klp/productionTask")
|
||||
public class WmsProductionTaskController extends BaseController {
|
||||
|
||||
private final IWmsProductionTaskService iWmsProductionTaskService;
|
||||
|
||||
/**
|
||||
* 查询生产任务列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsProductionTaskVo> list(WmsProductionTaskBo bo, PageQuery pageQuery) {
|
||||
return iWmsProductionTaskService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产任务列表
|
||||
*/
|
||||
@Log(title = "生产任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsProductionTaskBo bo, HttpServletResponse response) {
|
||||
List<WmsProductionTaskVo> list = iWmsProductionTaskService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "生产任务", WmsProductionTaskVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产任务详细信息
|
||||
*
|
||||
* @param taskId 主键
|
||||
*/
|
||||
@GetMapping("/{taskId}")
|
||||
public R<WmsProductionTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long taskId) {
|
||||
return R.ok(iWmsProductionTaskService.queryById(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产任务
|
||||
*/
|
||||
@Log(title = "生产任务", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsProductionTaskBo bo) {
|
||||
return toAjax(iWmsProductionTaskService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产任务
|
||||
*/
|
||||
@Log(title = "生产任务", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsProductionTaskBo bo) {
|
||||
return toAjax(iWmsProductionTaskService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产任务
|
||||
*
|
||||
* @param taskIds 主键串
|
||||
*/
|
||||
@Log(title = "生产任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] taskIds) {
|
||||
return toAjax(iWmsProductionTaskService.deleteWithValidByIds(Arrays.asList(taskIds), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user