2025-12-17 13:58:04 +08:00
|
|
|
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")
|
2025-12-17 15:44:03 +08:00
|
|
|
public R<List<WmsDeliveryPlanCoilOperateVo>> getCoilOperate(@RequestParam(required = false) Long planId,
|
|
|
|
|
@RequestParam(required = false) String coilIds) {
|
2025-12-17 13:58:04 +08:00
|
|
|
List<WmsDeliveryPlanCoilOperateVo> list = iWmsDeliveryPlanCoilOperateService.getCoilOperate(planId, coilIds);
|
|
|
|
|
return R.ok(list);
|
|
|
|
|
}
|
|
|
|
|
}
|