master
parent
3f3c0ffbd4
commit
6de83a8c98
@ -0,0 +1,117 @@
|
||||
package org.dromara.wms.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.wms.domain.vo.WmsBaseLocationVo;
|
||||
import org.dromara.wms.domain.bo.WmsBaseLocationBo;
|
||||
import org.dromara.wms.service.IWmsBaseLocationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库位基础信息
|
||||
* 前端访问路由地址为:/wms/baseLocation
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/baseLocation")
|
||||
public class WmsBaseLocationController extends BaseController {
|
||||
|
||||
private final IWmsBaseLocationService wmsBaseLocationService;
|
||||
|
||||
/**
|
||||
* 查询库位基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsBaseLocationVo> list(WmsBaseLocationBo bo, PageQuery pageQuery) {
|
||||
return wmsBaseLocationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库位基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:export")
|
||||
@Log(title = "库位基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsBaseLocationBo bo, HttpServletResponse response) {
|
||||
List<WmsBaseLocationVo> list = wmsBaseLocationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "库位基础信息", WmsBaseLocationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库位基础信息详细信息
|
||||
*
|
||||
* @param locationId 主键
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:query")
|
||||
@GetMapping("/{locationId}")
|
||||
public R<WmsBaseLocationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long locationId) {
|
||||
return R.ok(wmsBaseLocationService.queryById(locationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库位基础信息
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:add")
|
||||
@Log(title = "库位基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsBaseLocationBo bo) {
|
||||
return toAjax(wmsBaseLocationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库位基础信息
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:edit")
|
||||
@Log(title = "库位基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsBaseLocationBo bo) {
|
||||
return toAjax(wmsBaseLocationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库位基础信息
|
||||
*
|
||||
* @param locationIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("wms:baseLocation:remove")
|
||||
@Log(title = "库位基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{locationIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] locationIds) {
|
||||
return toAjax(wmsBaseLocationService.deleteWithValidByIds(List.of(locationIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询库位基础信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("getWmsBaseLocationList")
|
||||
public R<List<WmsBaseLocationVo>> getWmsBaseLocationlist(WmsBaseLocationBo bo) {
|
||||
List<WmsBaseLocationVo> list = wmsBaseLocationService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package org.dromara.wms.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.wms.domain.vo.WmsBaseWarehouseVo;
|
||||
import org.dromara.wms.domain.bo.WmsBaseWarehouseBo;
|
||||
import org.dromara.wms.service.IWmsBaseWarehouseService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 仓库基础信息
|
||||
* 前端访问路由地址为:/wms/baseWarehouse
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/baseWarehouse")
|
||||
public class WmsBaseWarehouseController extends BaseController {
|
||||
|
||||
private final IWmsBaseWarehouseService wmsBaseWarehouseService;
|
||||
|
||||
/**
|
||||
* 查询仓库基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsBaseWarehouseVo> list(WmsBaseWarehouseBo bo, PageQuery pageQuery) {
|
||||
return wmsBaseWarehouseService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出仓库基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:export")
|
||||
@Log(title = "仓库基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsBaseWarehouseBo bo, HttpServletResponse response) {
|
||||
List<WmsBaseWarehouseVo> list = wmsBaseWarehouseService.queryList(bo);
|
||||
// System.out.println(list.get(0).getWorkshopName());
|
||||
ExcelUtil.exportExcel(list, "仓库基础信息", WmsBaseWarehouseVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仓库基础信息详细信息
|
||||
*
|
||||
* @param warehouseId 主键
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:query")
|
||||
@GetMapping("/{warehouseId}")
|
||||
public R<WmsBaseWarehouseVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long warehouseId) {
|
||||
return R.ok(wmsBaseWarehouseService.queryById(warehouseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仓库基础信息
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:add")
|
||||
@Log(title = "仓库基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsBaseWarehouseBo bo) {
|
||||
return toAjax(wmsBaseWarehouseService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库基础信息
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:edit")
|
||||
@Log(title = "仓库基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsBaseWarehouseBo bo) {
|
||||
return toAjax(wmsBaseWarehouseService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仓库基础信息
|
||||
*
|
||||
* @param warehouseIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("wms:baseWarehouse:remove")
|
||||
@Log(title = "仓库基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{warehouseIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] warehouseIds) {
|
||||
return toAjax(wmsBaseWarehouseService.deleteWithValidByIds(List.of(warehouseIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询仓库基础信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("getWmsBaseWarehouseList")
|
||||
public R<List<WmsBaseWarehouseVo>> getWmsBaseWarehouselist(WmsBaseWarehouseBo bo) {
|
||||
List<WmsBaseWarehouseVo> list = wmsBaseWarehouseService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.wms.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.wms.domain.vo.WmsInstockRecordVo;
|
||||
import org.dromara.wms.domain.bo.WmsInstockRecordBo;
|
||||
import org.dromara.wms.service.IWmsInstockRecordService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库记录
|
||||
* 前端访问路由地址为:/wms/instockRecord
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/instockRecord")
|
||||
public class WmsInstockRecordController extends BaseController {
|
||||
|
||||
private final IWmsInstockRecordService wmsInstockRecordService;
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsInstockRecordVo> list(WmsInstockRecordBo bo, PageQuery pageQuery) {
|
||||
return wmsInstockRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库记录列表
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:export")
|
||||
@Log(title = "入库记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsInstockRecordBo bo, HttpServletResponse response) {
|
||||
List<WmsInstockRecordVo> list = wmsInstockRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "入库记录", WmsInstockRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库记录详细信息
|
||||
*
|
||||
* @param instockRecordId 主键
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:query")
|
||||
@GetMapping("/{instockRecordId}")
|
||||
public R<WmsInstockRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long instockRecordId) {
|
||||
return R.ok(wmsInstockRecordService.queryById(instockRecordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:add")
|
||||
@Log(title = "入库记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsInstockRecordBo bo) {
|
||||
return toAjax(wmsInstockRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:edit")
|
||||
@Log(title = "入库记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsInstockRecordBo bo) {
|
||||
return toAjax(wmsInstockRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库记录
|
||||
*
|
||||
* @param instockRecordIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("wms:instockRecord:remove")
|
||||
@Log(title = "入库记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{instockRecordIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] instockRecordIds) {
|
||||
return toAjax(wmsInstockRecordService.deleteWithValidByIds(List.of(instockRecordIds), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.wms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 车间信息对象 prod_base_workshop_info
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("prod_base_workshop_info")
|
||||
public class ProdBaseWorkshopInfo1 extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 车间ID
|
||||
*/
|
||||
@TableId(value = "workshop_id", type = IdType.AUTO)
|
||||
private Long workshopId;
|
||||
|
||||
/**
|
||||
* 车间编号
|
||||
*/
|
||||
private String workshopCode;
|
||||
|
||||
/**
|
||||
* 车间名称
|
||||
*/
|
||||
private String workshopName;
|
||||
|
||||
/**
|
||||
* 所属工厂
|
||||
*/
|
||||
private Long factoryId;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String factoryName;//字段映射
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.dromara.wms.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 库位基础信息对象 wms_base_location
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_base_location")
|
||||
public class WmsBaseLocation extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 表主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO,value = "location_id")
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 所属仓库
|
||||
*/
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
private Long lineNum;
|
||||
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
private Long layerNum;
|
||||
|
||||
/**
|
||||
* 位
|
||||
*/
|
||||
private Long locationNum;
|
||||
@TableField(exist = false)
|
||||
private String warehouseCode;
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String warehouseName;
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package org.dromara.wms.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 仓库基础信息对象 wms_base_warehouse
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_base_warehouse")
|
||||
public class WmsBaseWarehouse extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 表主键
|
||||
*/
|
||||
@TableId(value = "warehouse_id", type = IdType.AUTO)
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
private String warehouseCode;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String warehouseName;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* 仓库位置
|
||||
*/
|
||||
private String warehouseLocation;
|
||||
|
||||
/**
|
||||
* 关联车间
|
||||
*/
|
||||
private Long workshopId;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
private String warehouseType;
|
||||
@TableField(exist = false)
|
||||
private String workshopName;//字段映射
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package org.dromara.wms.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 入库记录对象 wms_instock_record
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_instock_record")
|
||||
public class WmsInstockRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 入库记录主键
|
||||
*/
|
||||
@TableId(value = "instock_record_id", type = IdType.AUTO)
|
||||
private Long instockRecordId;
|
||||
|
||||
/**
|
||||
* 入库单 主键
|
||||
*/
|
||||
// private Long instockId;
|
||||
|
||||
/**
|
||||
* 入库单号
|
||||
*/
|
||||
private String instockCode;
|
||||
|
||||
/**
|
||||
* 批次码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
private Double instockQty;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* erp同步状态
|
||||
*/
|
||||
private String erpSynchronousStatus;
|
||||
|
||||
/**
|
||||
* erp同步数量
|
||||
*/
|
||||
private Double erpSynchronousQty;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package org.dromara.wms.domain.bo;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseLocation;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 库位基础信息业务对象 wms_base_location
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = WmsBaseLocation.class, reverseConvertGenerate = false)
|
||||
public class WmsBaseLocationBo extends BaseEntity {
|
||||
private Long locationId;
|
||||
/**
|
||||
* 所属仓库
|
||||
*/
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
private Long lineNum;
|
||||
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
private Long layerNum;
|
||||
|
||||
/**
|
||||
* 位
|
||||
*/
|
||||
private Long locationNum;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package org.dromara.wms.domain.bo;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 仓库基础信息业务对象 wms_base_warehouse
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = WmsBaseWarehouse.class, reverseConvertGenerate = false)
|
||||
public class WmsBaseWarehouseBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 表主键
|
||||
*/
|
||||
// @NotNull(message = "表主键不能为空", groups = { AddGroup.class })
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
@NotBlank(message = "仓库编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String warehouseCode;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@NotBlank(message = "仓库名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String warehouseName;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
@NotBlank(message = "物料大类不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* 仓库位置
|
||||
*/
|
||||
// @NotBlank(message = "仓库位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String warehouseLocation;
|
||||
|
||||
/**
|
||||
* 关联车间
|
||||
*/
|
||||
@NotNull(message = "关联车间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long workshopId;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
@NotBlank(message = "仓库类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String warehouseType;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package org.dromara.wms.domain.bo;
|
||||
|
||||
import org.dromara.wms.domain.WmsInstockRecord;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 入库记录业务对象 wms_instock_record
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = WmsInstockRecord.class, reverseConvertGenerate = false)
|
||||
public class WmsInstockRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 入库单号
|
||||
*/
|
||||
private String instockCode;
|
||||
|
||||
/**
|
||||
* 批次码
|
||||
*/
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
private Double instockQty;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* erp同步状态
|
||||
*/
|
||||
@NotBlank(message = "erp同步状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String erpSynchronousStatus;
|
||||
|
||||
/**
|
||||
* erp同步数量
|
||||
*/
|
||||
@NotNull(message = "erp同步数量不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Double erpSynchronousQty;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package org.dromara.wms.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import org.dromara.wms.domain.ProdBaseWorkshopInfo1;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 车间信息视图对象 prod_base_workshop_info
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-02
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ProdBaseWorkshopInfo1.class)
|
||||
public class ProdBaseWorkshopInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 车间ID
|
||||
*/
|
||||
@ExcelProperty(value = "车间ID")
|
||||
private Long workshopId;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@ExcelProperty(value = "租户编号")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 车间编号
|
||||
*/
|
||||
@ExcelProperty(value = "车间编号")
|
||||
private String workshopCode;
|
||||
|
||||
/**
|
||||
* 车间名称
|
||||
*/
|
||||
@ExcelProperty(value = "车间名称")
|
||||
private String workshopName;
|
||||
|
||||
/**
|
||||
* 所属工厂ID
|
||||
*/
|
||||
@ExcelProperty(value = "所属工厂ID")
|
||||
private Long factoryId;
|
||||
|
||||
/**
|
||||
* 所属工厂名称
|
||||
*/
|
||||
@ExcelProperty(value = "所属工厂名称")
|
||||
private String factoryName;
|
||||
|
||||
/**
|
||||
* 激活标识(1是 0否)
|
||||
*/
|
||||
@ExcelProperty(value = "激活标识")
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
@ExcelProperty(value = "创建部门")
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ExcelProperty(value = "创建人")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ExcelProperty(value = "更新人")
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package org.dromara.wms.domain.vo;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseLocation;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 库位基础信息视图对象 wms_base_location
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = WmsBaseLocation.class)
|
||||
public class WmsBaseLocationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 表主键
|
||||
*/
|
||||
@ExcelProperty(value = "表主键")
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 所属仓库
|
||||
*/
|
||||
@ExcelProperty(value = "所属仓库")
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
@ExcelProperty(value = "库位编码")
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
@ExcelProperty(value = "排")
|
||||
private Long lineNum;
|
||||
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
@ExcelProperty(value = "层")
|
||||
private Long layerNum;
|
||||
|
||||
/**
|
||||
* 位
|
||||
*/
|
||||
@ExcelProperty(value = "位")
|
||||
private Long locationNum;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
private String warehouseCode;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String warehouseName;
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package org.dromara.wms.domain.vo;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 仓库基础信息视图对象 wms_base_warehouse
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = WmsBaseWarehouse.class)
|
||||
public class WmsBaseWarehouseVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 表主键
|
||||
*/
|
||||
@ExcelProperty(value = "表主键")
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
@ExcelProperty(value = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@ExcelProperty(value = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
@ExcelProperty(value = "物料大类", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "material_mategories")
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* 仓库位置
|
||||
*/
|
||||
@ExcelProperty(value = "仓库位置")
|
||||
private String warehouseLocation;
|
||||
|
||||
/**
|
||||
* 关联车间
|
||||
*/
|
||||
@ExcelProperty(value = "关联车间")
|
||||
private Long workshopId;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
@ExcelProperty(value = "仓库类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wms_wharehouse_type")
|
||||
private String warehouseType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ExcelProperty(value = "创建人")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ExcelProperty(value = "更新人")
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
private String workshopName;//字段映射
|
||||
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.wms.domain.vo;
|
||||
|
||||
import org.dromara.wms.domain.WmsInstockRecord;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 入库记录视图对象 wms_instock_record
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = WmsInstockRecord.class)
|
||||
public class WmsInstockRecordVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 入库单号
|
||||
*/
|
||||
@ExcelProperty(value = "入库单号")
|
||||
private String instockCode;
|
||||
|
||||
/**
|
||||
* 批次码
|
||||
*/
|
||||
@ExcelProperty(value = "批次码")
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
@ExcelProperty(value = "物料id")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
@ExcelProperty(value = "仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
@ExcelProperty(value = "库位编码")
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@ExcelProperty(value = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@ExcelProperty(value = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
@ExcelProperty(value = "入库数量")
|
||||
private Double instockQty;
|
||||
|
||||
/**
|
||||
* 物料大类
|
||||
*/
|
||||
@ExcelProperty(value = "物料大类")
|
||||
private String materialCategories;
|
||||
|
||||
/**
|
||||
* 入库人
|
||||
*/
|
||||
@ExcelProperty(value = "入库人")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 入库时间
|
||||
*/
|
||||
@ExcelProperty(value = "入库时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* erp同步状态
|
||||
*/
|
||||
@ExcelProperty(value = "erp同步状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_common_status")
|
||||
private String erpSynchronousStatus;
|
||||
|
||||
/**
|
||||
* erp同步数量
|
||||
*/
|
||||
@ExcelProperty(value = "erp同步数量")
|
||||
private Double erpSynchronousQty;
|
||||
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
@ExcelProperty(value = "同步时间")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.wms.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.wms.domain.ProdBaseWorkshopInfo1;
|
||||
import org.dromara.wms.domain.vo.ProdBaseWorkshopInfoVo;
|
||||
|
||||
/**
|
||||
* 车间信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-02
|
||||
*/
|
||||
public interface ProdBaseWorkshopInfoMapper extends BaseMapperPlus<ProdBaseWorkshopInfo1, ProdBaseWorkshopInfoVo> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.wms.mapper;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseLocation;
|
||||
import org.dromara.wms.domain.vo.WmsBaseLocationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 库位基础信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface WmsBaseLocationMapper extends BaseMapperPlus<WmsBaseLocation, WmsBaseLocationVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.wms.mapper;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import org.dromara.wms.domain.vo.WmsBaseWarehouseVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 仓库基础信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
public interface WmsBaseWarehouseMapper extends BaseMapperPlus<WmsBaseWarehouse, WmsBaseWarehouseVo> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package org.dromara.wms.mapper;
|
||||
|
||||
import org.dromara.wms.domain.WmsInstockRecord;
|
||||
import org.dromara.wms.domain.vo.WmsInstockRecordVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* 入库记录Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
public interface WmsInstockRecordMapper extends BaseMapperPlus<WmsInstockRecord, WmsInstockRecordVo> {
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.wms.service;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseLocation;
|
||||
import org.dromara.wms.domain.vo.WmsBaseLocationVo;
|
||||
import org.dromara.wms.domain.bo.WmsBaseLocationBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库位基础信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
public interface IWmsBaseLocationService {
|
||||
|
||||
/**
|
||||
* 查询库位基础信息
|
||||
*
|
||||
* @param locationId 主键
|
||||
* @return 库位基础信息
|
||||
*/
|
||||
WmsBaseLocationVo queryById(Long locationId);
|
||||
|
||||
/**
|
||||
* 分页查询库位基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 库位基础信息分页列表
|
||||
*/
|
||||
TableDataInfo<WmsBaseLocationVo> queryPageList(WmsBaseLocationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的库位基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 库位基础信息列表
|
||||
*/
|
||||
List<WmsBaseLocationVo> queryList(WmsBaseLocationBo bo);
|
||||
|
||||
/**
|
||||
* 新增库位基础信息
|
||||
*
|
||||
* @param bo 库位基础信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(WmsBaseLocationBo bo);
|
||||
|
||||
/**
|
||||
* 修改库位基础信息
|
||||
*
|
||||
* @param bo 库位基础信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(WmsBaseLocationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除库位基础信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.wms.service;
|
||||
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import org.dromara.wms.domain.vo.WmsBaseWarehouseVo;
|
||||
import org.dromara.wms.domain.bo.WmsBaseWarehouseBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库基础信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
public interface IWmsBaseWarehouseService {
|
||||
|
||||
/**
|
||||
* 查询仓库基础信息
|
||||
*
|
||||
* @param warehouseId 主键
|
||||
* @return 仓库基础信息
|
||||
*/
|
||||
WmsBaseWarehouseVo queryById(Long warehouseId);
|
||||
|
||||
/**
|
||||
* 分页查询仓库基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 仓库基础信息分页列表
|
||||
*/
|
||||
TableDataInfo<WmsBaseWarehouseVo> queryPageList(WmsBaseWarehouseBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的仓库基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 仓库基础信息列表
|
||||
*/
|
||||
List<WmsBaseWarehouseVo> queryList(WmsBaseWarehouseBo bo);
|
||||
|
||||
/**
|
||||
* 新增仓库基础信息
|
||||
*
|
||||
* @param bo 仓库基础信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(WmsBaseWarehouseBo bo);
|
||||
|
||||
/**
|
||||
* 修改仓库基础信息
|
||||
*
|
||||
* @param bo 仓库基础信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(WmsBaseWarehouseBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除仓库基础信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.wms.service;
|
||||
|
||||
import org.dromara.wms.domain.WmsInstockRecord;
|
||||
import org.dromara.wms.domain.vo.WmsInstockRecordVo;
|
||||
import org.dromara.wms.domain.bo.WmsInstockRecordBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库记录Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
public interface IWmsInstockRecordService {
|
||||
|
||||
/**
|
||||
* 查询入库记录
|
||||
*
|
||||
* @param instockRecordId 主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
WmsInstockRecordVo queryById(Long instockRecordId);
|
||||
|
||||
/**
|
||||
* 分页查询入库记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 入库记录分页列表
|
||||
*/
|
||||
TableDataInfo<WmsInstockRecordVo> queryPageList(WmsInstockRecordBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的入库记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 入库记录列表
|
||||
*/
|
||||
List<WmsInstockRecordVo> queryList(WmsInstockRecordBo bo);
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*
|
||||
* @param bo 入库记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(WmsInstockRecordBo bo);
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*
|
||||
* @param bo 入库记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(WmsInstockRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除入库记录信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package org.dromara.wms.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.wms.domain.bo.WmsBaseLocationBo;
|
||||
import org.dromara.wms.domain.vo.WmsBaseLocationVo;
|
||||
import org.dromara.wms.domain.WmsBaseLocation;
|
||||
import org.dromara.wms.mapper.WmsBaseLocationMapper;
|
||||
import org.dromara.wms.service.IWmsBaseLocationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 库位基础信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService {
|
||||
|
||||
private final WmsBaseLocationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询库位基础信息
|
||||
*
|
||||
* @param locationId 主键
|
||||
* @return 库位基础信息
|
||||
*/
|
||||
@Override
|
||||
public WmsBaseLocationVo queryById(Long locationId){
|
||||
return baseMapper.selectVoById(locationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询库位基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 库位基础信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsBaseLocationVo> queryPageList(WmsBaseLocationBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<WmsBaseLocation> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsBaseLocationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的库位基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 库位基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsBaseLocationVo> queryList(WmsBaseLocationBo bo) {
|
||||
MPJLambdaWrapper<WmsBaseLocation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<WmsBaseLocation> buildQueryWrapper(WmsBaseLocationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<WmsBaseLocation> lqw = JoinWrappers.lambda(WmsBaseLocation.class)
|
||||
.selectAll(WmsBaseLocation.class)
|
||||
.select(WmsBaseWarehouse::getWarehouseName,WmsBaseWarehouse::getWarehouseCode)
|
||||
|
||||
.leftJoin(WmsBaseWarehouse.class,WmsBaseWarehouse::getWarehouseId,WmsBaseLocation::getWarehouseId)
|
||||
.eq(bo.getWarehouseId() != null, WmsBaseLocation::getWarehouseId, bo.getWarehouseId())
|
||||
.like(StringUtils.isNotBlank(bo.getLocationCode()), WmsBaseLocation::getLocationCode, bo.getLocationCode())
|
||||
.eq(bo.getLineNum() != null, WmsBaseLocation::getLineNum, bo.getLineNum())
|
||||
.eq(bo.getLayerNum() != null, WmsBaseLocation::getLayerNum, bo.getLayerNum())
|
||||
.orderByDesc(WmsBaseLocation::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库位基础信息
|
||||
*
|
||||
* @param bo 库位基础信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsBaseLocationBo bo) {
|
||||
WmsBaseLocation add = MapstructUtils.convert(bo, WmsBaseLocation.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setLocationId(add.getLocationId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库位基础信息
|
||||
*
|
||||
* @param bo 库位基础信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsBaseLocationBo bo) {
|
||||
WmsBaseLocation update = MapstructUtils.convert(bo, WmsBaseLocation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsBaseLocation entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除库位基础信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package org.dromara.wms.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.dromara.wms.domain.ProdBaseWorkshopInfo1;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.wms.domain.bo.WmsBaseWarehouseBo;
|
||||
import org.dromara.wms.domain.vo.WmsBaseWarehouseVo;
|
||||
import org.dromara.wms.domain.WmsBaseWarehouse;
|
||||
import org.dromara.wms.mapper.WmsBaseWarehouseMapper;
|
||||
import org.dromara.wms.service.IWmsBaseWarehouseService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 仓库基础信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsBaseWarehouseServiceImpl implements IWmsBaseWarehouseService {
|
||||
|
||||
private final WmsBaseWarehouseMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询仓库基础信息
|
||||
*
|
||||
* @param warehouseId 主键
|
||||
* @return 仓库基础信息
|
||||
*/
|
||||
@Override
|
||||
public WmsBaseWarehouseVo queryById(Long warehouseId) {
|
||||
return baseMapper.selectVoById(warehouseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询仓库基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 仓库基础信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsBaseWarehouseVo> queryPageList(WmsBaseWarehouseBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<WmsBaseWarehouse> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsBaseWarehouseVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的仓库基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 仓库基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsBaseWarehouseVo> queryList(WmsBaseWarehouseBo bo) {
|
||||
MPJLambdaWrapper<WmsBaseWarehouse> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<WmsBaseWarehouse> buildQueryWrapper(WmsBaseWarehouseBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<WmsBaseWarehouse> lqw = JoinWrappers.lambda(WmsBaseWarehouse.class)
|
||||
|
||||
.selectAll(WmsBaseWarehouse.class)
|
||||
.select(ProdBaseWorkshopInfo1::getWorkshopName)
|
||||
.leftJoin(ProdBaseWorkshopInfo1.class, ProdBaseWorkshopInfo1::getWorkshopId, WmsBaseWarehouse::getWorkshopId)
|
||||
|
||||
.eq(StringUtils.isNotBlank(bo.getWarehouseCode()), WmsBaseWarehouse::getWarehouseCode, bo.getWarehouseCode())
|
||||
.like(StringUtils.isNotBlank(bo.getWarehouseName()), WmsBaseWarehouse::getWarehouseName, bo.getWarehouseName())
|
||||
.eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsBaseWarehouse::getMaterialCategories, bo.getMaterialCategories())
|
||||
.eq(bo.getWorkshopId() != null, WmsBaseWarehouse::getWorkshopId, bo.getWorkshopId())
|
||||
.eq(StringUtils.isNotBlank(bo.getWarehouseType()), WmsBaseWarehouse::getWarehouseType, bo.getWarehouseType())
|
||||
.orderByDesc(WmsBaseWarehouse::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仓库基础信息
|
||||
*
|
||||
* @param bo 仓库基础信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsBaseWarehouseBo bo) {
|
||||
WmsBaseWarehouse add = MapstructUtils.convert(bo, WmsBaseWarehouse.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setWarehouseId(add.getWarehouseId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库基础信息
|
||||
*
|
||||
* @param bo 仓库基础信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsBaseWarehouseBo bo) {
|
||||
WmsBaseWarehouse update = MapstructUtils.convert(bo, WmsBaseWarehouse.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsBaseWarehouse entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除仓库基础信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package org.dromara.wms.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.wms.domain.bo.WmsInstockRecordBo;
|
||||
import org.dromara.wms.domain.vo.WmsInstockRecordVo;
|
||||
import org.dromara.wms.domain.WmsInstockRecord;
|
||||
import org.dromara.wms.mapper.WmsInstockRecordMapper;
|
||||
import org.dromara.wms.service.IWmsInstockRecordService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 入库记录Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-01-07
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsInstockRecordServiceImpl implements IWmsInstockRecordService {
|
||||
|
||||
private final WmsInstockRecordMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询入库记录
|
||||
*
|
||||
* @param instockRecordId 主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
@Override
|
||||
public WmsInstockRecordVo queryById(Long instockRecordId){
|
||||
return baseMapper.selectVoById(instockRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询入库记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 入库记录分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsInstockRecordVo> queryPageList(WmsInstockRecordBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<WmsInstockRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsInstockRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的入库记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 入库记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsInstockRecordVo> queryList(WmsInstockRecordBo bo) {
|
||||
MPJLambdaWrapper<WmsInstockRecord> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<WmsInstockRecord> buildQueryWrapper(WmsInstockRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<WmsInstockRecord> lqw = JoinWrappers.lambda(WmsInstockRecord.class)
|
||||
.selectAll(WmsInstockRecord.class)
|
||||
.eq(StringUtils.isNotBlank(bo.getInstockCode()), WmsInstockRecord::getInstockCode, bo.getInstockCode())
|
||||
.eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInstockRecord::getBatchCode, bo.getBatchCode())
|
||||
.eq(bo.getWarehouseId() != null, WmsInstockRecord::getWarehouseId, bo.getWarehouseId())
|
||||
.like(StringUtils.isNotBlank(bo.getLocationCode()), WmsInstockRecord::getLocationCode, bo.getLocationCode())
|
||||
.like(StringUtils.isNotBlank(bo.getMaterialCode()), WmsInstockRecord::getMaterialCode, bo.getMaterialCode())
|
||||
.like(StringUtils.isNotBlank(bo.getMaterialName()), WmsInstockRecord::getMaterialName, bo.getMaterialName())
|
||||
.eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsInstockRecord::getMaterialCategories, bo.getMaterialCategories())
|
||||
.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
WmsInstockRecord::getCreateTime ,params.get("beginCreateTime"), params.get("endCreateTime"))
|
||||
.eq(StringUtils.isNotBlank(bo.getErpSynchronousStatus()), WmsInstockRecord::getErpSynchronousStatus, bo.getErpSynchronousStatus())
|
||||
.eq(bo.getErpSynchronousQty() != null, WmsInstockRecord::getErpSynchronousQty, bo.getErpSynchronousQty())
|
||||
.orderByDesc(WmsInstockRecord::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*
|
||||
* @param bo 入库记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsInstockRecordBo bo) {
|
||||
WmsInstockRecord add = MapstructUtils.convert(bo, WmsInstockRecord.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
// if (flag) {
|
||||
// bo.setInstockRecordId(add.getInstockRecordId());
|
||||
// }
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*
|
||||
* @param bo 入库记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsInstockRecordBo bo) {
|
||||
WmsInstockRecord update = MapstructUtils.convert(bo, WmsInstockRecord.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsInstockRecord entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除入库记录信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.wms.mapper.ProdBaseWorkshopInfoMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.wms.mapper.WmsBaseLocationMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.wms.mapper.WmsBaseWarehouseMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.wms.mapper.WmsInstockRecordMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue