feat(wms): 新增发货计划、发货单主表及明细表功能模块
- 新增发货计划实体类、业务对象、控制器、服务接口及实现 - 新增发货单主表实体类、业务对象、控制器、服务接口及实现 - 新增发货单明细表实体类、业务对象、控制器、服务接口及实现 - 配置相关Mapper接口与XML映射文件 - 实现基础的增删改查及分页查询功能 - 支持Excel导出功能 - 添加基础数据校验与日志记录
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.WmsDeliveryPlanVo;
|
||||
import com.klp.domain.bo.WmsDeliveryPlanBo;
|
||||
import com.klp.service.IWmsDeliveryPlanService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 发货计划
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/deliveryPlan")
|
||||
public class WmsDeliveryPlanController extends BaseController {
|
||||
|
||||
private final IWmsDeliveryPlanService iWmsDeliveryPlanService;
|
||||
|
||||
/**
|
||||
* 查询发货计划列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsDeliveryPlanVo> list(WmsDeliveryPlanBo bo, PageQuery pageQuery) {
|
||||
return iWmsDeliveryPlanService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发货计划列表
|
||||
*/
|
||||
@Log(title = "发货计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsDeliveryPlanBo bo, HttpServletResponse response) {
|
||||
List<WmsDeliveryPlanVo> list = iWmsDeliveryPlanService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "发货计划", WmsDeliveryPlanVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发货计划详细信息
|
||||
*
|
||||
* @param planId 主键
|
||||
*/
|
||||
@GetMapping("/{planId}")
|
||||
public R<WmsDeliveryPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long planId) {
|
||||
return R.ok(iWmsDeliveryPlanService.queryById(planId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货计划
|
||||
*/
|
||||
@Log(title = "发货计划", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsDeliveryPlanBo bo) {
|
||||
return toAjax(iWmsDeliveryPlanService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货计划
|
||||
*/
|
||||
@Log(title = "发货计划", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsDeliveryPlanBo bo) {
|
||||
return toAjax(iWmsDeliveryPlanService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发货计划
|
||||
*
|
||||
* @param planIds 主键串
|
||||
*/
|
||||
@Log(title = "发货计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{planIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] planIds) {
|
||||
return toAjax(iWmsDeliveryPlanService.deleteWithValidByIds(Arrays.asList(planIds), 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.WmsDeliveryWaybillVo;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillBo;
|
||||
import com.klp.service.IWmsDeliveryWaybillService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 发货单主
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/deliveryWaybill")
|
||||
public class WmsDeliveryWaybillController extends BaseController {
|
||||
|
||||
private final IWmsDeliveryWaybillService iWmsDeliveryWaybillService;
|
||||
|
||||
/**
|
||||
* 查询发货单主列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsDeliveryWaybillVo> list(WmsDeliveryWaybillBo bo, PageQuery pageQuery) {
|
||||
return iWmsDeliveryWaybillService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发货单主列表
|
||||
*/
|
||||
@Log(title = "发货单主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsDeliveryWaybillBo bo, HttpServletResponse response) {
|
||||
List<WmsDeliveryWaybillVo> list = iWmsDeliveryWaybillService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "发货单主", WmsDeliveryWaybillVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发货单主详细信息
|
||||
*
|
||||
* @param waybillId 主键
|
||||
*/
|
||||
@GetMapping("/{waybillId}")
|
||||
public R<WmsDeliveryWaybillVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long waybillId) {
|
||||
return R.ok(iWmsDeliveryWaybillService.queryById(waybillId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货单主
|
||||
*/
|
||||
@Log(title = "发货单主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsDeliveryWaybillBo bo) {
|
||||
return toAjax(iWmsDeliveryWaybillService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货单主
|
||||
*/
|
||||
@Log(title = "发货单主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsDeliveryWaybillBo bo) {
|
||||
return toAjax(iWmsDeliveryWaybillService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发货单主
|
||||
*
|
||||
* @param waybillIds 主键串
|
||||
*/
|
||||
@Log(title = "发货单主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{waybillIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] waybillIds) {
|
||||
return toAjax(iWmsDeliveryWaybillService.deleteWithValidByIds(Arrays.asList(waybillIds), 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.WmsDeliveryWaybillDetailVo;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillDetailBo;
|
||||
import com.klp.service.IWmsDeliveryWaybillDetailService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 发货单明细
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/deliveryWaybillDetail")
|
||||
public class WmsDeliveryWaybillDetailController extends BaseController {
|
||||
|
||||
private final IWmsDeliveryWaybillDetailService iWmsDeliveryWaybillDetailService;
|
||||
|
||||
/**
|
||||
* 查询发货单明细列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsDeliveryWaybillDetailVo> list(WmsDeliveryWaybillDetailBo bo, PageQuery pageQuery) {
|
||||
return iWmsDeliveryWaybillDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发货单明细列表
|
||||
*/
|
||||
@Log(title = "发货单明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsDeliveryWaybillDetailBo bo, HttpServletResponse response) {
|
||||
List<WmsDeliveryWaybillDetailVo> list = iWmsDeliveryWaybillDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "发货单明细", WmsDeliveryWaybillDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发货单明细详细信息
|
||||
*
|
||||
* @param detailId 主键
|
||||
*/
|
||||
@GetMapping("/{detailId}")
|
||||
public R<WmsDeliveryWaybillDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long detailId) {
|
||||
return R.ok(iWmsDeliveryWaybillDetailService.queryById(detailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货单明细
|
||||
*/
|
||||
@Log(title = "发货单明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsDeliveryWaybillDetailBo bo) {
|
||||
return toAjax(iWmsDeliveryWaybillDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货单明细
|
||||
*/
|
||||
@Log(title = "发货单明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsDeliveryWaybillDetailBo bo) {
|
||||
return toAjax(iWmsDeliveryWaybillDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发货单明细
|
||||
*
|
||||
* @param detailIds 主键串
|
||||
*/
|
||||
@Log(title = "发货单明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{detailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] detailIds) {
|
||||
return toAjax(iWmsDeliveryWaybillDetailService.deleteWithValidByIds(Arrays.asList(detailIds), true));
|
||||
}
|
||||
}
|
||||
47
klp-wms/src/main/java/com/klp/domain/WmsDeliveryPlan.java
Normal file
47
klp-wms/src/main/java/com/klp/domain/WmsDeliveryPlan.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package com.klp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 发货计划对象 wms_delivery_plan
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_delivery_plan")
|
||||
public class WmsDeliveryPlan extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 计划唯一ID
|
||||
*/
|
||||
@TableId(value = "plan_id")
|
||||
private Long planId;
|
||||
/**
|
||||
* 发货计划名称(格式:YYYY-MM-DD-序号,如2025-11-25-001)
|
||||
*/
|
||||
private String planName;
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
private Date planDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
87
klp-wms/src/main/java/com/klp/domain/WmsDeliveryWaybill.java
Normal file
87
klp-wms/src/main/java/com/klp/domain/WmsDeliveryWaybill.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.klp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 发货单主对象 wms_delivery_waybill
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_delivery_waybill")
|
||||
public class WmsDeliveryWaybill extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 发货单唯一ID
|
||||
*/
|
||||
@TableId(value = "waybill_id")
|
||||
private Long waybillId;
|
||||
/**
|
||||
* 发货单编号(格式:WB-YYYYMMDD-XXXX,如WB-20251125-0001)
|
||||
*/
|
||||
private String waybillNo;
|
||||
/**
|
||||
* 发货单名称
|
||||
*/
|
||||
private String waybillName;
|
||||
/**
|
||||
* 关联发货计划ID
|
||||
*/
|
||||
private Long planId;
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
private String licensePlate;
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
private String consigneeUnit;
|
||||
/**
|
||||
* 发货单位
|
||||
*/
|
||||
private String senderUnit;
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date deliveryTime;
|
||||
/**
|
||||
* 磅房
|
||||
*/
|
||||
private String weighbridge;
|
||||
/**
|
||||
* 销售
|
||||
*/
|
||||
private String salesPerson;
|
||||
/**
|
||||
* 负责人(司机/跟单员)
|
||||
*/
|
||||
private String principal;
|
||||
/**
|
||||
* 负责人电话(手机号/固话)
|
||||
*/
|
||||
private String principalPhone;
|
||||
/**
|
||||
* 完成状态(0=待发货,1=已发货,2=已完成,3=取消)
|
||||
*/
|
||||
private Long status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.klp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 发货单明细对象 wms_delivery_waybill_detail
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_delivery_waybill_detail")
|
||||
public class WmsDeliveryWaybillDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 明细唯一ID
|
||||
*/
|
||||
@TableId(value = "detail_id")
|
||||
private Long detailId;
|
||||
/**
|
||||
* 关联发货单主表ID
|
||||
*/
|
||||
private Long waybillId;
|
||||
/**
|
||||
* 关联钢卷表ID(钢卷基础信息在钢卷表中)
|
||||
*/
|
||||
private Long coilId;
|
||||
/**
|
||||
* 品名(如:冷硬钢卷、冷轧钢卷)
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 切边(净边/毛边)
|
||||
*/
|
||||
private String edgeType;
|
||||
/**
|
||||
* 包装(裸包/简包1/精包2等)
|
||||
*/
|
||||
private String packaging;
|
||||
/**
|
||||
* 结算方式(卷重/磅重)
|
||||
*/
|
||||
private String settlementType;
|
||||
/**
|
||||
* 原料厂家
|
||||
*/
|
||||
private String rawMaterialFactory;
|
||||
/**
|
||||
* 卷号
|
||||
*/
|
||||
private String coilNo;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String specification;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 数量(件)
|
||||
*/
|
||||
private Long quantity;
|
||||
/**
|
||||
* 重量(kg)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.klp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 发货计划业务对象 wms_delivery_plan
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsDeliveryPlanBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 计划唯一ID
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 发货计划名称(格式:YYYY-MM-DD-序号,如2025-11-25-001)
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
private Date planDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.klp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 发货单主业务对象 wms_delivery_waybill
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsDeliveryWaybillBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 发货单唯一ID
|
||||
*/
|
||||
@NotNull(message = "发货单唯一ID不能为空", groups = { EditGroup.class })
|
||||
private Long waybillId;
|
||||
|
||||
/**
|
||||
* 发货单编号(格式:WB-YYYYMMDD-XXXX,如WB-20251125-0001)
|
||||
*/
|
||||
@NotBlank(message = "发货单编号(格式:WB-YYYYMMDD-XXXX,如WB-20251125-0001)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String waybillNo;
|
||||
|
||||
/**
|
||||
* 发货单名称
|
||||
*/
|
||||
@NotBlank(message = "发货单名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String waybillName;
|
||||
|
||||
/**
|
||||
* 关联发货计划ID
|
||||
*/
|
||||
@NotNull(message = "关联发货计划ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
@NotBlank(message = "车牌(支持新能源车牌)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String licensePlate;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
@NotBlank(message = "收货单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String consigneeUnit;
|
||||
|
||||
/**
|
||||
* 发货单位
|
||||
*/
|
||||
@NotBlank(message = "发货单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String senderUnit;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@NotNull(message = "发货时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date deliveryTime;
|
||||
|
||||
/**
|
||||
* 磅房
|
||||
*/
|
||||
@NotBlank(message = "磅房不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String weighbridge;
|
||||
|
||||
/**
|
||||
* 销售
|
||||
*/
|
||||
@NotBlank(message = "销售不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String salesPerson;
|
||||
|
||||
/**
|
||||
* 负责人(司机/跟单员)
|
||||
*/
|
||||
@NotBlank(message = "负责人(司机/跟单员)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String principal;
|
||||
|
||||
/**
|
||||
* 负责人电话(手机号/固话)
|
||||
*/
|
||||
@NotBlank(message = "负责人电话(手机号/固话)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String principalPhone;
|
||||
|
||||
/**
|
||||
* 完成状态(0=待发货,1=已发货,2=已完成,3=取消)
|
||||
*/
|
||||
@NotNull(message = "完成状态(0=待发货,1=已发货,2=已完成,3=取消)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.klp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 发货单明细业务对象 wms_delivery_waybill_detail
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsDeliveryWaybillDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细唯一ID
|
||||
*/
|
||||
@NotNull(message = "明细唯一ID不能为空", groups = { EditGroup.class })
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 关联发货单主表ID
|
||||
*/
|
||||
@NotNull(message = "关联发货单主表ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long waybillId;
|
||||
|
||||
/**
|
||||
* 关联钢卷表ID(钢卷基础信息在钢卷表中)
|
||||
*/
|
||||
@NotNull(message = "关联钢卷表ID(钢卷基础信息在钢卷表中)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 品名(如:冷硬钢卷、冷轧钢卷)
|
||||
*/
|
||||
@NotBlank(message = "品名(如:冷硬钢卷、冷轧钢卷)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 切边(净边/毛边)
|
||||
*/
|
||||
@NotBlank(message = "切边(净边/毛边)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String edgeType;
|
||||
|
||||
/**
|
||||
* 包装(裸包/简包1/精包2等)
|
||||
*/
|
||||
@NotBlank(message = "包装(裸包/简包1/精包2等)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String packaging;
|
||||
|
||||
/**
|
||||
* 结算方式(卷重/磅重)
|
||||
*/
|
||||
@NotBlank(message = "结算方式(卷重/磅重)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String settlementType;
|
||||
|
||||
/**
|
||||
* 原料厂家
|
||||
*/
|
||||
@NotBlank(message = "原料厂家不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String rawMaterialFactory;
|
||||
|
||||
/**
|
||||
* 卷号
|
||||
*/
|
||||
@NotBlank(message = "卷号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String coilNo;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
@NotBlank(message = "材质不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 数量(件)
|
||||
*/
|
||||
@NotNull(message = "数量(件)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 重量(kg)
|
||||
*/
|
||||
@NotNull(message = "重量(kg)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 发货计划视图对象 wms_delivery_plan
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsDeliveryPlanVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 计划唯一ID
|
||||
*/
|
||||
@ExcelProperty(value = "计划唯一ID")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 发货计划名称(格式:YYYY-MM-DD-序号,如2025-11-25-001)
|
||||
*/
|
||||
@ExcelProperty(value = "发货计划名称", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "格=式:YYYY-MM-DD-序号,如2025-11-25-001")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
@ExcelProperty(value = "计划日期")
|
||||
private Date planDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 发货单明细视图对象 wms_delivery_waybill_detail
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsDeliveryWaybillDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细唯一ID
|
||||
*/
|
||||
@ExcelProperty(value = "明细唯一ID")
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 关联发货单主表ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联发货单主表ID")
|
||||
private Long waybillId;
|
||||
|
||||
/**
|
||||
* 关联钢卷表ID(钢卷基础信息在钢卷表中)
|
||||
*/
|
||||
@ExcelProperty(value = "关联钢卷表ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "钢=卷基础信息在钢卷表中")
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 品名(如:冷硬钢卷、冷轧钢卷)
|
||||
*/
|
||||
@ExcelProperty(value = "品名", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:冷硬钢卷、冷轧钢卷")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 切边(净边/毛边)
|
||||
*/
|
||||
@ExcelProperty(value = "切边", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "净=边/毛边")
|
||||
private String edgeType;
|
||||
|
||||
/**
|
||||
* 包装(裸包/简包1/精包2等)
|
||||
*/
|
||||
@ExcelProperty(value = "包装", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "裸=包/简包1/精包2等")
|
||||
private String packaging;
|
||||
|
||||
/**
|
||||
* 结算方式(卷重/磅重)
|
||||
*/
|
||||
@ExcelProperty(value = "结算方式", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "卷=重/磅重")
|
||||
private String settlementType;
|
||||
|
||||
/**
|
||||
* 原料厂家
|
||||
*/
|
||||
@ExcelProperty(value = "原料厂家")
|
||||
private String rawMaterialFactory;
|
||||
|
||||
/**
|
||||
* 卷号
|
||||
*/
|
||||
@ExcelProperty(value = "卷号")
|
||||
private String coilNo;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
@ExcelProperty(value = "材质")
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 数量(件)
|
||||
*/
|
||||
@ExcelProperty(value = "数量", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "件=")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 重量(kg)
|
||||
*/
|
||||
@ExcelProperty(value = "重量", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "k=g")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 发货单主视图对象 wms_delivery_waybill
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsDeliveryWaybillVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 发货单唯一ID
|
||||
*/
|
||||
@ExcelProperty(value = "发货单唯一ID")
|
||||
private Long waybillId;
|
||||
|
||||
/**
|
||||
* 发货单编号(格式:WB-YYYYMMDD-XXXX,如WB-20251125-0001)
|
||||
*/
|
||||
@ExcelProperty(value = "发货单编号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "格=式:WB-YYYYMMDD-XXXX,如WB-20251125-0001")
|
||||
private String waybillNo;
|
||||
|
||||
/**
|
||||
* 发货单名称
|
||||
*/
|
||||
@ExcelProperty(value = "发货单名称")
|
||||
private String waybillName;
|
||||
|
||||
/**
|
||||
* 关联发货计划ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联发货计划ID")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
@ExcelProperty(value = "车牌", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "支=持新能源车牌")
|
||||
private String licensePlate;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
@ExcelProperty(value = "收货单位")
|
||||
private String consigneeUnit;
|
||||
|
||||
/**
|
||||
* 发货单位
|
||||
*/
|
||||
@ExcelProperty(value = "发货单位")
|
||||
private String senderUnit;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@ExcelProperty(value = "发货时间")
|
||||
private Date deliveryTime;
|
||||
|
||||
/**
|
||||
* 磅房
|
||||
*/
|
||||
@ExcelProperty(value = "磅房")
|
||||
private String weighbridge;
|
||||
|
||||
/**
|
||||
* 销售
|
||||
*/
|
||||
@ExcelProperty(value = "销售")
|
||||
private String salesPerson;
|
||||
|
||||
/**
|
||||
* 负责人(司机/跟单员)
|
||||
*/
|
||||
@ExcelProperty(value = "负责人", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "司=机/跟单员")
|
||||
private String principal;
|
||||
|
||||
/**
|
||||
* 负责人电话(手机号/固话)
|
||||
*/
|
||||
@ExcelProperty(value = "负责人电话", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "手=机号/固话")
|
||||
private String principalPhone;
|
||||
|
||||
/**
|
||||
* 完成状态(0=待发货,1=已发货,2=已完成,3=取消)
|
||||
*/
|
||||
@ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==待发货,1=已发货,2=已完成,3=取消")
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.klp.domain.WmsDeliveryPlan;
|
||||
import com.klp.domain.vo.WmsDeliveryPlanVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 发货计划Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WmsDeliveryPlanMapper extends BaseMapperPlus<WmsDeliveryPlanMapper, WmsDeliveryPlan, WmsDeliveryPlanVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.klp.domain.WmsDeliveryWaybillDetail;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillDetailVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 发货单明细Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WmsDeliveryWaybillDetailMapper extends BaseMapperPlus<WmsDeliveryWaybillDetailMapper, WmsDeliveryWaybillDetail, WmsDeliveryWaybillDetailVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.klp.domain.WmsDeliveryWaybill;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 发货单主Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WmsDeliveryWaybillMapper extends BaseMapperPlus<WmsDeliveryWaybillMapper, WmsDeliveryWaybill, WmsDeliveryWaybillVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.service;
|
||||
|
||||
import com.klp.domain.WmsDeliveryPlan;
|
||||
import com.klp.domain.vo.WmsDeliveryPlanVo;
|
||||
import com.klp.domain.bo.WmsDeliveryPlanBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货计划Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWmsDeliveryPlanService {
|
||||
|
||||
/**
|
||||
* 查询发货计划
|
||||
*/
|
||||
WmsDeliveryPlanVo queryById(Long planId);
|
||||
|
||||
/**
|
||||
* 查询发货计划列表
|
||||
*/
|
||||
TableDataInfo<WmsDeliveryPlanVo> queryPageList(WmsDeliveryPlanBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询发货计划列表
|
||||
*/
|
||||
List<WmsDeliveryPlanVo> queryList(WmsDeliveryPlanBo bo);
|
||||
|
||||
/**
|
||||
* 新增发货计划
|
||||
*/
|
||||
Boolean insertByBo(WmsDeliveryPlanBo bo);
|
||||
|
||||
/**
|
||||
* 修改发货计划
|
||||
*/
|
||||
Boolean updateByBo(WmsDeliveryPlanBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除发货计划信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.service;
|
||||
|
||||
import com.klp.domain.WmsDeliveryWaybillDetail;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillDetailVo;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillDetailBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货单明细Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWmsDeliveryWaybillDetailService {
|
||||
|
||||
/**
|
||||
* 查询发货单明细
|
||||
*/
|
||||
WmsDeliveryWaybillDetailVo queryById(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询发货单明细列表
|
||||
*/
|
||||
TableDataInfo<WmsDeliveryWaybillDetailVo> queryPageList(WmsDeliveryWaybillDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询发货单明细列表
|
||||
*/
|
||||
List<WmsDeliveryWaybillDetailVo> queryList(WmsDeliveryWaybillDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增发货单明细
|
||||
*/
|
||||
Boolean insertByBo(WmsDeliveryWaybillDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改发货单明细
|
||||
*/
|
||||
Boolean updateByBo(WmsDeliveryWaybillDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除发货单明细信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.service;
|
||||
|
||||
import com.klp.domain.WmsDeliveryWaybill;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillVo;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货单主Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWmsDeliveryWaybillService {
|
||||
|
||||
/**
|
||||
* 查询发货单主
|
||||
*/
|
||||
WmsDeliveryWaybillVo queryById(Long waybillId);
|
||||
|
||||
/**
|
||||
* 查询发货单主列表
|
||||
*/
|
||||
TableDataInfo<WmsDeliveryWaybillVo> queryPageList(WmsDeliveryWaybillBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询发货单主列表
|
||||
*/
|
||||
List<WmsDeliveryWaybillVo> queryList(WmsDeliveryWaybillBo bo);
|
||||
|
||||
/**
|
||||
* 新增发货单主
|
||||
*/
|
||||
Boolean insertByBo(WmsDeliveryWaybillBo bo);
|
||||
|
||||
/**
|
||||
* 修改发货单主
|
||||
*/
|
||||
Boolean updateByBo(WmsDeliveryWaybillBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除发货单主信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.klp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.domain.bo.WmsDeliveryPlanBo;
|
||||
import com.klp.domain.vo.WmsDeliveryPlanVo;
|
||||
import com.klp.domain.WmsDeliveryPlan;
|
||||
import com.klp.mapper.WmsDeliveryPlanMapper;
|
||||
import com.klp.service.IWmsDeliveryPlanService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 发货计划Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsDeliveryPlanServiceImpl implements IWmsDeliveryPlanService {
|
||||
|
||||
private final WmsDeliveryPlanMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询发货计划
|
||||
*/
|
||||
@Override
|
||||
public WmsDeliveryPlanVo queryById(Long planId){
|
||||
return baseMapper.selectVoById(planId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货计划列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsDeliveryPlanVo> queryPageList(WmsDeliveryPlanBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsDeliveryPlan> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsDeliveryPlanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货计划列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsDeliveryPlanVo> queryList(WmsDeliveryPlanBo bo) {
|
||||
LambdaQueryWrapper<WmsDeliveryPlan> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsDeliveryPlan> buildQueryWrapper(WmsDeliveryPlanBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsDeliveryPlan> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPlanName()), WmsDeliveryPlan::getPlanName, bo.getPlanName());
|
||||
lqw.eq(bo.getPlanDate() != null, WmsDeliveryPlan::getPlanDate, bo.getPlanDate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货计划
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsDeliveryPlanBo bo) {
|
||||
WmsDeliveryPlan add = BeanUtil.toBean(bo, WmsDeliveryPlan.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setPlanId(add.getPlanId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货计划
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsDeliveryPlanBo bo) {
|
||||
WmsDeliveryPlan update = BeanUtil.toBean(bo, WmsDeliveryPlan.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsDeliveryPlan entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除发货计划
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.klp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillDetailBo;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillDetailVo;
|
||||
import com.klp.domain.WmsDeliveryWaybillDetail;
|
||||
import com.klp.mapper.WmsDeliveryWaybillDetailMapper;
|
||||
import com.klp.service.IWmsDeliveryWaybillDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 发货单明细Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsDeliveryWaybillDetailServiceImpl implements IWmsDeliveryWaybillDetailService {
|
||||
|
||||
private final WmsDeliveryWaybillDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询发货单明细
|
||||
*/
|
||||
@Override
|
||||
public WmsDeliveryWaybillDetailVo queryById(Long detailId){
|
||||
return baseMapper.selectVoById(detailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货单明细列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsDeliveryWaybillDetailVo> queryPageList(WmsDeliveryWaybillDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybillDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsDeliveryWaybillDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货单明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsDeliveryWaybillDetailVo> queryList(WmsDeliveryWaybillDetailBo bo) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybillDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsDeliveryWaybillDetail> buildQueryWrapper(WmsDeliveryWaybillDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsDeliveryWaybillDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getWaybillId() != null, WmsDeliveryWaybillDetail::getWaybillId, bo.getWaybillId());
|
||||
lqw.eq(bo.getCoilId() != null, WmsDeliveryWaybillDetail::getCoilId, bo.getCoilId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProductName()), WmsDeliveryWaybillDetail::getProductName, bo.getProductName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEdgeType()), WmsDeliveryWaybillDetail::getEdgeType, bo.getEdgeType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPackaging()), WmsDeliveryWaybillDetail::getPackaging, bo.getPackaging());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSettlementType()), WmsDeliveryWaybillDetail::getSettlementType, bo.getSettlementType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRawMaterialFactory()), WmsDeliveryWaybillDetail::getRawMaterialFactory, bo.getRawMaterialFactory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoilNo()), WmsDeliveryWaybillDetail::getCoilNo, bo.getCoilNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), WmsDeliveryWaybillDetail::getSpecification, bo.getSpecification());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaterial()), WmsDeliveryWaybillDetail::getMaterial, bo.getMaterial());
|
||||
lqw.eq(bo.getQuantity() != null, WmsDeliveryWaybillDetail::getQuantity, bo.getQuantity());
|
||||
lqw.eq(bo.getWeight() != null, WmsDeliveryWaybillDetail::getWeight, bo.getWeight());
|
||||
lqw.eq(bo.getUnitPrice() != null, WmsDeliveryWaybillDetail::getUnitPrice, bo.getUnitPrice());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货单明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsDeliveryWaybillDetailBo bo) {
|
||||
WmsDeliveryWaybillDetail add = BeanUtil.toBean(bo, WmsDeliveryWaybillDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setDetailId(add.getDetailId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货单明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsDeliveryWaybillDetailBo bo) {
|
||||
WmsDeliveryWaybillDetail update = BeanUtil.toBean(bo, WmsDeliveryWaybillDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsDeliveryWaybillDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除发货单明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.klp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.domain.bo.WmsDeliveryWaybillBo;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillVo;
|
||||
import com.klp.domain.WmsDeliveryWaybill;
|
||||
import com.klp.mapper.WmsDeliveryWaybillMapper;
|
||||
import com.klp.service.IWmsDeliveryWaybillService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 发货单主Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsDeliveryWaybillServiceImpl implements IWmsDeliveryWaybillService {
|
||||
|
||||
private final WmsDeliveryWaybillMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询发货单主
|
||||
*/
|
||||
@Override
|
||||
public WmsDeliveryWaybillVo queryById(Long waybillId){
|
||||
return baseMapper.selectVoById(waybillId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货单主列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsDeliveryWaybillVo> queryPageList(WmsDeliveryWaybillBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsDeliveryWaybillVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发货单主列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsDeliveryWaybillVo> queryList(WmsDeliveryWaybillBo bo) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsDeliveryWaybill> buildQueryWrapper(WmsDeliveryWaybillBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsDeliveryWaybill> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWaybillNo()), WmsDeliveryWaybill::getWaybillNo, bo.getWaybillNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getWaybillName()), WmsDeliveryWaybill::getWaybillName, bo.getWaybillName());
|
||||
lqw.eq(bo.getPlanId() != null, WmsDeliveryWaybill::getPlanId, bo.getPlanId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLicensePlate()), WmsDeliveryWaybill::getLicensePlate, bo.getLicensePlate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getConsigneeUnit()), WmsDeliveryWaybill::getConsigneeUnit, bo.getConsigneeUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSenderUnit()), WmsDeliveryWaybill::getSenderUnit, bo.getSenderUnit());
|
||||
lqw.eq(bo.getDeliveryTime() != null, WmsDeliveryWaybill::getDeliveryTime, bo.getDeliveryTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWeighbridge()), WmsDeliveryWaybill::getWeighbridge, bo.getWeighbridge());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalesPerson()), WmsDeliveryWaybill::getSalesPerson, bo.getSalesPerson());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPrincipal()), WmsDeliveryWaybill::getPrincipal, bo.getPrincipal());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPrincipalPhone()), WmsDeliveryWaybill::getPrincipalPhone, bo.getPrincipalPhone());
|
||||
lqw.eq(bo.getStatus() != null, WmsDeliveryWaybill::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发货单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsDeliveryWaybillBo bo) {
|
||||
WmsDeliveryWaybill add = BeanUtil.toBean(bo, WmsDeliveryWaybill.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setWaybillId(add.getWaybillId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsDeliveryWaybillBo bo) {
|
||||
WmsDeliveryWaybill update = BeanUtil.toBean(bo, WmsDeliveryWaybill.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsDeliveryWaybill entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除发货单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user