feat(wms): 新增发货计划钢卷操作记录和明细管理模块

- 新增发货计划钢卷操作记录实体类、业务对象及视图对象
- 新增发货计划明细实体类、业务对象及视图对象
- 实现发货计划钢卷操作记录的增删改查接口及导出功能
- 实现发货计划明细的增删改查接口及导出功能
- 新增钢卷操作记录查询接口,支持根据计划ID和钢卷ID列表获取最新操作记录
- 完成对应Mapper接口和XML映射文件的配置
- 集成基础校验和逻辑删除功能
- 提供钢卷操作记录与钢卷明细信息的联合查询能力
This commit is contained in:
2025-12-17 13:58:04 +08:00
parent faac750ff6
commit b02fb8025a
16 changed files with 1029 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
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.WmsDeliveryPlanCoilOperateVo;
import com.klp.domain.bo.WmsDeliveryPlanCoilOperateBo;
import com.klp.service.IWmsDeliveryPlanCoilOperateService;
import com.klp.common.core.page.TableDataInfo;
/**
* 发货计划钢卷操作记录
*
* @author klp
* @date 2025-12-17
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/wms/deliveryPlanCoilOperate")
public class WmsDeliveryPlanCoilOperateController extends BaseController {
private final IWmsDeliveryPlanCoilOperateService iWmsDeliveryPlanCoilOperateService;
/**
* 查询发货计划钢卷操作记录列表
*/
@GetMapping("/list")
public TableDataInfo<WmsDeliveryPlanCoilOperateVo> list(WmsDeliveryPlanCoilOperateBo bo, PageQuery pageQuery) {
return iWmsDeliveryPlanCoilOperateService.queryPageList(bo, pageQuery);
}
/**
* 导出发货计划钢卷操作记录列表
*/
@Log(title = "发货计划钢卷操作记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(WmsDeliveryPlanCoilOperateBo bo, HttpServletResponse response) {
List<WmsDeliveryPlanCoilOperateVo> list = iWmsDeliveryPlanCoilOperateService.queryList(bo);
ExcelUtil.exportExcel(list, "发货计划钢卷操作记录", WmsDeliveryPlanCoilOperateVo.class, response);
}
/**
* 获取发货计划钢卷操作记录详细信息
*
* @param operateId 主键
*/
@GetMapping("/{operateId}")
public R<WmsDeliveryPlanCoilOperateVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long operateId) {
return R.ok(iWmsDeliveryPlanCoilOperateService.queryById(operateId));
}
/**
* 新增发货计划钢卷操作记录
*/
@Log(title = "发货计划钢卷操作记录", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsDeliveryPlanCoilOperateBo bo) {
return toAjax(iWmsDeliveryPlanCoilOperateService.insertByBo(bo));
}
/**
* 修改发货计划钢卷操作记录
*/
@Log(title = "发货计划钢卷操作记录", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsDeliveryPlanCoilOperateBo bo) {
return toAjax(iWmsDeliveryPlanCoilOperateService.updateByBo(bo));
}
/**
* 删除发货计划钢卷操作记录
*
* @param operateIds 主键串
*/
@Log(title = "发货计划钢卷操作记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{operateIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] operateIds) {
return toAjax(iWmsDeliveryPlanCoilOperateService.deleteWithValidByIds(Arrays.asList(operateIds), true));
}
//新增一个接口用来查询钢卷列表信息以及操作内容 参数分别是planId和coilIds(逗号分隔得字符串) get请求
@GetMapping("/coilOperate")
public R<List<WmsDeliveryPlanCoilOperateVo>> getCoilOperate(@RequestParam @NotNull(message = "planId不能为空") Long planId,
@RequestParam @NotNull(message = "coilIds不能为空") String coilIds) {
List<WmsDeliveryPlanCoilOperateVo> list = iWmsDeliveryPlanCoilOperateService.getCoilOperate(planId, coilIds);
return R.ok(list);
}
}

View File

@@ -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.WmsDeliveryPlanDetailVo;
import com.klp.domain.bo.WmsDeliveryPlanDetailBo;
import com.klp.service.IWmsDeliveryPlanDetailService;
import com.klp.common.core.page.TableDataInfo;
/**
* 发货计划明细
*
* @author klp
* @date 2025-12-17
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/wms/deliveryPlanDetail")
public class WmsDeliveryPlanDetailController extends BaseController {
private final IWmsDeliveryPlanDetailService iWmsDeliveryPlanDetailService;
/**
* 查询发货计划明细列表
*/
@GetMapping("/list")
public TableDataInfo<WmsDeliveryPlanDetailVo> list(WmsDeliveryPlanDetailBo bo, PageQuery pageQuery) {
return iWmsDeliveryPlanDetailService.queryPageList(bo, pageQuery);
}
/**
* 导出发货计划明细列表
*/
@Log(title = "发货计划明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(WmsDeliveryPlanDetailBo bo, HttpServletResponse response) {
List<WmsDeliveryPlanDetailVo> list = iWmsDeliveryPlanDetailService.queryList(bo);
ExcelUtil.exportExcel(list, "发货计划明细", WmsDeliveryPlanDetailVo.class, response);
}
/**
* 获取发货计划明细详细信息
*
* @param detailId 主键
*/
@GetMapping("/{detailId}")
public R<WmsDeliveryPlanDetailVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long detailId) {
return R.ok(iWmsDeliveryPlanDetailService.queryById(detailId));
}
/**
* 新增发货计划明细
*/
@Log(title = "发货计划明细", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsDeliveryPlanDetailBo bo) {
return toAjax(iWmsDeliveryPlanDetailService.insertByBo(bo));
}
/**
* 修改发货计划明细
*/
@Log(title = "发货计划明细", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsDeliveryPlanDetailBo bo) {
return toAjax(iWmsDeliveryPlanDetailService.updateByBo(bo));
}
/**
* 删除发货计划明细
*
* @param detailIds 主键串
*/
@Log(title = "发货计划明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{detailIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] detailIds) {
return toAjax(iWmsDeliveryPlanDetailService.deleteWithValidByIds(Arrays.asList(detailIds), true));
}
}