集成wms服务模块
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package com.mhd.wms.domain.commonSettings.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 常用设置对象 common_settings
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CommonSettings extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("常用设置id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long commonSettingsId;
|
||||
|
||||
@ApiModelProperty("所属上级id")
|
||||
@Excel(name = "所属上级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("route")
|
||||
@Excel(name = "route")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty("级别 1-一级 2-二级")
|
||||
@Excel(name = "级别 1-一级 2-二级")
|
||||
private Long level;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.wms.domain.commonSettings.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.commonSettings.entity.CommonSettings;
|
||||
import com.mhd.wms.domain.commonSettings.repository.po.CommonSettingsPO;
|
||||
import com.mhd.wms.domain.commonSettings.repository.todo.CommonSettingsDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用设置Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
public interface ICommonSettingsService extends IService<CommonSettings>
|
||||
{
|
||||
/**
|
||||
* 分页查询常用设置列表
|
||||
*/
|
||||
public List<CommonSettingsPO> queryList(CommonSettingsDO commonSettingsDO);
|
||||
|
||||
/**
|
||||
* 新增常用设置
|
||||
*/
|
||||
public Boolean insert(CommonSettingsDO commonSettingsDO);
|
||||
|
||||
/**
|
||||
* 修改常用设置
|
||||
*/
|
||||
public Boolean update(CommonSettingsDO commonSettingsDO);
|
||||
|
||||
/**
|
||||
* 批量删除常用设置
|
||||
*/
|
||||
public Boolean delete(Long[] commonSettingsIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询常用设置
|
||||
*/
|
||||
public CommonSettingsPO getInfo(Long commonSettingsId);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.commonSettings.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.commonSettings.entity.CommonSettings;
|
||||
import com.mhd.wms.domain.commonSettings.repository.po.CommonSettingsPO;
|
||||
import com.mhd.wms.domain.commonSettings.repository.todo.CommonSettingsDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用设置Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
public interface CommonSettingsMapper extends BaseMapper<CommonSettings>
|
||||
{
|
||||
/**
|
||||
* 查询常用设置列表
|
||||
*/
|
||||
public List<CommonSettingsPO> queryList(CommonSettingsDO commonSettingsDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.commonSettings.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.commonSettings.entity.CommonSettings;
|
||||
import com.mhd.wms.domain.commonSettings.repository.facade.ICommonSettingsService;
|
||||
import com.mhd.wms.domain.commonSettings.repository.mapper.CommonSettingsMapper;
|
||||
import com.mhd.wms.domain.commonSettings.repository.po.CommonSettingsPO;
|
||||
import com.mhd.wms.domain.commonSettings.repository.todo.CommonSettingsDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用设置Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
@Service
|
||||
public class CommonSettingsImpl extends ServiceImpl<CommonSettingsMapper, CommonSettings> implements ICommonSettingsService{
|
||||
@Autowired
|
||||
private CommonSettingsMapper commonSettingsMapper;
|
||||
|
||||
/**
|
||||
* 查询常用设置列表
|
||||
*/
|
||||
@Override
|
||||
public List<CommonSettingsPO> queryList(CommonSettingsDO commonSettingsDO)
|
||||
{
|
||||
return commonSettingsMapper.queryList(commonSettingsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增常用设置
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(CommonSettingsDO commonSettingsDO) {
|
||||
CommonSettings commonSettings = new CommonSettings();
|
||||
BeanUtils.copyProperties(commonSettingsDO,commonSettings);
|
||||
return this.save(commonSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常用设置
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(CommonSettingsDO commonSettingsDO) {
|
||||
CommonSettings commonSettings = new CommonSettings();
|
||||
BeanUtils.copyProperties(commonSettingsDO,commonSettings);
|
||||
return this.updateById(commonSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除常用设置
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] commonSettingsIds ) {
|
||||
List<CommonSettings> list = new ArrayList<>();
|
||||
for (Long id : commonSettingsIds) {
|
||||
CommonSettings commonSettings = new CommonSettings();
|
||||
commonSettings.setCommonSettingsId(id);
|
||||
commonSettings.setDelFlag(2);
|
||||
list.add(commonSettings);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常用设置
|
||||
*/
|
||||
@Override
|
||||
public CommonSettingsPO getInfo(Long commonSettingsId) {
|
||||
CommonSettings commonSettings = this.getById(commonSettingsId);
|
||||
CommonSettingsPO commonSettingsPO = new CommonSettingsPO();
|
||||
BeanUtils.copyProperties(commonSettings,commonSettingsPO);
|
||||
return commonSettingsPO;
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.wms.domain.commonSettings.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 常用设置对象 common_settings
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "常用设置对象", description = "常用设置响应对象")
|
||||
public class CommonSettingsPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("常用设置id")
|
||||
private Long commonSettingsId;
|
||||
|
||||
@ApiModelProperty("所属上级id")
|
||||
@Excel(name = "所属上级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("route")
|
||||
@Excel(name = "route")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty("级别 1-一级 2-二级")
|
||||
@Excel(name = "级别 1-一级 2-二级")
|
||||
private Long level;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("是否设置为常用 0-否 1-是")
|
||||
@Excel(name = "是否设置为常用 0-否 1-是")
|
||||
private Integer isSettings;
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.wms.domain.commonSettings.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 常用设置对象 common_settings
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CommonSettingsDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("常用设置id")
|
||||
private Long commonSettingsId;
|
||||
|
||||
@ApiModelProperty("所属上级id")
|
||||
@Excel(name = "所属上级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("route")
|
||||
@Excel(name = "route")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty("级别 1-一级 2-二级")
|
||||
@Excel(name = "级别 1-一级 2-二级")
|
||||
private Long level;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.wms.domain.commonSettings.service;
|
||||
|
||||
import com.mhd.wms.domain.commonSettings.repository.facade.ICommonSettingsService;
|
||||
import com.mhd.wms.domain.commonSettings.repository.po.CommonSettingsPO;
|
||||
import com.mhd.wms.domain.commonSettings.repository.todo.CommonSettingsDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用设置
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-29
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CommonSettingsDomainService {
|
||||
|
||||
@Autowired
|
||||
private ICommonSettingsService commonSettingsService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询常用设置列表
|
||||
*/
|
||||
public List<CommonSettingsPO> queryList(CommonSettingsDO commonSettingsDO) {
|
||||
return commonSettingsService.queryList(commonSettingsDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增常用设置
|
||||
*/
|
||||
public Boolean insert(CommonSettingsDO commonSettingsDO) {
|
||||
|
||||
return commonSettingsService.insert(commonSettingsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常用设置
|
||||
*/
|
||||
public Boolean update(CommonSettingsDO commonSettingsDO) {
|
||||
return commonSettingsService.update(commonSettingsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除常用设置
|
||||
*/
|
||||
public Boolean delete(Long[] commonSettingsIds) {
|
||||
return commonSettingsService.delete(commonSettingsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取常用设置详细信息
|
||||
*/
|
||||
public CommonSettingsPO getInfo(Long commonSettingsId)
|
||||
{
|
||||
return commonSettingsService.getInfo(commonSettingsId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 容器使用记录对象 container_usage_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ContainerUsageRecord extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("容器容积 单位:立方米")
|
||||
@Excel(name = "容器容积 单位:立方米")
|
||||
private BigDecimal containerVolume;
|
||||
|
||||
@ApiModelProperty("记录类型: 1-占用 2-释放")
|
||||
@Excel(name = "记录类型: 1-占用 2-释放")
|
||||
private Integer useType;
|
||||
|
||||
@ApiModelProperty("使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
@Excel(name = "使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
private Integer node;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.containerUsageRecord.entity.ContainerUsageRecord;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.po.ContainerUsageRecordPO;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.todo.ContainerUsageRecordDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器使用记录Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
public interface IContainerUsageRecordService extends IService<ContainerUsageRecord>
|
||||
{
|
||||
/**
|
||||
* 分页查询容器使用记录列表
|
||||
*/
|
||||
public List<ContainerUsageRecordPO> queryList(ContainerUsageRecordDO containerUsageRecordDO);
|
||||
|
||||
/**
|
||||
* 新增容器使用记录
|
||||
*/
|
||||
public Boolean insert(ContainerUsageRecordDO containerUsageRecordDO);
|
||||
|
||||
/**
|
||||
* 修改容器使用记录
|
||||
*/
|
||||
public Boolean update(ContainerUsageRecordDO containerUsageRecordDO);
|
||||
|
||||
/**
|
||||
* 批量删除容器使用记录
|
||||
*/
|
||||
public Boolean delete(String[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询容器使用记录
|
||||
*/
|
||||
public ContainerUsageRecordPO getInfo(String id);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.containerUsageRecord.entity.ContainerUsageRecord;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.po.ContainerUsageRecordPO;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.todo.ContainerUsageRecordDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器使用记录Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
public interface ContainerUsageRecordMapper extends BaseMapper<ContainerUsageRecord>
|
||||
{
|
||||
/**
|
||||
* 查询容器使用记录列表
|
||||
*/
|
||||
public List<ContainerUsageRecordPO> queryList(ContainerUsageRecordDO containerUsageRecordDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.containerUsageRecord.entity.ContainerUsageRecord;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.facade.IContainerUsageRecordService;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.mapper.ContainerUsageRecordMapper;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.po.ContainerUsageRecordPO;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.todo.ContainerUsageRecordDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器使用记录Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Service
|
||||
public class ContainerUsageRecordImpl extends ServiceImpl<ContainerUsageRecordMapper, ContainerUsageRecord> implements IContainerUsageRecordService {
|
||||
@Autowired
|
||||
private ContainerUsageRecordMapper containerUsageRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询容器使用记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<ContainerUsageRecordPO> queryList(ContainerUsageRecordDO containerUsageRecordDO)
|
||||
{
|
||||
return containerUsageRecordMapper.queryList(containerUsageRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器使用记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ContainerUsageRecordDO containerUsageRecordDO) {
|
||||
ContainerUsageRecord containerUsageRecord = new ContainerUsageRecord();
|
||||
BeanUtils.copyProperties(containerUsageRecordDO,containerUsageRecord);
|
||||
return this.save(containerUsageRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器使用记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ContainerUsageRecordDO containerUsageRecordDO) {
|
||||
ContainerUsageRecord containerUsageRecord = new ContainerUsageRecord();
|
||||
BeanUtils.copyProperties(containerUsageRecordDO,containerUsageRecord);
|
||||
return this.updateById(containerUsageRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器使用记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(String[] ids ) {
|
||||
List<ContainerUsageRecord> list = new ArrayList<>();
|
||||
for (String id : ids) {
|
||||
ContainerUsageRecord containerUsageRecord = new ContainerUsageRecord();
|
||||
containerUsageRecord.setId(id);
|
||||
containerUsageRecord.setDelFlag(2);
|
||||
list.add(containerUsageRecord);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器使用记录
|
||||
*/
|
||||
@Override
|
||||
public ContainerUsageRecordPO getInfo(String id) {
|
||||
ContainerUsageRecord containerUsageRecord = this.getById(id);
|
||||
ContainerUsageRecordPO containerUsageRecordPO = new ContainerUsageRecordPO();
|
||||
BeanUtils.copyProperties(containerUsageRecord,containerUsageRecordPO);
|
||||
return containerUsageRecordPO;
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 容器使用记录对象 container_usage_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "容器使用记录对象", description = "容器使用记录响应对象")
|
||||
public class ContainerUsageRecordPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("容器容积 单位:立方米")
|
||||
@Excel(name = "容器容积 单位:立方米")
|
||||
private BigDecimal containerVolume;
|
||||
|
||||
@ApiModelProperty("记录类型: 1-占用 2-释放")
|
||||
@Excel(name = "记录类型: 1-占用 2-释放")
|
||||
private Integer useType;
|
||||
|
||||
@ApiModelProperty("使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
@Excel(name = "使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
private Integer node;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 容器使用记录对象 container_usage_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ContainerUsageRecordDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("容器容积 单位:立方米")
|
||||
@Excel(name = "容器容积 单位:立方米")
|
||||
private BigDecimal containerVolume;
|
||||
|
||||
@ApiModelProperty("记录类型: 1-占用 2-释放")
|
||||
@Excel(name = "记录类型: 1-占用 2-释放")
|
||||
private Integer useType;
|
||||
|
||||
@ApiModelProperty("使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
@Excel(name = "使用节点: 1-收货 2-上架 3-拣货 4-出库")
|
||||
private Integer node;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.wms.domain.containerUsageRecord.service;
|
||||
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.facade.IContainerUsageRecordService;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.po.ContainerUsageRecordPO;
|
||||
import com.mhd.wms.domain.containerUsageRecord.repository.todo.ContainerUsageRecordDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器使用记录
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-08-22
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ContainerUsageRecordDomainService {
|
||||
|
||||
@Autowired
|
||||
private IContainerUsageRecordService containerUsageRecordService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询容器使用记录列表
|
||||
*/
|
||||
public List<ContainerUsageRecordPO> queryList(ContainerUsageRecordDO containerUsageRecordDO) {
|
||||
return containerUsageRecordService.queryList(containerUsageRecordDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增容器使用记录
|
||||
*/
|
||||
public Boolean insert(ContainerUsageRecordDO containerUsageRecordDO) {
|
||||
|
||||
return containerUsageRecordService.insert(containerUsageRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器使用记录
|
||||
*/
|
||||
public Boolean update(ContainerUsageRecordDO containerUsageRecordDO) {
|
||||
return containerUsageRecordService.update(containerUsageRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器使用记录
|
||||
*/
|
||||
public Boolean delete(String[] ids) {
|
||||
return containerUsageRecordService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取容器使用记录详细信息
|
||||
*/
|
||||
public ContainerUsageRecordPO getInfo(String id)
|
||||
{
|
||||
return containerUsageRecordService.getInfo(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.mhd.wms.domain.deliveTask.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 下发任务对象 delive_task
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DeliveTask extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long deliverTaskId;
|
||||
|
||||
@ApiModelProperty("任务单号")
|
||||
@Excel(name = "任务单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
@Excel(name = "任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
private Integer taskType;
|
||||
|
||||
@ApiModelProperty("任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
@Excel(name = "任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("是否下发 0-否 1-是")
|
||||
@Excel(name = "是否下发 0-否 1-是")
|
||||
private Integer taskDistribution;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date taskDistributionTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
@Excel(name = "下发人id")
|
||||
private Long taskDistributionId;
|
||||
|
||||
@ApiModelProperty("下发人名称")
|
||||
@Excel(name = "下发人名称")
|
||||
private String taskDistributionName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("重新指派时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "重新指派时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date reassignTime;
|
||||
|
||||
@ApiModelProperty("重新指派人id")
|
||||
@Excel(name = "重新指派人id")
|
||||
private Long reassignById;
|
||||
|
||||
@ApiModelProperty("重新指派人")
|
||||
@Excel(name = "重新指派人")
|
||||
private String reassignByName;
|
||||
|
||||
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.mhd.wms.domain.deliveTask.factorys;
|
||||
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.aliyun.oss.common.utils.CaseInsensitiveMap;
|
||||
import com.mhd.wms.domain.deliveTask.repository.facade.IDeliveTaskTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title WaveOrderFactory
|
||||
* @description: 生成波次单规则类型工厂
|
||||
* @date 2024/6/4 11:12
|
||||
**/
|
||||
@Service
|
||||
public class DeliveTaskServiceFactory {
|
||||
|
||||
@Autowired
|
||||
private Map<String, IDeliveTaskTypeService> deliveTaskTypeServiceMap = new CaseInsensitiveMap<>();
|
||||
|
||||
/**
|
||||
* @description 获取对应的服务
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/4 11:14
|
||||
* @param taskType
|
||||
* @return IWaveOrderTypeService
|
||||
*/
|
||||
public IDeliveTaskTypeService getDeliveTaskTypeService(Integer taskType) {
|
||||
String deliveTaskType = "";
|
||||
//任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点
|
||||
switch (taskType){
|
||||
case 1:
|
||||
deliveTaskType = "stockReceiptOrderImpl";
|
||||
break;
|
||||
case 2:
|
||||
deliveTaskType = "stockShelfOrderImpl";
|
||||
break;
|
||||
case 3:
|
||||
deliveTaskType = "stockOutTaskOrderImpl";
|
||||
break;
|
||||
case 4:
|
||||
deliveTaskType = "stockOutOrderImpl";
|
||||
break;
|
||||
case 5:
|
||||
deliveTaskType = "shiftManageImpl";
|
||||
break;
|
||||
case 6:
|
||||
deliveTaskType = "investigationManageImpl";
|
||||
break;
|
||||
default:
|
||||
throw new ServiceException("任务类型不存在");
|
||||
}
|
||||
return deliveTaskTypeServiceMap.get(deliveTaskType);
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.deliveTask.entity.DeliveTask;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskSumPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下发任务Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
public interface IDeliveTaskService extends IService<DeliveTask>
|
||||
{
|
||||
/**
|
||||
* 分页查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryList(DeliveTaskDO deliveTaskDO);
|
||||
/**
|
||||
* 分页查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryListApp(DeliveTaskDO deliveTaskDO);
|
||||
|
||||
|
||||
/**
|
||||
* 批量 新增下发任务
|
||||
*/
|
||||
public Boolean batchInsert(List<DeliveTaskDO> deliveTaskDOList);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除下发任务
|
||||
*/
|
||||
public Boolean delete(Long[] deliverTaskIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询下发任务
|
||||
*/
|
||||
public DeliveTaskPO getInfo(Long deliverTaskId);
|
||||
|
||||
/**
|
||||
* 工作台查询
|
||||
*/
|
||||
public DeliveTaskSumPO workbenchQuery();
|
||||
|
||||
public int receive(Long deliverTaskId);
|
||||
|
||||
public int refuse(Long deliverTaskId);
|
||||
|
||||
/**
|
||||
* 查询列表表头数量
|
||||
*/
|
||||
public DeliveTaskPO querySum(DeliveTaskDO deliveTaskDO);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.facade;
|
||||
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title IWaveOrderType
|
||||
* @description: 任务下发
|
||||
* @date 2024/6/4 10:42
|
||||
**/
|
||||
public interface IDeliveTaskTypeService {
|
||||
|
||||
/**
|
||||
* @description 更新订单任务下发状态
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/4 10:43
|
||||
* @param deliveTaskDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean handleDeliveTask(DeliveTaskDO deliveTaskDO);
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.deliveTask.entity.DeliveTask;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskSumPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下发任务Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
public interface DeliveTaskMapper extends BaseMapper<DeliveTask>
|
||||
{
|
||||
/**
|
||||
* 查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryList(DeliveTaskDO deliveTaskDO);
|
||||
|
||||
public DeliveTaskSumPO workbenchQuery(@Param("operatorsBy") Long userid);
|
||||
|
||||
/**
|
||||
* 查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryListApp(DeliveTaskDO deliveTaskDO);
|
||||
/**
|
||||
* 修改任务状态
|
||||
*/
|
||||
@Update("update delive_task set task_status=#{taskStatus} where deliver_task_id=#{deliverTaskId}")
|
||||
public int receive(@Param("deliverTaskId") Long deliverTaskId, @Param("taskStatus") Integer taskStatus);
|
||||
|
||||
|
||||
/**
|
||||
* 修改作业人员
|
||||
*/
|
||||
@Update("update delive_task set operators_by=#{operatorsBy},operators_name=#{operatorsName} where deliver_task_id=#{deliverTaskId}")
|
||||
public int updateOperatorsBy(@Param("deliverTaskId") Long deliverTaskId, @Param("operatorsBy") Long operatorsBy, @Param("operatorsName") String operatorsName);
|
||||
|
||||
/**
|
||||
* 查询下发任务列表
|
||||
*/
|
||||
public DeliveTaskPO querySum(DeliveTaskDO deliveTaskDO);
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.domain.dto.NoticeMessageLoggingDto;
|
||||
import com.mhd.common.core.enums.MessageTypeEnum;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.deliveTask.entity.DeliveTask;
|
||||
import com.mhd.wms.domain.deliveTask.repository.facade.IDeliveTaskService;
|
||||
import com.mhd.wms.domain.deliveTask.repository.mapper.DeliveTaskMapper;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskSumPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下发任务Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
@Service
|
||||
public class DeliveTaskImpl extends ServiceImpl<DeliveTaskMapper, DeliveTask> implements IDeliveTaskService{
|
||||
@Autowired
|
||||
private DeliveTaskMapper deliveTaskMapper;
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
/**
|
||||
* 查询下发任务列表
|
||||
*/
|
||||
@Override
|
||||
public List<DeliveTaskPO> queryList(DeliveTaskDO deliveTaskDO)
|
||||
{
|
||||
return deliveTaskMapper.queryList(deliveTaskDO);
|
||||
}
|
||||
/**
|
||||
* 查询下发任务列表
|
||||
*/
|
||||
@Override
|
||||
public List<DeliveTaskPO> queryListApp(DeliveTaskDO deliveTaskDO)
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if(null!=deliveTaskDO.getTabType()&&deliveTaskDO.getTabType()==1){
|
||||
deliveTaskDO.setOperatorsBy(loginUser.getUserid());
|
||||
}else{
|
||||
|
||||
}
|
||||
return deliveTaskMapper.queryListApp(deliveTaskDO);
|
||||
}
|
||||
/**
|
||||
* 新增下发任务
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchInsert(List<DeliveTaskDO> deliveTaskDOList) {
|
||||
List<DeliveTask> deliveTaskList = new ArrayList<>();
|
||||
List<NoticeMessageLoggingDto> noticeMessageLoggingDtoList = new ArrayList<>();
|
||||
for (DeliveTaskDO deliveTaskDO : deliveTaskDOList){
|
||||
DeliveTask deliveTask = new DeliveTask();
|
||||
BeanUtils.copyProperties(deliveTaskDO,deliveTask);
|
||||
deliveTaskList.add(deliveTask);
|
||||
NoticeMessageLoggingDto noticeMessageLoggingDto = new NoticeMessageLoggingDto();
|
||||
noticeMessageLoggingDto.setUserId(deliveTaskDO.getOperatorsBy());
|
||||
noticeMessageLoggingDto.setUserName(deliveTaskDO.getOperatorsName());
|
||||
noticeMessageLoggingDto.setNoticeMessageType(MessageTypeEnum.system_notifications.getCode());
|
||||
noticeMessageLoggingDto.setNoticeMessageName(MessageTypeEnum.system_notifications.getInfo());
|
||||
noticeMessageLoggingDto.setNoticeMessageTitle("任务下发通知");
|
||||
noticeMessageLoggingDto.setMessageReadStatus(2);
|
||||
String text="";
|
||||
if(deliveTaskDO.getTaskType()==1){
|
||||
text="有一个指派给您的收货任务,请尽快处理";
|
||||
}else if(deliveTaskDO.getTaskType()==2){
|
||||
text="有一个指派给您的上架任务,请尽快处理";
|
||||
}else if(deliveTaskDO.getTaskType()==3){
|
||||
text="有一个指派给您的拣货任务,请尽快处理";
|
||||
}else if(deliveTaskDO.getTaskType()==4){
|
||||
text="有一个指派给您的复盘任务,请尽快处理";
|
||||
}else if(deliveTaskDO.getTaskType()==5){
|
||||
text="有一个指派给您的移位任务,请尽快处理";
|
||||
}else if(deliveTaskDO.getTaskType()==6){
|
||||
text="有一个指派给您的盘点任务,请尽快处理";
|
||||
}
|
||||
noticeMessageLoggingDto.setMessagePushTime(new Date());
|
||||
noticeMessageLoggingDto.setMessageSource(2);
|
||||
noticeMessageLoggingDto.setTopOrganizationId(deliveTaskDO.getTopOrganizationId());
|
||||
noticeMessageLoggingDto.setWaybillNumber(deliveTaskDO.getTrackingNumber());
|
||||
noticeMessageLoggingDto.setDataSourceSystem(3);
|
||||
noticeMessageLoggingDto.setDelFlag(1);
|
||||
noticeMessageLoggingDto.setJumpPage(0);
|
||||
noticeMessageLoggingDto.setNoticeMessageContent(text);
|
||||
noticeMessageLoggingDto.setCreateBy(deliveTaskDO.getCreateBy());
|
||||
noticeMessageLoggingDto.setCreateByName(deliveTaskDO.getCreateByName());
|
||||
noticeMessageLoggingDto.setCreateTime(new Date());
|
||||
noticeMessageLoggingDto.setMessagePushTime(new Date());
|
||||
noticeMessageLoggingDtoList.add(noticeMessageLoggingDto);
|
||||
}
|
||||
saveBatch(deliveTaskList);
|
||||
NoticeMessageLoggingDto noticeMessageLogging = new NoticeMessageLoggingDto();
|
||||
noticeMessageLogging.setNoticeList(noticeMessageLoggingDtoList);
|
||||
AjaxResult ajaxResult= systemServiceFeign.addMessageLoggingList(noticeMessageLogging);
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("保存消息信息失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除下发任务
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] deliverTaskIds ) {
|
||||
List<DeliveTask> list = new ArrayList<>();
|
||||
for (Long id : deliverTaskIds) {
|
||||
DeliveTask deliveTask = new DeliveTask();
|
||||
deliveTask.setDeliverTaskId(id);
|
||||
deliveTask.setDelFlag(2);
|
||||
list.add(deliveTask);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改下发任务
|
||||
*/
|
||||
@Override
|
||||
public DeliveTaskPO getInfo(Long deliverTaskId) {
|
||||
DeliveTask deliveTask = this.getById(deliverTaskId);
|
||||
DeliveTaskPO deliveTaskPO = new DeliveTaskPO();
|
||||
BeanUtils.copyProperties(deliveTask,deliveTaskPO);
|
||||
return deliveTaskPO;
|
||||
}
|
||||
/**
|
||||
* 工作台查询
|
||||
*/
|
||||
@Override
|
||||
public DeliveTaskSumPO workbenchQuery() {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
return deliveTaskMapper.workbenchQuery(loginUser.getUserid());
|
||||
}
|
||||
/**
|
||||
* 接收操作
|
||||
*/
|
||||
@Override
|
||||
public int receive(Long deliverTaskId) {
|
||||
return deliveTaskMapper.receive(deliverTaskId,1);
|
||||
}
|
||||
/**
|
||||
* 拒绝操作
|
||||
*/
|
||||
@Override
|
||||
public int refuse(Long deliverTaskId) {
|
||||
int update=deliveTaskMapper.receive(deliverTaskId,2);
|
||||
if(update==1){
|
||||
deliveTaskMapper.updateOperatorsBy(deliverTaskId, Long.valueOf("0"),"");
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeliveTaskPO querySum(DeliveTaskDO deliveTaskDO) {
|
||||
return deliveTaskMapper.querySum(deliveTaskDO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 下发任务对象 delive_task
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "下发任务对象", description = "下发任务响应对象")
|
||||
public class DeliveTaskPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private Long deliverTaskId;
|
||||
|
||||
@ApiModelProperty("任务单号")
|
||||
@Excel(name = "任务单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
@Excel(name = "任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
private Integer taskType;
|
||||
|
||||
@ApiModelProperty("任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
@Excel(name = "任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("是否下发 0-否 1-是")
|
||||
@Excel(name = "是否下发 0-否 1-是")
|
||||
private Integer taskDistribution;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date taskDistributionTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
@Excel(name = "下发人id")
|
||||
private Long taskDistributionId;
|
||||
|
||||
@ApiModelProperty("下发人名称")
|
||||
@Excel(name = "下发人名称")
|
||||
private String taskDistributionName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("重新指派时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "重新指派时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date reassignTime;
|
||||
|
||||
@ApiModelProperty("重新指派人id")
|
||||
@Excel(name = "重新指派人id")
|
||||
private Long reassignById;
|
||||
|
||||
@ApiModelProperty("重新指派人")
|
||||
@Excel(name = "重新指派人")
|
||||
private String reassignByName;
|
||||
|
||||
@ApiModelProperty("是否下发 0-否 1-是")
|
||||
@Excel(name = "是否下发 0-否 1-是")
|
||||
private Integer designateSum;
|
||||
|
||||
@ApiModelProperty("是否下发 0-否 1-是")
|
||||
@Excel(name = "是否下发 0-否 1-是")
|
||||
private Integer taskSum;
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.po;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 下发任务对象 delive_task
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "下发任务对象", description = "下发任务响应对象")
|
||||
public class DeliveTaskSumPO {
|
||||
|
||||
@ApiModelProperty("待收货数量")
|
||||
private Integer receivedQuantity;
|
||||
|
||||
@ApiModelProperty("待上架数量")
|
||||
private Integer listingQuantity;
|
||||
|
||||
@ApiModelProperty("待拣货数量")
|
||||
private Integer pickQuantity;
|
||||
|
||||
@ApiModelProperty("待复核数量")
|
||||
private Integer recheckQuantity;
|
||||
|
||||
@ApiModelProperty("待移位数量")
|
||||
private Integer displacementQuantity;
|
||||
|
||||
@ApiModelProperty("待盘点数量")
|
||||
private Integer stockQuantity;
|
||||
|
||||
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.mhd.wms.domain.deliveTask.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 下发任务对象 delive_task
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DeliveTaskDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private Long deliverTaskId;
|
||||
|
||||
@ApiModelProperty("任务单号")
|
||||
@Excel(name = "任务单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
@Excel(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
@Excel(name = "任务类型 0-无 1-收货 2-上架 3-拣货 4-复核 5-移位 6-盘点")
|
||||
private Integer taskType;
|
||||
|
||||
@ApiModelProperty("任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
@Excel(name = "任务状态 0-未接收 1-已接收 2-已拒绝 3-已完成 4-已关闭")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("是否下发 0-否 1-是")
|
||||
@Excel(name = "是否下发 0-否 1-是")
|
||||
private Integer taskDistribution;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date taskDistributionTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
@Excel(name = "下发人id")
|
||||
private Long taskDistributionId;
|
||||
|
||||
@ApiModelProperty("下发人名称")
|
||||
@Excel(name = "下发人名称")
|
||||
private String taskDistributionName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("重新指派时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Excel(name = "重新指派时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date reassignTime;
|
||||
|
||||
@ApiModelProperty("重新指派人id")
|
||||
@Excel(name = "重新指派人id")
|
||||
private Long reassignById;
|
||||
|
||||
@ApiModelProperty("重新指派人")
|
||||
@Excel(name = "重新指派人")
|
||||
private String reassignByName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("查询类型 1-指派给我的 2-任务")
|
||||
@Excel(name = "查询类型 1-指派给我的 2-任务")
|
||||
private Long tabType;
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.mhd.wms.domain.deliveTask.service;
|
||||
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.wms.domain.deliveTask.entity.DeliveTask;
|
||||
import com.mhd.wms.domain.deliveTask.factorys.DeliveTaskServiceFactory;
|
||||
import com.mhd.wms.domain.deliveTask.repository.facade.IDeliveTaskService;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskSumPO;
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下发任务
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DeliveTaskDomainService {
|
||||
|
||||
@Autowired
|
||||
private IDeliveTaskService deliveTaskService;
|
||||
@Autowired
|
||||
private DeliveTaskServiceFactory deliveTaskServiceFactory;
|
||||
|
||||
/**
|
||||
* 分页查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryList(DeliveTaskDO deliveTaskDO) {
|
||||
return deliveTaskService.queryList(deliveTaskDO);
|
||||
}
|
||||
/**
|
||||
* 分页查询下发任务列表
|
||||
*/
|
||||
public List<DeliveTaskPO> queryListApp(DeliveTaskDO deliveTaskDO) {
|
||||
return deliveTaskService.queryListApp(deliveTaskDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量 新增下发任务
|
||||
*/
|
||||
public Boolean batchInsert(List<DeliveTaskDO> deliveTaskDOList) {
|
||||
return deliveTaskService.batchInsert(deliveTaskDOList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除下发任务
|
||||
*/
|
||||
public Boolean delete(Long[] deliverTaskIds) {
|
||||
return deliveTaskService.delete(deliverTaskIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下发任务详细信息
|
||||
*/
|
||||
public DeliveTaskPO getInfo(Long deliverTaskId)
|
||||
{
|
||||
return deliveTaskService.getInfo(deliverTaskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工作台查询
|
||||
*/
|
||||
public DeliveTaskSumPO workbenchQuery()
|
||||
{
|
||||
return deliveTaskService.workbenchQuery();
|
||||
}
|
||||
/**
|
||||
* 接收操作
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int receive(Long deliverTaskId) {
|
||||
DeliveTask deliveTask = deliveTaskService.getById(deliverTaskId);
|
||||
if (deliveTask == null){
|
||||
throw new ServiceException("任务不存在");
|
||||
}
|
||||
if (deliveTask.getTaskStatus() > 0){
|
||||
throw new ServiceException("任务已处理,请勿重复处理");
|
||||
}
|
||||
int count = deliveTaskService.receive(deliverTaskId);
|
||||
if (count == 0) {
|
||||
throw new ServiceException("接受任务失败");
|
||||
}
|
||||
DeliveTaskDO deliveTaskDO = new DeliveTaskDO();
|
||||
deliveTaskDO.setTrackingNumber(deliveTask.getTrackingNumber());
|
||||
deliveTaskDO.setOperatorsBy(deliveTask.getOperatorsBy());
|
||||
deliveTaskDO.setOperatorsName(deliveTask.getOperatorsName());
|
||||
deliveTaskServiceFactory.getDeliveTaskTypeService(deliveTask.getTaskType()).handleDeliveTask(deliveTaskDO);
|
||||
return count;
|
||||
}
|
||||
/**
|
||||
* 拒绝操作
|
||||
*/
|
||||
public int refuse(Long deliverTaskId) {
|
||||
DeliveTask deliveTask = deliveTaskService.getById(deliverTaskId);
|
||||
if (deliveTask == null){
|
||||
throw new ServiceException("任务不存在");
|
||||
}
|
||||
if (deliveTask.getTaskStatus() > 0){
|
||||
throw new ServiceException("任务已处理,请勿重复处理");
|
||||
}
|
||||
return deliveTaskService.refuse(deliverTaskId);
|
||||
}
|
||||
/**
|
||||
* 查询列表表头数量
|
||||
*/
|
||||
public DeliveTaskPO querySum(DeliveTaskDO deliveTaskDO) {
|
||||
return deliveTaskService.querySum(deliveTaskDO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.mhd.wms.domain.differentManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.entity.InvestigetionManageDetail;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 差异单对象 different_manage
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DifferentManage extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("差异管理id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long differentManageId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("差异单号")
|
||||
@Excel(name = "差异单号")
|
||||
private String differentNumber;
|
||||
|
||||
@ApiModelProperty("盘点单号")
|
||||
@Excel(name = "盘点单号")
|
||||
private String investigationNumber;
|
||||
|
||||
@ApiModelProperty("盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
@Excel(name = "盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
private Integer investigationStatus;
|
||||
|
||||
@ApiModelProperty("盘点范围")
|
||||
@Excel(name = "盘点范围")
|
||||
private String investigationRange;
|
||||
|
||||
@ApiModelProperty("盘点方式:1.明盘 2.盲盘")
|
||||
@Excel(name = "盘点方式:1.明盘 2.盲盘")
|
||||
private Integer investigationType;
|
||||
|
||||
@ApiModelProperty("盘点方法:1.静态盘点 2.动态盘点")
|
||||
@Excel(name = "盘点方法:1.静态盘点 2.动态盘点")
|
||||
private Integer investigationMethod;
|
||||
|
||||
@ApiModelProperty("盘点轮次:1.初盘 2.复盘")
|
||||
@Excel(name = "盘点轮次:1.初盘 2.复盘")
|
||||
private Integer investigationFrequency;
|
||||
|
||||
@ApiModelProperty("监盘人ID")
|
||||
@Excel(name = "监盘人ID")
|
||||
private Long investigationManBy;
|
||||
|
||||
@ApiModelProperty("监盘人姓名")
|
||||
@Excel(name = "监盘人姓名")
|
||||
private String investigationManName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("是否作废: 1-是 2-否")
|
||||
@Excel(name = "是否作废: 1-是 2-否")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("是否过账: 1-是 2-否")
|
||||
@Excel(name = "是否过账: 1-是 2-否")
|
||||
private Integer postedFlag;
|
||||
|
||||
@ApiModelProperty("是否重盘: 1-是 2-否")
|
||||
@Excel(name = "是否重盘: 1-是 2-否")
|
||||
private Integer reCountedFlag;
|
||||
|
||||
@ApiModelProperty("盘点详情")
|
||||
@TableField(exist = false)
|
||||
private List<InvestigetionManageDetail> investigetionManageDetailList;
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.wms.domain.differentManage.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.differentManage.entity.DifferentManage;
|
||||
import com.mhd.wms.domain.differentManage.repository.po.DifferentManagePO;
|
||||
import com.mhd.wms.domain.differentManage.repository.todo.DifferentManageDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 差异单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
public interface IDifferentManageService extends IService<DifferentManage>
|
||||
{
|
||||
/**
|
||||
* 分页查询差异单列表
|
||||
*/
|
||||
public List<DifferentManagePO> queryList(DifferentManageDO differentManageDO);
|
||||
|
||||
/**
|
||||
* 新增差异单
|
||||
*/
|
||||
public Boolean insert(DifferentManageDO differentManageDO);
|
||||
|
||||
/**
|
||||
* 修改差异单
|
||||
*/
|
||||
public Boolean update(DifferentManageDO differentManageDO);
|
||||
|
||||
/**
|
||||
* 批量删除差异单
|
||||
*/
|
||||
public Boolean delete(Long[] differentManageIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询差异单
|
||||
*/
|
||||
public DifferentManagePO getInfo(Long differentManageId);
|
||||
|
||||
/**
|
||||
* 重盘生成新的差异单
|
||||
*/
|
||||
public Boolean resetDifferent(DifferentManageDO differentManageDO);
|
||||
|
||||
/**
|
||||
* 差异过账
|
||||
*/
|
||||
public Boolean differentRollback(DifferentManageDO differentManageDO);
|
||||
|
||||
public DifferentManagePO getDifferentManageDO(Long differentManageId);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.differentManage.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.differentManage.entity.DifferentManage;
|
||||
import com.mhd.wms.domain.differentManage.repository.po.DifferentManagePO;
|
||||
import com.mhd.wms.domain.differentManage.repository.todo.DifferentManageDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 差异单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
public interface DifferentManageMapper extends BaseMapper<DifferentManage>
|
||||
{
|
||||
/**
|
||||
* 查询差异单列表
|
||||
*/
|
||||
public List<DifferentManagePO> queryList(DifferentManageDO differentManageDO);
|
||||
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
package com.mhd.wms.domain.differentManage.repository.persistence;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.differentManage.entity.DifferentManage;
|
||||
import com.mhd.wms.domain.differentManage.repository.facade.IDifferentManageService;
|
||||
import com.mhd.wms.domain.differentManage.repository.mapper.DifferentManageMapper;
|
||||
import com.mhd.wms.domain.differentManage.repository.po.DifferentManagePO;
|
||||
import com.mhd.wms.domain.differentManage.repository.todo.DifferentManageDO;
|
||||
import com.mhd.wms.domain.investigationManage.entity.InvestigationManage;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.entity.InvestigetionManageDetail;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.repository.mapper.InvestigetionManageDetailMapper;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.repository.todo.InvestigetionManageDetailDO;
|
||||
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
|
||||
import com.mhd.wms.domain.materialInventory.repository.mapper.MaterialInventoryMapper;
|
||||
import com.mhd.wms.domain.materialInventory.repository.todo.MaterialInventoryDO;
|
||||
import com.mhd.wms.enums.StatusInvestigationEnum;
|
||||
import com.mhd.wms.util.UtilloginUserAssemble;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 差异单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
@Service
|
||||
public class DifferentManageImpl extends ServiceImpl<DifferentManageMapper, DifferentManage> implements IDifferentManageService {
|
||||
@Autowired
|
||||
private DifferentManageMapper differentManageMapper;
|
||||
|
||||
@Autowired
|
||||
private com.mhd.wms.domain.investigationManage.repository.mapper.InvestigationManageMapper investigationManageMapper;
|
||||
|
||||
@Autowired
|
||||
private InvestigetionManageDetailMapper investigetionManageDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private com.mhd.wms.domain.investigationManage.repository.mapper.InvestigationManageMapper InvestigationManageMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialInventoryMapper materialInventoryMapper;
|
||||
|
||||
/**
|
||||
* 查询差异单列表
|
||||
*/
|
||||
@Override
|
||||
public List<DifferentManagePO> queryList(DifferentManageDO differentManageDO) {
|
||||
return differentManageMapper.queryList(differentManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增差异单
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(DifferentManageDO differentManageDO) {
|
||||
DifferentManage differentManage = new DifferentManage();
|
||||
BeanUtils.copyProperties(differentManageDO, differentManage);
|
||||
return this.save(differentManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改差异单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(DifferentManageDO differentManageDO) {
|
||||
DifferentManage differentManage = new DifferentManage();
|
||||
BeanUtils.copyProperties(differentManageDO, differentManage);
|
||||
return this.updateById(differentManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除差异单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] differentManageIds) {
|
||||
List<DifferentManage> list = new ArrayList<>();
|
||||
for (Long id : differentManageIds) {
|
||||
DifferentManage differentManage = new DifferentManage();
|
||||
differentManage.setDifferentManageId(id);
|
||||
differentManage.setDelFlag(2);
|
||||
list.add(differentManage);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改差异单
|
||||
*/
|
||||
@Override
|
||||
public DifferentManagePO getInfo(Long differentManageId) {
|
||||
DifferentManage differentManage = this.getById(differentManageId);
|
||||
DifferentManagePO differentManagePO = new DifferentManagePO();
|
||||
BeanUtils.copyProperties(differentManage, differentManagePO);
|
||||
return differentManagePO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean resetDifferent(DifferentManageDO differentManageDO) {
|
||||
// 生成新的盘点单
|
||||
// 查询差异单
|
||||
DifferentManage differentManage = differentManageMapper.selectById(differentManageDO.getDifferentManageId());
|
||||
if(null == differentManage){
|
||||
throw new ServiceException("抱歉,没有找到此差异单信息!");
|
||||
}
|
||||
//盘点单号
|
||||
String investigationNumber = differentManage.getInvestigationNumber();
|
||||
//查询原盘点单信息
|
||||
InvestigationManage investigationManage = investigationManageMapper.selectOne(new QueryWrapper<InvestigationManage>().lambda().eq(InvestigationManage::getInvestigationNumber, investigationNumber));
|
||||
if(null == investigationManage){
|
||||
throw new ServiceException("抱歉,没有找到此差异单关联的盘点单信息!");
|
||||
}
|
||||
//新的盘点单号
|
||||
investigationManage.setInvestigationNumber(panDian());
|
||||
investigationManage.setOldInvestigationNumber(differentManage.getInvestigationNumber());
|
||||
investigationManage.setDifferentNumber(null);
|
||||
investigationManage.setInvestigationFrequency(2);
|
||||
// 基本信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
investigationManage.setOrganizationId(userPo.getOrganizationId());
|
||||
investigationManage.setTopOrganizationId(userPo.getTopOrganizationId());
|
||||
investigationManage.setOrganizationName(userPo.getOrganizationName());
|
||||
investigationManage.setCreateBy(loginUser.getUserid());
|
||||
investigationManage.setCreateByName(loginUser.getUsername());
|
||||
investigationManage.setCreateTime(new Date());
|
||||
investigationManage.setUpdateBy(loginUser.getUserid());
|
||||
investigationManage.setUpdateByName(loginUser.getUsername());
|
||||
investigationManage.setUpdateTime(new Date());
|
||||
|
||||
//设置新盘点单状态--待盘点(禅道7820)
|
||||
investigationManage.setInvestigationStatus(StatusInvestigationEnum.pending.getCode());
|
||||
//根据差异单生成新盘点单明细
|
||||
List<InvestigetionManageDetail> investigetionManageDetailList = investigetionManageDetailMapper.selectList(new QueryWrapper<InvestigetionManageDetail>().lambda().eq(InvestigetionManageDetail::getInvestigationNumber, investigationNumber));
|
||||
for(InvestigetionManageDetail investigetionManageDetail : investigetionManageDetailList){
|
||||
investigetionManageDetail.setDifferentNumber(null);
|
||||
investigetionManageDetail.setInvestigationNumber(investigationManage.getInvestigationNumber());
|
||||
investigetionManageDetail.setInvestigationStatus(StatusInvestigationEnum.pending.getCode());
|
||||
investigetionManageDetail.setInvestigationFrequency(2);
|
||||
//获取最新的库存数量
|
||||
MaterialInventory materialInventory = materialInventoryMapper.selectOne(new QueryWrapper<MaterialInventory>().lambda().eq(MaterialInventory::getMaterialInventoryId, investigetionManageDetail.getMaterialInventoryId()));
|
||||
investigetionManageDetail.setInventoryQuantity(materialInventory.getInventoryQuantity());
|
||||
//盘点数量设置为0
|
||||
investigetionManageDetail.setInvestigationQuantity(BigDecimal.ZERO);
|
||||
//差异数量设置为0
|
||||
investigetionManageDetail.setDifferentQuantity(BigDecimal.ZERO);
|
||||
UtilloginUserAssemble assembler = new UtilloginUserAssemble();
|
||||
assembler.fillCommonProperties(investigetionManageDetail, loginUser);
|
||||
investigetionManageDetail.setInvestigationManageDetailId(null);
|
||||
//保存明细
|
||||
investigetionManageDetailMapper.insert(investigetionManageDetail);
|
||||
}
|
||||
|
||||
return InvestigationManageMapper.insert(investigationManage) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean differentRollback(DifferentManageDO differentManageDO1) {
|
||||
DifferentManagePO differentManagePO = getDifferentManageDO(differentManageDO1.getDifferentManageId());
|
||||
DifferentManageDO differentManageDO = JSONUtil.toBean(JSONUtil.toJsonStr(differentManagePO), DifferentManageDO.class);
|
||||
// 库存差异更新
|
||||
List<InvestigetionManageDetailDO> investigetionManageDetailList = differentManageDO.getInvestigetionManageDetailList();
|
||||
investigetionManageDetailList.forEach(e->{
|
||||
MaterialInventory materialInventory = new MaterialInventory();
|
||||
if (e.getInvestigationStatus() != 3){ // 库存更新
|
||||
materialInventory = materialInventoryMapper.selectById(e.getMaterialInventoryId());
|
||||
materialInventory.setInventoryQuantity(e.getInvestigationQuantity());
|
||||
|
||||
}
|
||||
materialInventoryMapper.updateMaterial(JSONUtil.toBean(JSONUtil.toJsonStr(materialInventory), MaterialInventoryDO.class));
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DifferentManagePO getDifferentManageDO(Long differentManageId) {
|
||||
DifferentManage differentManage = differentManageMapper.selectById(differentManageId);
|
||||
String investigationNumber = differentManage.getInvestigationNumber();
|
||||
List<InvestigetionManageDetail> investigetionManageDetails = investigetionManageDetailMapper.selectList(new QueryWrapper<InvestigetionManageDetail>().lambda().eq(InvestigetionManageDetail::getInvestigationNumber, investigationNumber));
|
||||
List<InvestigetionManageDetail> investigetionManageDetailList = new ArrayList<>();
|
||||
for (InvestigetionManageDetail e : investigetionManageDetails) {
|
||||
if (e.getInvestigationResult() != 3) {
|
||||
investigetionManageDetailList.add(e);
|
||||
}
|
||||
}
|
||||
differentManage.setInvestigetionManageDetailList(investigetionManageDetailList);
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(differentManage),DifferentManagePO.class);
|
||||
}
|
||||
|
||||
public String panDian() {
|
||||
String panDian = "PD";
|
||||
LocalDateTime loc = LocalDateTime.now();
|
||||
panDian += loc.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
|
||||
return panDian;
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.mhd.wms.domain.differentManage.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.repository.po.InvestigetionManageDetailPO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 差异单对象 different_manage
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "差异单对象", description = "差异单响应对象")
|
||||
public class DifferentManagePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("差异管理id")
|
||||
private Long differentManageId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("差异单号")
|
||||
@Excel(name = "差异单号")
|
||||
private String differentNumber;
|
||||
|
||||
@ApiModelProperty("盘点单号")
|
||||
@Excel(name = "盘点单号")
|
||||
private String investigationNumber;
|
||||
|
||||
@ApiModelProperty("盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
@Excel(name = "盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
private Integer investigationStatus;
|
||||
|
||||
@ApiModelProperty("盘点范围")
|
||||
@Excel(name = "盘点范围")
|
||||
private String investigationRange;
|
||||
|
||||
@ApiModelProperty("盘点方式:1.明盘 2.盲盘")
|
||||
@Excel(name = "盘点方式:1.明盘 2.盲盘")
|
||||
private Integer investigationType;
|
||||
|
||||
@ApiModelProperty("盘点方法:1.静态盘点 2.动态盘点")
|
||||
@Excel(name = "盘点方法:1.静态盘点 2.动态盘点")
|
||||
private Integer investigationMethod;
|
||||
|
||||
@ApiModelProperty("盘点轮次:1.初盘 2.复盘")
|
||||
@Excel(name = "盘点轮次:1.初盘 2.复盘")
|
||||
private Integer investigationFrequency;
|
||||
|
||||
@ApiModelProperty("监盘人ID")
|
||||
@Excel(name = "监盘人ID")
|
||||
private Long investigationManBy;
|
||||
|
||||
@ApiModelProperty("监盘人姓名")
|
||||
@Excel(name = "监盘人姓名")
|
||||
private String investigationManName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("是否作废: 1-是 2-否")
|
||||
@Excel(name = "是否作废: 1-是 2-否")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("是否过账: 1-是 2-否")
|
||||
@Excel(name = "是否过账: 1-是 2-否")
|
||||
private Integer postedFlag;
|
||||
|
||||
@ApiModelProperty("是否重盘: 1-是 2-否")
|
||||
@Excel(name = "是否重盘: 1-是 2-否")
|
||||
private Integer reCountedFlag;
|
||||
|
||||
@ApiModelProperty("盘点详情")
|
||||
@TableField(exist = false)
|
||||
private List<InvestigetionManageDetailPO> investigetionManageDetailList;
|
||||
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package com.mhd.wms.domain.differentManage.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.investigetionManageDetail.repository.todo.InvestigetionManageDetailDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 差异单对象 different_manage
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DifferentManageDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("差异管理id")
|
||||
private Long differentManageId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("差异单号")
|
||||
@Excel(name = "差异单号")
|
||||
private String differentNumber;
|
||||
|
||||
@ApiModelProperty("盘点单号")
|
||||
@Excel(name = "盘点单号")
|
||||
private String investigationNumber;
|
||||
|
||||
@ApiModelProperty("盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
@Excel(name = "盘点状态: 1.已创建 2.待盘点 3.盘点中 4.盘点完成")
|
||||
private Integer investigationStatus;
|
||||
|
||||
@ApiModelProperty("盘点范围")
|
||||
@Excel(name = "盘点范围")
|
||||
private String investigationRange;
|
||||
|
||||
@ApiModelProperty("盘点方式:1.明盘 2.盲盘")
|
||||
@Excel(name = "盘点方式:1.明盘 2.盲盘")
|
||||
private Integer investigationType;
|
||||
|
||||
@ApiModelProperty("盘点方法:1.静态盘点 2.动态盘点")
|
||||
@Excel(name = "盘点方法:1.静态盘点 2.动态盘点")
|
||||
private Integer investigationMethod;
|
||||
|
||||
@ApiModelProperty("盘点轮次:1.初盘 2.复盘")
|
||||
@Excel(name = "盘点轮次:1.初盘 2.复盘")
|
||||
private Integer investigationFrequency;
|
||||
|
||||
@ApiModelProperty("监盘人ID")
|
||||
@Excel(name = "监盘人ID")
|
||||
private Long investigationManBy;
|
||||
|
||||
@ApiModelProperty("监盘人姓名")
|
||||
@Excel(name = "监盘人姓名")
|
||||
private String investigationManName;
|
||||
|
||||
@ApiModelProperty("作业人用户ID")
|
||||
@Excel(name = "作业人用户ID")
|
||||
private Long operatorsBy;
|
||||
|
||||
@ApiModelProperty("作业人姓名")
|
||||
@Excel(name = "作业人姓名")
|
||||
private String operatorsName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("是否作废: 1-是 2-否")
|
||||
@Excel(name = "是否作废: 1-是 2-否")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("是否过账: 1-是 2-否")
|
||||
@Excel(name = "是否过账: 1-是 2-否")
|
||||
private Integer postedFlag;
|
||||
|
||||
@ApiModelProperty("是否重盘: 1-是 2-否")
|
||||
@Excel(name = "是否重盘: 1-是 2-否")
|
||||
private Integer reCountedFlag;
|
||||
|
||||
@ApiModelProperty("盘点详情")
|
||||
@TableField(exist = false)
|
||||
private List<InvestigetionManageDetailDO> investigetionManageDetailList;
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.mhd.wms.domain.differentManage.service;
|
||||
|
||||
import com.mhd.wms.domain.differentManage.repository.facade.IDifferentManageService;
|
||||
import com.mhd.wms.domain.differentManage.repository.po.DifferentManagePO;
|
||||
import com.mhd.wms.domain.differentManage.repository.todo.DifferentManageDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 差异单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DifferentManageDomainService {
|
||||
|
||||
@Autowired
|
||||
private IDifferentManageService differentManageService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询差异单列表
|
||||
*/
|
||||
public List<DifferentManagePO> queryList(DifferentManageDO differentManageDO) {
|
||||
return differentManageService.queryList(differentManageDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增差异单
|
||||
*/
|
||||
public Boolean insert(DifferentManageDO differentManageDO) {
|
||||
|
||||
return differentManageService.insert(differentManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改差异单
|
||||
*/
|
||||
public Boolean update(DifferentManageDO differentManageDO) {
|
||||
return differentManageService.update(differentManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除差异单
|
||||
*/
|
||||
public Boolean delete(Long[] differentManageIds) {
|
||||
return differentManageService.delete(differentManageIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取差异单详细信息
|
||||
*/
|
||||
public DifferentManagePO getInfo(Long differentManageId) {
|
||||
return differentManageService.getInfo(differentManageId);
|
||||
}
|
||||
|
||||
public Boolean resetDifferent(DifferentManageDO differentManageDO){
|
||||
return differentManageService.resetDifferent(differentManageDO);
|
||||
}
|
||||
public Boolean differentRollback(DifferentManageDO differentManageDO){
|
||||
return differentManageService.differentRollback(differentManageDO);
|
||||
}
|
||||
|
||||
public DifferentManagePO getDifferentManageDO(Long differentManageId){
|
||||
return differentManageService.getDifferentManageDO(differentManageId);
|
||||
}
|
||||
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 交接作业单对象 handover_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class HandoverTaskOrder extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("交接作业单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long handoverTaskOrderId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("作业流水号")
|
||||
@Excel(name = "作业流水号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("作业单号")
|
||||
@Excel(name = "作业单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("交接状态: 1-未交接 2-已交接")
|
||||
@Excel(name = "交接状态: 1-未交接 2-已交接")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("月台id")
|
||||
@Excel(name = "月台id")
|
||||
private Long platformId;
|
||||
|
||||
@ApiModelProperty("月台编码")
|
||||
@Excel(name = "月台编码")
|
||||
private String platformCode;
|
||||
|
||||
@ApiModelProperty("月台名称 ")
|
||||
@Excel(name = "月台名称 ")
|
||||
private String platformName;
|
||||
|
||||
@ApiModelProperty("月台使用时间管理id")
|
||||
@Excel(name = "月台使用时间管理id")
|
||||
private Long platformUseTimeId;
|
||||
|
||||
@ApiModelProperty("月台使用开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseStartTime;
|
||||
|
||||
@ApiModelProperty("月台使用结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseEndTime;
|
||||
|
||||
@ApiModelProperty("月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
@Excel(name = "月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
private Integer platformUseStatus;
|
||||
|
||||
@ApiModelProperty("出库单类型编码")
|
||||
@Excel(name = "出库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("出库单类型名称")
|
||||
@Excel(name = "出库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计出货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("拣货单号")
|
||||
@Excel(name = "拣货单号")
|
||||
private String pickingOrderNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.entity.HandoverTaskOrder;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.po.HandoverTaskOrderPO;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.todo.HandoverTaskOrderDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交接作业单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
public interface IHandoverTaskOrderService extends IService<HandoverTaskOrder>
|
||||
{
|
||||
/**
|
||||
* 分页查询交接作业单列表
|
||||
*/
|
||||
public List<HandoverTaskOrderPO> queryList(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
|
||||
/**
|
||||
* 新增交接作业单
|
||||
*/
|
||||
public Boolean insert(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
|
||||
/**
|
||||
* 修改交接作业单
|
||||
*/
|
||||
public Boolean update(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
|
||||
/**
|
||||
* 批量删除交接作业单
|
||||
*/
|
||||
public Boolean delete(Long[] outTaskOrderIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询交接作业单
|
||||
*/
|
||||
public HandoverTaskOrderPO getInfo(Long outTaskOrderId);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.entity.HandoverTaskOrder;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.po.HandoverTaskOrderPO;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.todo.HandoverTaskOrderDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交接作业单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
public interface HandoverTaskOrderMapper extends BaseMapper<HandoverTaskOrder>
|
||||
{
|
||||
/**
|
||||
* 查询交接作业单列表
|
||||
*/
|
||||
public List<HandoverTaskOrderPO> queryList(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.entity.HandoverTaskOrder;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.facade.IHandoverTaskOrderService;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.mapper.HandoverTaskOrderMapper;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.po.HandoverTaskOrderPO;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.todo.HandoverTaskOrderDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交接作业单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Service
|
||||
public class HandoverTaskOrderImpl extends ServiceImpl<HandoverTaskOrderMapper, HandoverTaskOrder> implements IHandoverTaskOrderService {
|
||||
@Autowired
|
||||
private HandoverTaskOrderMapper handoverTaskOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询交接作业单列表
|
||||
*/
|
||||
@Override
|
||||
public List<HandoverTaskOrderPO> queryList(HandoverTaskOrderDO handoverTaskOrderDO)
|
||||
{
|
||||
return handoverTaskOrderMapper.queryList(handoverTaskOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接作业单
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
HandoverTaskOrder handoverTaskOrder = new HandoverTaskOrder();
|
||||
BeanUtils.copyProperties(handoverTaskOrderDO,handoverTaskOrder);
|
||||
return this.save(handoverTaskOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接作业单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
HandoverTaskOrder handoverTaskOrder = new HandoverTaskOrder();
|
||||
BeanUtils.copyProperties(handoverTaskOrderDO,handoverTaskOrder);
|
||||
return this.updateById(handoverTaskOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交接作业单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] outTaskOrderIds ) {
|
||||
List<HandoverTaskOrder> list = new ArrayList<>();
|
||||
for (Long id : outTaskOrderIds) {
|
||||
HandoverTaskOrder handoverTaskOrder = new HandoverTaskOrder();
|
||||
handoverTaskOrder.setHandoverTaskOrderId(id);
|
||||
handoverTaskOrder.setDelFlag(2);
|
||||
list.add(handoverTaskOrder);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接作业单
|
||||
*/
|
||||
@Override
|
||||
public HandoverTaskOrderPO getInfo(Long outTaskOrderId) {
|
||||
HandoverTaskOrder handoverTaskOrder = this.getById(outTaskOrderId);
|
||||
HandoverTaskOrderPO handoverTaskOrderPO = new HandoverTaskOrderPO();
|
||||
BeanUtils.copyProperties(handoverTaskOrder,handoverTaskOrderPO);
|
||||
return handoverTaskOrderPO;
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 交接作业单对象 handover_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "交接作业单对象", description = "交接作业单响应对象")
|
||||
public class HandoverTaskOrderPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("交接作业单id")
|
||||
private Long handoverTaskOrderId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("作业流水号")
|
||||
@Excel(name = "作业流水号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("作业单号")
|
||||
@Excel(name = "作业单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("交接状态: 1-未交接 2-已交接")
|
||||
@Excel(name = "交接状态: 1-未交接 2-已交接")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("月台id")
|
||||
@Excel(name = "月台id")
|
||||
private Long platformId;
|
||||
|
||||
@ApiModelProperty("月台编码")
|
||||
@Excel(name = "月台编码")
|
||||
private String platformCode;
|
||||
|
||||
@ApiModelProperty("月台名称 ")
|
||||
@Excel(name = "月台名称 ")
|
||||
private String platformName;
|
||||
|
||||
@ApiModelProperty("月台使用时间管理id")
|
||||
@Excel(name = "月台使用时间管理id")
|
||||
private Long platformUseTimeId;
|
||||
|
||||
@ApiModelProperty("月台使用开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseStartTime;
|
||||
|
||||
@ApiModelProperty("月台使用结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseEndTime;
|
||||
|
||||
@ApiModelProperty("月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
@Excel(name = "月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
private Integer platformUseStatus;
|
||||
|
||||
@ApiModelProperty("出库单类型编码")
|
||||
@Excel(name = "出库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("出库单类型名称")
|
||||
@Excel(name = "出库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计出货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("拣货单号")
|
||||
@Excel(name = "拣货单号")
|
||||
private String pickingOrderNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 交接作业单对象 handover_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class HandoverTaskOrderDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("交接作业单id")
|
||||
private Long handoverTaskOrderId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("作业流水号")
|
||||
@Excel(name = "作业流水号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("作业单号")
|
||||
@Excel(name = "作业单号")
|
||||
private String taskNumber;
|
||||
|
||||
@ApiModelProperty("交接状态: 1-未交接 2-已交接")
|
||||
@Excel(name = "交接状态: 1-未交接 2-已交接")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("月台id")
|
||||
@Excel(name = "月台id")
|
||||
private Long platformId;
|
||||
|
||||
@ApiModelProperty("月台编码")
|
||||
@Excel(name = "月台编码")
|
||||
private String platformCode;
|
||||
|
||||
@ApiModelProperty("月台名称 ")
|
||||
@Excel(name = "月台名称 ")
|
||||
private String platformName;
|
||||
|
||||
@ApiModelProperty("月台使用时间管理id")
|
||||
@Excel(name = "月台使用时间管理id")
|
||||
private Long platformUseTimeId;
|
||||
|
||||
@ApiModelProperty("月台使用开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseStartTime;
|
||||
|
||||
@ApiModelProperty("月台使用结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "月台使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date platformUseEndTime;
|
||||
|
||||
@ApiModelProperty("月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
@Excel(name = "月台使用状态:1-未使用 2-使用中 3-已释放")
|
||||
private Integer platformUseStatus;
|
||||
|
||||
@ApiModelProperty("出库单类型编码")
|
||||
@Excel(name = "出库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("出库单类型名称")
|
||||
@Excel(name = "出库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计出货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("拣货单号")
|
||||
@Excel(name = "拣货单号")
|
||||
private String pickingOrderNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("交接作业单id")
|
||||
private List<Long> handoverTaskOrderIds;
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.mhd.wms.domain.handoverTaskOrder.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.entity.HandoverTaskOrder;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.facade.IHandoverTaskOrderService;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.po.HandoverTaskOrderPO;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.todo.HandoverTaskOrderDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交接作业单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HandoverTaskOrderDomainService {
|
||||
|
||||
@Autowired
|
||||
private IHandoverTaskOrderService handoverTaskOrderService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询交接作业单列表
|
||||
*/
|
||||
public List<HandoverTaskOrderPO> queryList(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
return handoverTaskOrderService.queryList(handoverTaskOrderDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增交接作业单
|
||||
*/
|
||||
public Boolean insert(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
|
||||
return handoverTaskOrderService.insert(handoverTaskOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接作业单
|
||||
*/
|
||||
public Boolean update(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
return handoverTaskOrderService.update(handoverTaskOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交接作业单
|
||||
*/
|
||||
public Boolean delete(Long[] outTaskOrderIds) {
|
||||
return handoverTaskOrderService.delete(outTaskOrderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交接作业单详细信息
|
||||
*/
|
||||
public HandoverTaskOrderPO getInfo(Long outTaskOrderId)
|
||||
{
|
||||
return handoverTaskOrderService.getInfo(outTaskOrderId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 分配月台
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 15:19
|
||||
* @param handoverTaskOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean allocationPlatform(HandoverTaskOrderDO handoverTaskOrderDO){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return handoverTaskOrderService.update(null, new UpdateWrapper<HandoverTaskOrder>().lambda()
|
||||
.set(HandoverTaskOrder::getPlatformUseStatus, 1)
|
||||
.set(HandoverTaskOrder::getPlatformId, handoverTaskOrderDO.getPlatformId())
|
||||
.set(HandoverTaskOrder::getPlatformCode, handoverTaskOrderDO.getPlatformCode())
|
||||
.set(HandoverTaskOrder::getPlatformName, handoverTaskOrderDO.getPlatformName())
|
||||
.set(HandoverTaskOrder::getPlatformUseTimeId, handoverTaskOrderDO.getPlatformUseTimeId())
|
||||
.set(HandoverTaskOrder::getPlatformUseStartTime, handoverTaskOrderDO.getPlatformUseStartTime())
|
||||
.set(HandoverTaskOrder::getPlatformUseEndTime, handoverTaskOrderDO.getPlatformUseEndTime())
|
||||
.set(HandoverTaskOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(HandoverTaskOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(HandoverTaskOrder::getUpdateTime, new Date())
|
||||
.in(HandoverTaskOrder::getHandoverTaskOrderId, handoverTaskOrderDO.getHandoverTaskOrderIds())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 释放月台
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 15:19
|
||||
* @param handoverTaskOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean releasePlatform(HandoverTaskOrderDO handoverTaskOrderDO){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return handoverTaskOrderService.update(null, new UpdateWrapper<HandoverTaskOrder>().lambda()
|
||||
.set(HandoverTaskOrder::getPlatformUseStatus, 3)
|
||||
.set(HandoverTaskOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(HandoverTaskOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(HandoverTaskOrder::getUpdateTime, new Date())
|
||||
.in(HandoverTaskOrder::getHandoverTaskOrderId, handoverTaskOrderDO.getHandoverTaskOrderIds())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 完成交接
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/31 14:23
|
||||
* @param handoverTaskOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean completeHandover(HandoverTaskOrderDO handoverTaskOrderDO){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return handoverTaskOrderService.update(null, new UpdateWrapper<HandoverTaskOrder>().lambda()
|
||||
.set(HandoverTaskOrder::getStatus, 2)
|
||||
.set(HandoverTaskOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(HandoverTaskOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(HandoverTaskOrder::getUpdateTime, new Date())
|
||||
.in(HandoverTaskOrder::getHandoverTaskOrderId, handoverTaskOrderDO.getHandoverTaskOrderIds())
|
||||
);
|
||||
}
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InMaterialDetail extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inMaterialDetail.entity.InMaterialDetail;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.po.InMaterialDetailPO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailBaseDO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailDO;
|
||||
import com.mhd.wms.domain.overStock.repository.todo.QueryOrderOverStockDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IInMaterialDetailService extends IService<InMaterialDetail>
|
||||
{
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<InMaterialDetailPO> queryList(InMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
|
||||
public List<InMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<InMaterialDetailPO> queryListChildren(InMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(InMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(InMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean batchInsert(String orderNumber, List<InMaterialDetailDO> inMaterialDetailDOList);
|
||||
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean batchUpdate(List<InMaterialDetailDO> inMaterialDetailDOList, InMaterialDetailBaseDO inMaterialDetailBaseDO);
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细
|
||||
*/
|
||||
public InMaterialDetailPO getInfo(Long materialDetailId);
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inMaterialDetail.entity.InMaterialDetail;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.po.InMaterialDetailPO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailDO;
|
||||
import com.mhd.wms.domain.overStock.repository.todo.QueryOrderOverStockDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface InMaterialDetailMapper extends BaseMapper<InMaterialDetail>
|
||||
{
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
public List<InMaterialDetailPO> queryList(InMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
public List<InMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
}
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.constant.SnowFlakeConstants;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.uuid.IdGenerator;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inMaterialDetail.entity.InMaterialDetail;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.facade.IInMaterialDetailService;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.mapper.InMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.po.InMaterialDetailPO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailBaseDO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailDO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.facade.IMaterialBaseInfoService;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.facade.IMaterialGoodsRuleService;
|
||||
import com.mhd.wms.domain.materialWarehouseControl.repository.facade.IMaterialWarehouseControlService;
|
||||
import com.mhd.wms.domain.overStock.repository.todo.QueryOrderOverStockDO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 物料明细Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class InMaterialDetailImpl extends ServiceImpl<InMaterialDetailMapper, InMaterialDetail> implements IInMaterialDetailService {
|
||||
@Autowired
|
||||
private InMaterialDetailMapper inMaterialDetailMapper;
|
||||
@Autowired
|
||||
private IMaterialBaseInfoService materialBaseInfoService;
|
||||
@Autowired
|
||||
private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
@Autowired
|
||||
private IMaterialWarehouseControlService materialWarehouseControlService;
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private IdGenerator idGenerator;
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<InMaterialDetailPO> queryList(InMaterialDetailDO inMaterialDetailDO) {
|
||||
return inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<InMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO) {
|
||||
return inMaterialDetailMapper.queryInOrderList(queryOrderOverStockDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<InMaterialDetailPO> queryListChildren(InMaterialDetailDO inMaterialDetailDO)
|
||||
{
|
||||
List<InMaterialDetailPO> inMaterialDetailPOList = inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
|
||||
// 获取查询的层级
|
||||
List<InMaterialDetailPO> inMaterialDetailPOParentList = inMaterialDetailPOList
|
||||
.stream().filter(e -> 1 == e.getLevel()).collect(Collectors.toList());
|
||||
// 递归查询子集
|
||||
inMaterialDetailPOParentList.forEach(materialDetailPO -> materialDetailPO.setChildren(getChildren(materialDetailPO.getUniqueId(), inMaterialDetailPOList, 2)));
|
||||
return inMaterialDetailPOParentList;
|
||||
}
|
||||
|
||||
private List<InMaterialDetailPO> getChildren(Long parentUniqueId, List<InMaterialDetailPO> inMaterialDetailPOList, Integer maxLevel){
|
||||
List<InMaterialDetailPO> childrenCityList = inMaterialDetailPOList.stream().filter(materialDetailPO -> parentUniqueId.equals(materialDetailPO.getParentUniqueId())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(childrenCityList)){
|
||||
childrenCityList.forEach(childrenCity -> {
|
||||
if (childrenCity.getLevel() < maxLevel){
|
||||
childrenCity.setChildren(getChildren(childrenCity.getUniqueId(), inMaterialDetailPOList, maxLevel));
|
||||
}
|
||||
});
|
||||
}
|
||||
return childrenCityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InMaterialDetailDO inMaterialDetailDO) {
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
return this.save(inMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InMaterialDetailDO inMaterialDetailDO) {
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
return this.updateById(inMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量新增物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param inOrderNumber
|
||||
* @param inMaterialDetailDOList
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchInsert(String inOrderNumber, List<InMaterialDetailDO> inMaterialDetailDOList) {
|
||||
if (CollectionUtils.isEmpty(inMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 批量新增或修改
|
||||
List<InMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
for (InMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inMaterialDetail.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inMaterialDetail.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
inMaterialDetail.setInOrderNumber(inOrderNumber);
|
||||
inMaterialDetail.setLevel(1);
|
||||
inMaterialDetail.setCreateBy(loginUser.getUserid());
|
||||
inMaterialDetail.setCreateByName(loginUser.getUsername());
|
||||
inMaterialDetail.setCreateTime(new Date());
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
return saveBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量修改物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param inMaterialDetailDOList
|
||||
* @param inMaterialDetailBaseDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchUpdate(List<InMaterialDetailDO> inMaterialDetailDOList, InMaterialDetailBaseDO inMaterialDetailBaseDO) {
|
||||
if (CollectionUtils.isEmpty(inMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
List<InMaterialDetail> inMaterialDetailDbList = inMaterialDetailMapper.selectList(new QueryWrapper<InMaterialDetail>().lambda().eq(InMaterialDetail::getInOrderNumber, inMaterialDetailBaseDO.getInOrderNumber()));
|
||||
Map<Long, InMaterialDetail> materialDetailMap = inMaterialDetailDbList.stream().collect(Collectors.toMap(InMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
//批量新增或修改物料信息
|
||||
List<InMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
//需要修改的物流明细
|
||||
List<Long> materialDetailIdsByUpdate = new ArrayList<>();
|
||||
for (InMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
//判断是否需要修改
|
||||
InMaterialDetail inMaterialDetail = materialDetailMap.get(inMaterialDetailDO.getMaterialDetailId());
|
||||
if (inMaterialDetail == null){
|
||||
inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
inMaterialDetail.setInOrderNumber(inMaterialDetailBaseDO.getInOrderNumber());
|
||||
inMaterialDetail.setOrganizationId(inMaterialDetailBaseDO.getOrganizationId());
|
||||
inMaterialDetail.setOrganizationName(inMaterialDetailBaseDO.getOrganizationName());
|
||||
inMaterialDetail.setTopOrganizationId(inMaterialDetailBaseDO.getTopOrganizationId());
|
||||
}else {
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setUpdateBy(loginUser.getUserid());
|
||||
inMaterialDetail.setUpdateByName(loginUser.getUsername());
|
||||
inMaterialDetail.setUpdateTime(new Date());
|
||||
materialDetailIdsByUpdate.add(inMaterialDetailDO.getMaterialDetailId());
|
||||
}
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
//需修改的物料明细id集合不为空
|
||||
if (!CollectionUtils.isEmpty(inMaterialDetailDbList) && !CollectionUtils.isEmpty(materialDetailIdsByUpdate)){
|
||||
List<Long> materialDetailIdsByDb = inMaterialDetailDbList.stream().map(InMaterialDetail::getMaterialDetailId).collect(Collectors.toList());
|
||||
//过滤需要修改的id集合
|
||||
materialDetailIdsByDb.removeAll(materialDetailIdsByUpdate);
|
||||
//判断是否存在需要删除的物流明细 标记删除
|
||||
if (!CollectionUtils.isEmpty(materialDetailIdsByDb)){
|
||||
update(new UpdateWrapper<InMaterialDetail>().lambda()
|
||||
.set(InMaterialDetail::getDelFlag, 2)
|
||||
.set(InMaterialDetail::getUpdateBy, loginUser.getUserid())
|
||||
.set(InMaterialDetail::getUpdateByName, loginUser.getUsername())
|
||||
.set(InMaterialDetail::getUpdateTime, new Date())
|
||||
.in(InMaterialDetail::getMaterialDetailId, materialDetailIdsByDb));
|
||||
}
|
||||
}
|
||||
//保存物料明细信息
|
||||
return saveOrUpdateBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] materialDetailIds ) {
|
||||
List<InMaterialDetail> list = new ArrayList<>();
|
||||
for (Long id : materialDetailIds) {
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
inMaterialDetail.setMaterialDetailId(id);
|
||||
inMaterialDetail.setDelFlag(2);
|
||||
list.add(inMaterialDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public InMaterialDetailPO getInfo(Long materialDetailId) {
|
||||
InMaterialDetail inMaterialDetail = this.getById(materialDetailId);
|
||||
InMaterialDetailPO inMaterialDetailPO = new InMaterialDetailPO();
|
||||
BeanUtils.copyProperties(inMaterialDetail, inMaterialDetailPO);
|
||||
return inMaterialDetailPO;
|
||||
}
|
||||
|
||||
}
|
||||
+266
@@ -0,0 +1,266 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.stockInOrder.repository.po.StockInOrderBasePO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料明细对象", description = "物料明细响应对象")
|
||||
public class InMaterialDetailPO extends StockInOrderBasePO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("未收货数量")
|
||||
@Excel(name = "未收货数量")
|
||||
private BigDecimal waitReceiptQuantity;
|
||||
|
||||
@ApiModelProperty("未上架数量")
|
||||
@Excel(name = "未上架数量")
|
||||
private BigDecimal waitShelvesQuantity;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<InMaterialDetailPO> children;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockBaseDO
|
||||
* @description: TODO
|
||||
* @date 2024/5/23 20:30
|
||||
**/
|
||||
@Data
|
||||
public class InMaterialDetailBaseDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
}
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
import com.mhd.wms.domain.materialMoreDetail.repository.todo.MaterialMoreDetailDO;
|
||||
import com.mhd.wms.domain.stockInOrder.repository.todo.StockInOrderBaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InMaterialDetailDO extends StockInOrderBaseDO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("物料明细子集")
|
||||
private List<InMaterialDetailDO> children;
|
||||
|
||||
@ApiModelProperty("更多属性")
|
||||
private List<MaterialMoreDetailDO> materialMoreDetailList;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
private List<InMaterialDetailSerialNumberDO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("入库单号集合")
|
||||
@Excel(name = "入库单号集合")
|
||||
private List<String> inOrderNumberList;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.wms.domain.inMaterialDetail.service;
|
||||
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.facade.IInMaterialDetailService;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.po.InMaterialDetailPO;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.todo.InMaterialDetailDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InMaterialDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInMaterialDetailService materialDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<InMaterialDetailPO> queryList(InMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(InMaterialDetailDO inMaterialDetailDO) {
|
||||
|
||||
return materialDetailService.insert(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(InMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.update(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds) {
|
||||
return materialDetailService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public InMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return materialDetailService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细序列号对象 material_detail_serial_number
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InMaterialDetailSerialNumber extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料更多属性明细id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long materialDetailSerialNumberId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("订单物料明细业务唯一id")
|
||||
@Excel(name = "订单物料明细业务唯一id")
|
||||
private Long materialDetailUniqueId;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
@Excel(name = "序列号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.entity.InMaterialDetailSerialNumber;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po.InMaterialDetailSerialNumberPO;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细序列号Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IInMaterialDetailSerialNumberService extends IService<InMaterialDetailSerialNumber>
|
||||
{
|
||||
/**
|
||||
* 分页查询物料明细序列号列表
|
||||
*/
|
||||
public List<InMaterialDetailSerialNumberPO> queryList(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细序列号
|
||||
*/
|
||||
public Boolean insert(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO);
|
||||
|
||||
/**
|
||||
* 修改物料明细序列号
|
||||
*/
|
||||
public Boolean update(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO);
|
||||
|
||||
/**
|
||||
* 批量删除物料明细序列号
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailSerialNumberIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细序列号
|
||||
*/
|
||||
public InMaterialDetailSerialNumberPO getInfo(Long materialDetailSerialNumberId);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.entity.InMaterialDetailSerialNumber;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po.InMaterialDetailSerialNumberPO;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细序列号Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface InMaterialDetailSerialNumberMapper extends BaseMapper<InMaterialDetailSerialNumber>
|
||||
{
|
||||
/**
|
||||
* 查询物料明细序列号列表
|
||||
*/
|
||||
public List<InMaterialDetailSerialNumberPO> queryList(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.entity.InMaterialDetailSerialNumber;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.facade.IInMaterialDetailSerialNumberService;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.mapper.InMaterialDetailSerialNumberMapper;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po.InMaterialDetailSerialNumberPO;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细序列号Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class InMaterialDetailSerialNumberImpl extends ServiceImpl<InMaterialDetailSerialNumberMapper, InMaterialDetailSerialNumber> implements IInMaterialDetailSerialNumberService {
|
||||
@Autowired
|
||||
private InMaterialDetailSerialNumberMapper InMaterialDetailSerialNumberMapper;
|
||||
|
||||
/**
|
||||
* 查询物料明细序列号列表
|
||||
*/
|
||||
@Override
|
||||
public List<InMaterialDetailSerialNumberPO> queryList(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO)
|
||||
{
|
||||
return InMaterialDetailSerialNumberMapper.queryList(InMaterialDetailSerialNumberDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料明细序列号
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO) {
|
||||
InMaterialDetailSerialNumber inMaterialDetailSerialNumber = new InMaterialDetailSerialNumber();
|
||||
BeanUtils.copyProperties(InMaterialDetailSerialNumberDO, inMaterialDetailSerialNumber);
|
||||
return this.save(inMaterialDetailSerialNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细序列号
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO) {
|
||||
InMaterialDetailSerialNumber inMaterialDetailSerialNumber = new InMaterialDetailSerialNumber();
|
||||
BeanUtils.copyProperties(InMaterialDetailSerialNumberDO, inMaterialDetailSerialNumber);
|
||||
return this.updateById(inMaterialDetailSerialNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细序列号
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] materialDetailSerialNumberIds ) {
|
||||
List<InMaterialDetailSerialNumber> list = new ArrayList<>();
|
||||
for (Long id : materialDetailSerialNumberIds) {
|
||||
InMaterialDetailSerialNumber inMaterialDetailSerialNumber = new InMaterialDetailSerialNumber();
|
||||
inMaterialDetailSerialNumber.setMaterialDetailSerialNumberId(id);
|
||||
inMaterialDetailSerialNumber.setDelFlag(2);
|
||||
list.add(inMaterialDetailSerialNumber);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细序列号
|
||||
*/
|
||||
@Override
|
||||
public InMaterialDetailSerialNumberPO getInfo(Long materialDetailSerialNumberId) {
|
||||
InMaterialDetailSerialNumber inMaterialDetailSerialNumber = this.getById(materialDetailSerialNumberId);
|
||||
InMaterialDetailSerialNumberPO InMaterialDetailSerialNumberPO = new InMaterialDetailSerialNumberPO();
|
||||
BeanUtils.copyProperties(inMaterialDetailSerialNumber, InMaterialDetailSerialNumberPO);
|
||||
return InMaterialDetailSerialNumberPO;
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细序列号对象 material_detail_serial_number
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料明细序列号对象", description = "物料明细序列号响应对象")
|
||||
public class InMaterialDetailSerialNumberPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料更多属性明细id")
|
||||
private Long materialDetailSerialNumberId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("订单物料明细业务唯一id")
|
||||
@Excel(name = "订单物料明细业务唯一id")
|
||||
private Long materialDetailUniqueId;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
@Excel(name = "序列号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细序列号对象 material_detail_serial_number
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InMaterialDetailSerialNumberDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料更多属性明细id")
|
||||
private Long materialDetailSerialNumberId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String orderNumber;
|
||||
|
||||
@ApiModelProperty("订单物料明细业务唯一id")
|
||||
@Excel(name = "订单物料明细业务唯一id")
|
||||
private Long materialDetailUniqueId;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
@Excel(name = "序列号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private List<String> orderNumbers;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.mhd.wms.domain.inMaterialDetailSerialNumber.service;
|
||||
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po.InMaterialDetailSerialNumberPO;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细序列号
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InMaterialDetailSerialNumberDomainService {
|
||||
|
||||
@Autowired
|
||||
private com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.facade.IInMaterialDetailSerialNumberService IInMaterialDetailSerialNumberService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细序列号列表
|
||||
*/
|
||||
public List<InMaterialDetailSerialNumberPO> queryList(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO) {
|
||||
return IInMaterialDetailSerialNumberService.queryList(InMaterialDetailSerialNumberDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细序列号
|
||||
*/
|
||||
public Boolean insert(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO) {
|
||||
|
||||
return IInMaterialDetailSerialNumberService.insert(InMaterialDetailSerialNumberDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细序列号
|
||||
*/
|
||||
public Boolean update(InMaterialDetailSerialNumberDO InMaterialDetailSerialNumberDO) {
|
||||
return IInMaterialDetailSerialNumberService.update(InMaterialDetailSerialNumberDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细序列号
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailSerialNumberIds) {
|
||||
return IInMaterialDetailSerialNumberService.delete(materialDetailSerialNumberIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细序列号详细信息
|
||||
*/
|
||||
public InMaterialDetailSerialNumberPO getInfo(Long materialDetailSerialNumberId)
|
||||
{
|
||||
return IInMaterialDetailSerialNumberService.getInfo(materialDetailSerialNumberId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 入库异常单对象 in_order_abnormal
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InOrderAbnormal extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long inOrderAbnormalId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("异常单号")
|
||||
@Excel(name = "异常单号")
|
||||
private String abnormalNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
|
||||
@ApiModelProperty("类型:1-收货 2-上架")
|
||||
@Excel(name = "类型:1-收货 2-上架")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("作业数量")
|
||||
@Excel(name = "作业数量")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("允许超出的作业数量")
|
||||
@Excel(name = "允许超出的作业数量")
|
||||
private BigDecimal allowActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常数量(异常数量 = 作业数量 - 计划数量)")
|
||||
@Excel(name = "异常数量")
|
||||
private BigDecimal abnormalActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常类型: 1-上架异常 2-收货异常 3-收货异常(允许超收没超出超收比例) 4-收货异常(不允许超收)5-收货异常(允许超收但超出超收比例)")
|
||||
@Excel(name = "异常类型: 1-上架异常 2-收货异常 3-收货异常", readConverterExp = "允=许超收但不允许超出超收比例")
|
||||
private Integer abnormalType;
|
||||
|
||||
@ApiModelProperty("异常原因")
|
||||
@Excel(name = "异常原因")
|
||||
private String abnormalReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.entity.InOrderAbnormal;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.po.InOrderAbnormalPO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalBaseDO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库异常单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IInOrderAbnormalService extends IService<InOrderAbnormal>
|
||||
{
|
||||
/**
|
||||
* 分页查询入库异常单列表
|
||||
*/
|
||||
public List<InOrderAbnormalPO> queryList(InOrderAbnormalDO inOrderAbnormalDO);
|
||||
|
||||
/**
|
||||
* 新增入库异常单
|
||||
*/
|
||||
public Boolean insert(InOrderAbnormalDO inOrderAbnormalDO);
|
||||
|
||||
/**
|
||||
* 修改入库异常单
|
||||
*/
|
||||
public Boolean update(InOrderAbnormalDO inOrderAbnormalDO);
|
||||
|
||||
/**
|
||||
* 批量删除入库异常单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderAbnormalIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库异常单
|
||||
*/
|
||||
public InOrderAbnormalPO getInfo(Long inOrderAbnormalId);
|
||||
|
||||
/**
|
||||
* @description 生成异常记录
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/24 11:34
|
||||
* @param inOrderAbnormalBaseDO
|
||||
* @param type 1-收货 2-上架
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean genInOrderAbnormal(InOrderAbnormalBaseDO inOrderAbnormalBaseDO, Integer type);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.entity.InOrderAbnormal;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.po.InOrderAbnormalPO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库异常单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface InOrderAbnormalMapper extends BaseMapper<InOrderAbnormal>
|
||||
{
|
||||
/**
|
||||
* 查询入库异常单列表
|
||||
*/
|
||||
public List<InOrderAbnormalPO> queryList(InOrderAbnormalDO inOrderAbnormalDO);
|
||||
|
||||
}
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.entity.InOrderAbnormal;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.facade.IInOrderAbnormalService;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.mapper.InOrderAbnormalMapper;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.po.InOrderAbnormalPO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalBaseDO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalDO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.entity.ReceiptMaterialDetail;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.mapper.ReceiptMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.entity.ShelfMaterialDetail;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.mapper.ShelfMaterialDetailMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库异常单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class InOrderAbnormalImpl extends ServiceImpl<InOrderAbnormalMapper, InOrderAbnormal> implements IInOrderAbnormalService {
|
||||
@Autowired
|
||||
private InOrderAbnormalMapper inOrderAbnormalMapper;
|
||||
@Autowired
|
||||
private ReceiptMaterialDetailMapper receiptMaterialDetailMapper;
|
||||
@Autowired
|
||||
private ShelfMaterialDetailMapper shelfMaterialDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询入库异常单列表
|
||||
*/
|
||||
@Override
|
||||
public List<InOrderAbnormalPO> queryList(InOrderAbnormalDO inOrderAbnormalDO)
|
||||
{
|
||||
return inOrderAbnormalMapper.queryList(inOrderAbnormalDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库异常单
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InOrderAbnormalDO inOrderAbnormalDO) {
|
||||
InOrderAbnormal inOrderAbnormal = new InOrderAbnormal();
|
||||
BeanUtils.copyProperties(inOrderAbnormalDO,inOrderAbnormal);
|
||||
return this.save(inOrderAbnormal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库异常单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InOrderAbnormalDO inOrderAbnormalDO) {
|
||||
InOrderAbnormal inOrderAbnormal = new InOrderAbnormal();
|
||||
BeanUtils.copyProperties(inOrderAbnormalDO,inOrderAbnormal);
|
||||
return this.updateById(inOrderAbnormal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库异常单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inOrderAbnormalIds ) {
|
||||
List<InOrderAbnormal> list = new ArrayList<>();
|
||||
for (Long id : inOrderAbnormalIds) {
|
||||
InOrderAbnormal inOrderAbnormal = new InOrderAbnormal();
|
||||
inOrderAbnormal.setInOrderAbnormalId(id);
|
||||
inOrderAbnormal.setDelFlag(2);
|
||||
list.add(inOrderAbnormal);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库异常单
|
||||
*/
|
||||
@Override
|
||||
public InOrderAbnormalPO getInfo(Long inOrderAbnormalId) {
|
||||
InOrderAbnormalDO inOrderAbnormalDO = new InOrderAbnormalDO();
|
||||
inOrderAbnormalDO.setInOrderAbnormalId(inOrderAbnormalId);
|
||||
List<InOrderAbnormalPO> inOrderAbnormalPOList = queryList(inOrderAbnormalDO);
|
||||
if (CollectionUtils.isEmpty(inOrderAbnormalPOList)){
|
||||
throw new ServiceException("入库异常单不存在");
|
||||
}
|
||||
return inOrderAbnormalPOList.get(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 生成异常记录
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 21:15
|
||||
* @param inOrderAbnormalBaseDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean genInOrderAbnormal(InOrderAbnormalBaseDO inOrderAbnormalBaseDO, Integer type){
|
||||
List<InOrderAbnormal> inOrderAbnormalList = new ArrayList<>();
|
||||
if (1 == type){
|
||||
//收货数量与计划数量不符,完成收货会生成收货异常记录
|
||||
List<ReceiptMaterialDetail> receiptMaterialDetailList = receiptMaterialDetailMapper.selectList(new QueryWrapper<ReceiptMaterialDetail>().lambda().eq(ReceiptMaterialDetail::getReceiptOrderNumber, inOrderAbnormalBaseDO.getReceiptOrderNumber()));
|
||||
inOrderAbnormalList.addAll(genReceiptOrderMaterialDetailList(inOrderAbnormalBaseDO, receiptMaterialDetailList));
|
||||
}else if (2 == type) {
|
||||
//上架数量与收货数量不符,完成收货会生成上架异常记录
|
||||
List<ShelfMaterialDetail> shelfMaterialDetailList = shelfMaterialDetailMapper.selectList(new QueryWrapper<ShelfMaterialDetail>().lambda().eq(ShelfMaterialDetail::getShelfOrderNumber, inOrderAbnormalBaseDO.getShelfOrderNumber()));
|
||||
inOrderAbnormalList.addAll(genShelfOrderMaterialDetailList(inOrderAbnormalBaseDO, shelfMaterialDetailList));
|
||||
}else {
|
||||
throw new ServiceException("异常类型错误");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(inOrderAbnormalList)){
|
||||
return saveBatch(inOrderAbnormalList);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 收货数量与计划数量不符,完成收货会生成收货异常记录
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/24 11:45
|
||||
* @param inOrderAbnormalBaseDO
|
||||
* @param shelfMaterialDetailList
|
||||
* @return List<InOrderAbnormal>
|
||||
*/
|
||||
private List<InOrderAbnormal> genShelfOrderMaterialDetailList(InOrderAbnormalBaseDO inOrderAbnormalBaseDO, List<ShelfMaterialDetail> shelfMaterialDetailList){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<InOrderAbnormal> inOrderAbnormalList = new ArrayList<>();
|
||||
for (ShelfMaterialDetail shelfMaterialDetail : shelfMaterialDetailList){
|
||||
//上架
|
||||
if (shelfMaterialDetail.getShelvesQuantity().compareTo(shelfMaterialDetail.getQuantity()) != 0){
|
||||
//判断是否存在异常 根据设置的是否允许超收 取值动态赋值 先默认写死 收货异常
|
||||
InOrderAbnormal inOrderAbnormal = new InOrderAbnormal();
|
||||
//赋值基础数据
|
||||
BeanUtils.copyProperties(inOrderAbnormalBaseDO, inOrderAbnormal);
|
||||
//赋值物料信息
|
||||
BeanUtils.copyProperties(shelfMaterialDetail, inOrderAbnormal, IgnoreNullUtil.getNullPropertyNames(shelfMaterialDetail));
|
||||
inOrderAbnormal.setAbnormalNumber(OrderSequence.getOrderCode("SHYC"));
|
||||
if (shelfMaterialDetail.getShelvesQuantity().compareTo(shelfMaterialDetail.getQuantity()) > 0){
|
||||
//上架数量大于收货数量
|
||||
inOrderAbnormal.setAbnormalType(1);
|
||||
inOrderAbnormal.setActualQuantity(shelfMaterialDetail.getShelvesQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("上架数量大于收货数量");
|
||||
}else if (shelfMaterialDetail.getShelvesQuantity().compareTo(shelfMaterialDetail.getQuantity()) < 0){
|
||||
//上架数量小于收货数量
|
||||
inOrderAbnormal.setAbnormalType(1);
|
||||
inOrderAbnormal.setActualQuantity(shelfMaterialDetail.getShelvesQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("上架数量小于收货数量");
|
||||
}
|
||||
inOrderAbnormal.setAllowActualQuantity(shelfMaterialDetail.getQuantity());
|
||||
inOrderAbnormal.setAbnormalActualQuantity(shelfMaterialDetail.getShelvesQuantity().subtract(shelfMaterialDetail.getQuantity()));
|
||||
inOrderAbnormal.setCreateBy(loginUser.getUserid());
|
||||
inOrderAbnormal.setCreateByName(loginUser.getUsername());
|
||||
inOrderAbnormal.setCreateTime(new Date());
|
||||
inOrderAbnormal.setType(2);
|
||||
inOrderAbnormalList.add(inOrderAbnormal);
|
||||
}
|
||||
}
|
||||
return inOrderAbnormalList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 收货数量与计划数量不符,完成收货会生成收货异常记录
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/24 11:45
|
||||
* @param inOrderAbnormalBaseDO
|
||||
* @param receiptMaterialDetailList
|
||||
* @return List<InOrderAbnormal>
|
||||
*/
|
||||
private List<InOrderAbnormal> genReceiptOrderMaterialDetailList(InOrderAbnormalBaseDO inOrderAbnormalBaseDO, List<ReceiptMaterialDetail> receiptMaterialDetailList){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<InOrderAbnormal> inOrderAbnormalList = new ArrayList<>();
|
||||
for (ReceiptMaterialDetail receiptMaterialDetail : receiptMaterialDetailList){
|
||||
//收货
|
||||
if (receiptMaterialDetail.getReceiptQuantity().compareTo(receiptMaterialDetail.getQuantity()) != 0){
|
||||
//判断是否存在异常 根据设置的是否允许超收 取值动态赋值 先默认写死 收货异常
|
||||
InOrderAbnormal inOrderAbnormal = new InOrderAbnormal();
|
||||
//赋值基础数据
|
||||
BeanUtils.copyProperties(inOrderAbnormalBaseDO, inOrderAbnormal);
|
||||
//赋值物料信息
|
||||
BeanUtils.copyProperties(receiptMaterialDetail, inOrderAbnormal, IgnoreNullUtil.getNullPropertyNames(receiptMaterialDetail));
|
||||
inOrderAbnormal.setAbnormalNumber(OrderSequence.getOrderCode("SHYC"));
|
||||
if (receiptMaterialDetail.getReceiptQuantity().compareTo(receiptMaterialDetail.getQuantity()) > 0){
|
||||
//收货数量大于应收数量
|
||||
greatAbnormalParams(receiptMaterialDetail, inOrderAbnormal);
|
||||
}else if (receiptMaterialDetail.getReceiptQuantity().compareTo(receiptMaterialDetail.getQuantity()) < 0){
|
||||
//收货数量小于应收数量
|
||||
lessAbnormalSmallParams(receiptMaterialDetail, inOrderAbnormal);
|
||||
}
|
||||
inOrderAbnormal.setCreateBy(loginUser.getUserid());
|
||||
inOrderAbnormal.setCreateByName(loginUser.getUsername());
|
||||
inOrderAbnormal.setCreateTime(new Date());
|
||||
inOrderAbnormal.setType(1);
|
||||
inOrderAbnormalList.add(inOrderAbnormal);
|
||||
}
|
||||
}
|
||||
return inOrderAbnormalList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 大于创建异常参数
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/24 9:10
|
||||
* @param receiptMaterialDetail
|
||||
* @return InOrderAbnormal
|
||||
*/
|
||||
private InOrderAbnormal greatAbnormalParams(ReceiptMaterialDetail receiptMaterialDetail, InOrderAbnormal inOrderAbnormal){
|
||||
//是否允许超收: 1-是 2-否
|
||||
if (receiptMaterialDetail.getAllowOvercharge() == 2){
|
||||
//计算允许超收量
|
||||
//允许超出的作业量 = 计划数量 * 超收比例 * 0.01
|
||||
BigDecimal allowActualQuantity = receiptMaterialDetail.getQuantity().multiply(receiptMaterialDetail.getOverchargeRatio()).multiply(new BigDecimal("0.01"));
|
||||
BigDecimal maxActualQuantity = receiptMaterialDetail.getQuantity().add(allowActualQuantity);
|
||||
if (receiptMaterialDetail.getReceiptQuantity().compareTo(maxActualQuantity) <= 0){
|
||||
//收货异常(允许超收 单在超收范围内超出超收比例) 收货数量大于应收数量 但没有超出超收限制
|
||||
inOrderAbnormal.setAbnormalType(3);
|
||||
inOrderAbnormal.setActualQuantity(receiptMaterialDetail.getReceiptQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("收货数量大于应收数量,但没有超出超收限制");
|
||||
}else {
|
||||
//收货异常(允许超收 且超出超收比例) 收货数量大于应收数量且超出超收限制
|
||||
inOrderAbnormal.setAbnormalType(5);
|
||||
inOrderAbnormal.setActualQuantity(receiptMaterialDetail.getReceiptQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("收货数量大于应收数量,且超出超收限制");
|
||||
}
|
||||
inOrderAbnormal.setAllowActualQuantity(allowActualQuantity);
|
||||
inOrderAbnormal.setAbnormalActualQuantity(receiptMaterialDetail.getReceiptQuantity().subtract(receiptMaterialDetail.getQuantity()));
|
||||
}else {
|
||||
//收货异常(不允许超收) 收货数量大于应收数量
|
||||
inOrderAbnormal.setAbnormalType(4);
|
||||
inOrderAbnormal.setActualQuantity(receiptMaterialDetail.getReceiptQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("收货数量大于应收数量");
|
||||
}
|
||||
return inOrderAbnormal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 小于创建异常参数
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/24 9:10
|
||||
* @param receiptMaterialDetail
|
||||
* @return InOrderAbnormal
|
||||
*/
|
||||
private InOrderAbnormal lessAbnormalSmallParams(ReceiptMaterialDetail receiptMaterialDetail, InOrderAbnormal inOrderAbnormal){
|
||||
inOrderAbnormal.setAbnormalType(2);
|
||||
inOrderAbnormal.setActualQuantity(receiptMaterialDetail.getReceiptQuantity());
|
||||
inOrderAbnormal.setAbnormalReason("收货数量小于应收数量");
|
||||
return inOrderAbnormal;
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.po.ReceiptMaterialDetailPO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.po.ShelfMaterialDetailPO;
|
||||
import com.mhd.wms.domain.stockInOrder.repository.po.StockInOrderBasePO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 入库异常单对象 in_order_abnormal
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "入库异常单对象", description = "入库异常单响应对象")
|
||||
public class InOrderAbnormalPO extends StockInOrderBasePO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
private Long inOrderAbnormalId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("异常单号")
|
||||
@Excel(name = "异常单号")
|
||||
private String abnormalNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
|
||||
@ApiModelProperty("类型:1-收货 2-上架")
|
||||
@Excel(name = "类型:1-收货 2-上架")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("作业数量")
|
||||
@Excel(name = "作业数量")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("允许超出的作业数量")
|
||||
@Excel(name = "允许超出的作业数量")
|
||||
private BigDecimal allowActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常数量(异常数量 = 作业数量 - 计划数量)")
|
||||
@Excel(name = "异常数量")
|
||||
private BigDecimal abnormalActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常类型: 1-上架异常 2-收货异常 3-收货异常(允许超收没超出超收比例) 4-收货异常(不允许超收)5-收货异常(允许超收但超出超收比例)")
|
||||
@Excel(name = "异常类型: 1-上架异常 2-收货异常 3-收货异常", readConverterExp = "允=许超收但不允许超出超收比例")
|
||||
private Integer abnormalType;
|
||||
|
||||
@ApiModelProperty("异常原因")
|
||||
@Excel(name = "异常原因")
|
||||
private String abnormalReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("收货明细")
|
||||
private List<ReceiptMaterialDetailPO> receiptMaterialDetailList;
|
||||
|
||||
@ApiModelProperty("上架明细")
|
||||
private List<ShelfMaterialDetailPO> shelfMaterialDetailList;
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockBaseDO
|
||||
* @description: TODO
|
||||
* @date 2024/5/23 20:30
|
||||
**/
|
||||
@Data
|
||||
public class InOrderAbnormalBaseDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("类型:1-收货 2-上架")
|
||||
@Excel(name = "类型:1-收货 2-上架")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.stockInOrder.repository.todo.StockInOrderBaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 入库异常单对象 in_order_abnormal
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InOrderAbnormalDO extends StockInOrderBaseDO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
private Long inOrderAbnormalId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("异常单号")
|
||||
@Excel(name = "异常单号")
|
||||
private String abnormalNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
|
||||
@ApiModelProperty("类型:1-收货 2-上架")
|
||||
@Excel(name = "类型:1-收货 2-上架")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("作业数量")
|
||||
@Excel(name = "作业数量")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("允许超出的作业数量")
|
||||
@Excel(name = "允许超出的作业数量")
|
||||
private BigDecimal allowActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常数量(异常数量 = 作业数量 - 计划数量)")
|
||||
@Excel(name = "异常数量")
|
||||
private BigDecimal abnormalActualQuantity;
|
||||
|
||||
@ApiModelProperty("异常类型: 1-上架异常 2-收货异常 3-收货异常(允许超收没超出超收比例) 4-收货异常(不允许超收)5-收货异常(允许超收但超出超收比例)")
|
||||
@Excel(name = "异常类型: 1-上架异常 2-收货异常 3-收货异常", readConverterExp = "允=许超收但不允许超出超收比例")
|
||||
private Integer abnormalType;
|
||||
|
||||
@ApiModelProperty("异常原因")
|
||||
@Excel(name = "异常原因")
|
||||
private String abnormalReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.mhd.wms.domain.inOrderAbnormal.service;
|
||||
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.facade.IInOrderAbnormalService;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.po.InOrderAbnormalPO;
|
||||
import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalDO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.facade.IReceiptMaterialDetailService;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.po.ReceiptMaterialDetailPO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.todo.ReceiptMaterialDetailDO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.facade.IShelfMaterialDetailService;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.po.ShelfMaterialDetailPO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.todo.ShelfMaterialDetailDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库异常单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InOrderAbnormalDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInOrderAbnormalService inOrderAbnormalService;
|
||||
|
||||
@Autowired
|
||||
private IReceiptMaterialDetailService receiptMaterialDetailService;
|
||||
|
||||
@Autowired
|
||||
private IShelfMaterialDetailService shelfMaterialDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询入库异常单列表
|
||||
*/
|
||||
public List<InOrderAbnormalPO> queryList(InOrderAbnormalDO inOrderAbnormalDO) {
|
||||
return inOrderAbnormalService.queryList(inOrderAbnormalDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增入库异常单
|
||||
*/
|
||||
public Boolean insert(InOrderAbnormalDO inOrderAbnormalDO) {
|
||||
|
||||
return inOrderAbnormalService.insert(inOrderAbnormalDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库异常单
|
||||
*/
|
||||
public Boolean update(InOrderAbnormalDO inOrderAbnormalDO) {
|
||||
return inOrderAbnormalService.update(inOrderAbnormalDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库异常单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderAbnormalIds) {
|
||||
return inOrderAbnormalService.delete(inOrderAbnormalIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库上架异常单详细信息
|
||||
*/
|
||||
public InOrderAbnormalPO getInfo(Long inOrderAbnormalId) {
|
||||
InOrderAbnormalPO inOrderAbnormalPO = inOrderAbnormalService.getInfo(inOrderAbnormalId);
|
||||
if (inOrderAbnormalPO.getType() == 1){
|
||||
inOrderAbnormalPO.setReceiptMaterialDetailList(getReceiptInfo(inOrderAbnormalPO.getReceiptOrderNumber()));
|
||||
}else {
|
||||
//根据上架单号查询
|
||||
inOrderAbnormalPO.setShelfMaterialDetailList(getShelfInfo(inOrderAbnormalPO.getShelfOrderNumber()));
|
||||
}
|
||||
return inOrderAbnormalPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库收货异常单详细信息
|
||||
*/
|
||||
public List<ReceiptMaterialDetailPO> getReceiptInfo(String receiptOrderNumber) {
|
||||
//根据收货单号查询
|
||||
ReceiptMaterialDetailDO receiptMaterialDetailDO = new ReceiptMaterialDetailDO();
|
||||
receiptMaterialDetailDO.setReceiptOrderNumber(receiptOrderNumber);
|
||||
return receiptMaterialDetailService.queryListChildren(receiptMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取入库上架异常单详细信息
|
||||
*/
|
||||
public List<ShelfMaterialDetailPO> getShelfInfo(String shelfOrderNumber) {
|
||||
ShelfMaterialDetailDO shelfMaterialDetailDO = new ShelfMaterialDetailDO();
|
||||
//根据上架单号查询
|
||||
shelfMaterialDetailDO.setShelfOrderNumber(shelfOrderNumber);
|
||||
return shelfMaterialDetailService.queryListChildren(shelfMaterialDetailDO);
|
||||
}
|
||||
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 库存调整记录对象 inventory_adjustment_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAdjustmentRecord extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存调整记录id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long inventoryAdjustmentId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("库区id")
|
||||
@Excel(name = "库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("库区编码")
|
||||
@Excel(name = "库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("库区名称")
|
||||
@Excel(name = "库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("库位id")
|
||||
@Excel(name = "库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("库位编码")
|
||||
@Excel(name = "库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("库位名称")
|
||||
@Excel(name = "库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
@Excel(name = "调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
private Long adjustType;
|
||||
|
||||
@ApiModelProperty("调整方向:0:无状态 1:增库存 2:减库存")
|
||||
@Excel(name = "调整方向:0:无状态 1:增库存 2:减库存")
|
||||
private Long adjustDirection;
|
||||
|
||||
@ApiModelProperty("调整前状态编码")
|
||||
@Excel(name = "调整前状态编码")
|
||||
private String adjustBeforeStatusCode;
|
||||
|
||||
@ApiModelProperty("调整前状态名称")
|
||||
@Excel(name = "调整前状态名称")
|
||||
private String adjustBeforeStatusName;
|
||||
|
||||
@ApiModelProperty("调整后状态编码")
|
||||
@Excel(name = "调整后状态编码")
|
||||
private String adjustAfterStatusCode;
|
||||
|
||||
@ApiModelProperty("调整后状态名称")
|
||||
@Excel(name = "调整后状态名称")
|
||||
private String adjustAfterStatusName;
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.po.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.todo.InventoryAdjustmentRecordDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存调整记录Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
public interface IInventoryAdjustmentRecordService extends IService<InventoryAdjustmentRecord>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存调整记录列表
|
||||
*/
|
||||
public List<InventoryAdjustmentRecordPO> queryList(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO);
|
||||
|
||||
/**
|
||||
* 新增库存调整记录
|
||||
*/
|
||||
public Boolean insert(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO);
|
||||
|
||||
/**
|
||||
* 修改库存调整记录
|
||||
*/
|
||||
public Boolean update(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO);
|
||||
|
||||
/**
|
||||
* 批量删除库存调整记录
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryAdjustmentIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存调整记录
|
||||
*/
|
||||
public InventoryAdjustmentRecordPO getInfo(Long inventoryAdjustmentId);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.po.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.todo.InventoryAdjustmentRecordDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存调整记录Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
public interface InventoryAdjustmentRecordMapper extends BaseMapper<InventoryAdjustmentRecord>
|
||||
{
|
||||
/**
|
||||
* 查询库存调整记录列表
|
||||
*/
|
||||
public List<InventoryAdjustmentRecordPO> queryList(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.facade.IInventoryAdjustmentRecordService;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.mapper.InventoryAdjustmentRecordMapper;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.po.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.todo.InventoryAdjustmentRecordDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存调整记录Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
@Service
|
||||
public class InventoryAdjustmentRecordImpl extends ServiceImpl<InventoryAdjustmentRecordMapper, InventoryAdjustmentRecord> implements IInventoryAdjustmentRecordService {
|
||||
@Autowired
|
||||
private InventoryAdjustmentRecordMapper inventoryAdjustmentRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询库存调整记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryAdjustmentRecordPO> queryList(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO)
|
||||
{
|
||||
return inventoryAdjustmentRecordMapper.queryList(inventoryAdjustmentRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存调整记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
|
||||
BeanUtils.copyProperties(inventoryAdjustmentRecordDO,inventoryAdjustmentRecord);
|
||||
return this.save(inventoryAdjustmentRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存调整记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
|
||||
BeanUtils.copyProperties(inventoryAdjustmentRecordDO,inventoryAdjustmentRecord);
|
||||
return this.updateById(inventoryAdjustmentRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存调整记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inventoryAdjustmentIds ) {
|
||||
List<InventoryAdjustmentRecord> list = new ArrayList<>();
|
||||
for (Long id : inventoryAdjustmentIds) {
|
||||
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
|
||||
inventoryAdjustmentRecord.setInventoryAdjustmentId(id);
|
||||
inventoryAdjustmentRecord.setDelFlag(2);
|
||||
list.add(inventoryAdjustmentRecord);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存调整记录
|
||||
*/
|
||||
@Override
|
||||
public InventoryAdjustmentRecordPO getInfo(Long inventoryAdjustmentId) {
|
||||
InventoryAdjustmentRecord inventoryAdjustmentRecord = this.getById(inventoryAdjustmentId);
|
||||
InventoryAdjustmentRecordPO inventoryAdjustmentRecordPO = new InventoryAdjustmentRecordPO();
|
||||
BeanUtils.copyProperties(inventoryAdjustmentRecord,inventoryAdjustmentRecordPO);
|
||||
return inventoryAdjustmentRecordPO;
|
||||
}
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 库存调整记录对象 inventory_adjustment_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存调整记录对象", description = "库存调整记录响应对象")
|
||||
public class InventoryAdjustmentRecordPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存调整记录id")
|
||||
private Long inventoryAdjustmentId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("库区id")
|
||||
@Excel(name = "库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("库区编码")
|
||||
@Excel(name = "库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("库区名称")
|
||||
@Excel(name = "库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("库位id")
|
||||
@Excel(name = "库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("库位编码")
|
||||
@Excel(name = "库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("库位名称")
|
||||
@Excel(name = "库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
@Excel(name = "调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
private Long adjustType;
|
||||
|
||||
@ApiModelProperty("调整方向:0:无状态 1:增库存 2:减库存")
|
||||
@Excel(name = "调整方向:0:无状态 1:增库存 2:减库存")
|
||||
private Long adjustDirection;
|
||||
|
||||
@ApiModelProperty("调整前状态编码")
|
||||
@Excel(name = "调整前状态编码")
|
||||
private String adjustBeforeStatusCode;
|
||||
|
||||
@ApiModelProperty("调整前状态名称")
|
||||
@Excel(name = "调整前状态名称")
|
||||
private String adjustBeforeStatusName;
|
||||
|
||||
@ApiModelProperty("调整后状态编码")
|
||||
@Excel(name = "调整后状态编码")
|
||||
private String adjustAfterStatusCode;
|
||||
|
||||
@ApiModelProperty("调整后状态名称")
|
||||
@Excel(name = "调整后状态名称")
|
||||
private String adjustAfterStatusName;
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存调整记录对象 inventory_adjustment_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAdjustmentRecordDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存调整记录id")
|
||||
private Long inventoryAdjustmentId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("库区id")
|
||||
@Excel(name = "库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("库区编码")
|
||||
@Excel(name = "库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("库区名称")
|
||||
@Excel(name = "库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("库位id")
|
||||
@Excel(name = "库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("库位编码")
|
||||
@Excel(name = "库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("库位名称")
|
||||
@Excel(name = "库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
@Excel(name = "调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
private Long adjustType;
|
||||
|
||||
@ApiModelProperty("调整方向:0:无状态 1:增库存 2:减库存")
|
||||
@Excel(name = "调整方向:0:无状态 1:增库存 2:减库存")
|
||||
private Long adjustDirection;
|
||||
|
||||
@ApiModelProperty("调整前状态编码")
|
||||
@Excel(name = "调整前状态编码")
|
||||
private String adjustBeforeStatusCode;
|
||||
|
||||
@ApiModelProperty("调整前状态名称")
|
||||
@Excel(name = "调整前状态名称")
|
||||
private String adjustBeforeStatusName;
|
||||
|
||||
@ApiModelProperty("调整后状态编码")
|
||||
@Excel(name = "调整后状态编码")
|
||||
private String adjustAfterStatusCode;
|
||||
|
||||
@ApiModelProperty("调整后状态名称")
|
||||
@Excel(name = "调整后状态名称")
|
||||
private String adjustAfterStatusName;
|
||||
|
||||
@ApiModelProperty("调整数量")
|
||||
@Excel(name = "调整数量")
|
||||
private BigDecimal adjustQuantity;
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+348
@@ -0,0 +1,348 @@
|
||||
package com.mhd.wms.domain.inventoryAdjustmentRecord.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.facade.IInventoryAdjustmentRecordService;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.po.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.repository.todo.InventoryAdjustmentRecordDO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.facade.IInventoryStandingDetailService;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.entity.MaterialBaseInfo;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.facade.IMaterialBaseInfoService;
|
||||
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
|
||||
import com.mhd.wms.domain.materialInventory.repository.facade.IMaterialInventoryService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存调整记录
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InventoryAdjustmentRecordDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInventoryAdjustmentRecordService inventoryAdjustmentRecordService;
|
||||
@Autowired
|
||||
private IMaterialInventoryService materialInventoryService;
|
||||
@Autowired
|
||||
private IMaterialBaseInfoService materialBaseInfoService;
|
||||
@Autowired
|
||||
private IInventoryStandingDetailService inventoryStandingDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询库存调整记录列表
|
||||
*/
|
||||
public List<InventoryAdjustmentRecordPO> queryList(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
return inventoryAdjustmentRecordService.queryList(inventoryAdjustmentRecordDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增库存调整记录
|
||||
*/
|
||||
public Boolean insert(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
|
||||
return inventoryAdjustmentRecordService.insert(inventoryAdjustmentRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存调整记录
|
||||
*/
|
||||
public Boolean update(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
return inventoryAdjustmentRecordService.update(inventoryAdjustmentRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存调整记录
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryAdjustmentIds) {
|
||||
return inventoryAdjustmentRecordService.delete(inventoryAdjustmentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存调整记录详细信息
|
||||
*/
|
||||
public InventoryAdjustmentRecordPO getInfo(Long inventoryAdjustmentId)
|
||||
{
|
||||
return inventoryAdjustmentRecordService.getInfo(inventoryAdjustmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:库存调整
|
||||
* @param inventoryAdjustmentRecordDO
|
||||
* @return: java.lang.Boolean
|
||||
* @author: lianzj
|
||||
* @time: 2024-07-18 9:30:30
|
||||
*/
|
||||
@Transactional
|
||||
public Boolean inventoryAdjust(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
InventoryAdjustmentRecordDO inventoryAdjustmentRecord = new InventoryAdjustmentRecordDO();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
inventoryAdjustmentRecord.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inventoryAdjustmentRecord.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inventoryAdjustmentRecord.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
|
||||
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
|
||||
inventoryAdjustmentRecord.setCreateTime(new Date());
|
||||
MaterialInventory materialInventory = null;
|
||||
//根据调整类型判断,数量调整只调整当前库存记录数量,状态调整减少当前原物料状态库存数量和可用数量,增加到现状态库存数量和可用数量
|
||||
if (inventoryAdjustmentRecordDO.getAdjustType() != null && inventoryAdjustmentRecordDO.getAdjustType() == 1) {
|
||||
inventoryAdjustmentRecord.setAdjustType(1L);
|
||||
if (inventoryAdjustmentRecordDO.getMaterialInventoryId() != null) {
|
||||
materialInventory = materialInventoryService.getById(inventoryAdjustmentRecordDO.getMaterialInventoryId());
|
||||
if (ObjectUtil.isNotNull(materialInventory)) {
|
||||
BeanUtils.copyProperties(materialInventory, inventoryAdjustmentRecord);
|
||||
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory.getFreezeQuantity());
|
||||
MaterialBaseInfo materialBaseInfo = materialBaseInfoService.getOne(new QueryWrapper<MaterialBaseInfo>().lambda()
|
||||
.eq(MaterialBaseInfo::getMaterialBaseInfoId,materialInventory.getMaterialBaseInfoId()).eq(BaseVOEntity::getDelFlag,1));
|
||||
if (ObjectUtil.isNotNull(materialBaseInfo)) {
|
||||
inventoryAdjustmentRecord.setMaterialCode(materialBaseInfo.getMaterialCode());
|
||||
inventoryAdjustmentRecord.setMaterialName(materialBaseInfo.getMaterialName());
|
||||
inventoryAdjustmentRecord.setBarCode(materialBaseInfo.getBarCode());
|
||||
inventoryAdjustmentRecord.setShipperId(materialBaseInfo.getShipperId());
|
||||
inventoryAdjustmentRecord.setShipperName(materialBaseInfo.getShipperName());
|
||||
}
|
||||
//根据调整方向判断
|
||||
if (inventoryAdjustmentRecordDO.getAdjustDirection() != null && inventoryAdjustmentRecordDO.getAdjustDirection() == 1) {
|
||||
materialInventory.setInventoryQuantity(materialInventory.getInventoryQuantity().add(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().add(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
|
||||
} else if (inventoryAdjustmentRecordDO.getAdjustDirection() != null && inventoryAdjustmentRecordDO.getAdjustDirection() == 2) {
|
||||
materialInventory.setInventoryQuantity(materialInventory.getInventoryQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
if (materialInventory.getInventoryQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("库存数量调整之后不能小于0");
|
||||
}
|
||||
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("可用数量调整之后不能小于0");
|
||||
}
|
||||
}
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity());
|
||||
} else {
|
||||
throw new ServiceException("根据物料库存id查询不到物料库存信息!");
|
||||
}
|
||||
}
|
||||
} else if (inventoryAdjustmentRecordDO.getAdjustType() != null && inventoryAdjustmentRecordDO.getAdjustType() == 2) {
|
||||
inventoryAdjustmentRecord.setAdjustType(2L);
|
||||
inventoryAdjustmentRecord.setAdjustBeforeStatusCode(inventoryAdjustmentRecordDO.getAdjustBeforeStatusCode());
|
||||
inventoryAdjustmentRecord.setAdjustBeforeStatusName(inventoryAdjustmentRecordDO.getAdjustBeforeStatusName());
|
||||
//根据物料基本信息id,仓库id,库区id,库位id,原物料状态查询
|
||||
materialInventory = materialInventoryService.getOne(new QueryWrapper<MaterialInventory>().lambda()
|
||||
.eq(MaterialInventory::getMaterialInventoryId,inventoryAdjustmentRecordDO.getMaterialInventoryId())
|
||||
.eq(MaterialInventory::getMaterialBaseInfoId,inventoryAdjustmentRecordDO.getMaterialBaseInfoId())
|
||||
.eq(MaterialInventory::getWarehouseId,inventoryAdjustmentRecordDO.getWarehouseId())
|
||||
.eq(MaterialInventory::getStorageSectionId,inventoryAdjustmentRecordDO.getStorageSectionId())
|
||||
.eq(MaterialInventory::getStorageLocationId,inventoryAdjustmentRecordDO.getStorageLocationId())
|
||||
.eq(MaterialInventory::getMaterialStatusCode,inventoryAdjustmentRecordDO.getAdjustBeforeStatusCode())
|
||||
.eq(MaterialInventory::getBatchNumber,inventoryAdjustmentRecordDO.getBatchNumber())
|
||||
.eq(MaterialInventory::getContainerId,inventoryAdjustmentRecordDO.getContainerId())
|
||||
.eq(BaseVOEntity::getDelFlag, 1));
|
||||
if (ObjectUtil.isNotNull(materialInventory)) {
|
||||
BeanUtils.copyProperties(materialInventory, inventoryAdjustmentRecord);
|
||||
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory.getFreezeQuantity());
|
||||
MaterialBaseInfo materialBaseInfo = materialBaseInfoService.getOne(new QueryWrapper<MaterialBaseInfo>().lambda()
|
||||
.eq(MaterialBaseInfo::getMaterialBaseInfoId,materialInventory.getMaterialBaseInfoId()).eq(BaseVOEntity::getDelFlag,1));
|
||||
if (ObjectUtil.isNotNull(materialBaseInfo)) {
|
||||
inventoryAdjustmentRecord.setMaterialCode(materialBaseInfo.getMaterialCode());
|
||||
inventoryAdjustmentRecord.setMaterialName(materialBaseInfo.getMaterialName());
|
||||
inventoryAdjustmentRecord.setBarCode(materialBaseInfo.getBarCode());
|
||||
inventoryAdjustmentRecord.setShipperId(materialBaseInfo.getShipperId());
|
||||
inventoryAdjustmentRecord.setShipperName(materialBaseInfo.getShipperName());
|
||||
}
|
||||
materialInventory.setInventoryQuantity(materialInventory.getInventoryQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
if (materialInventory.getInventoryQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("库存数量调整之后不能小于0");
|
||||
}
|
||||
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("可用数量调整之后不能小于0");
|
||||
}
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity());
|
||||
} else {
|
||||
throw new ServiceException("根据原物料状态查询不到物料库存信息!");
|
||||
}
|
||||
//根据物料基本信息id,仓库id,库区id,库位id,现物料状态查询
|
||||
MaterialInventory materialInventory1 = materialInventoryService.getOne(new QueryWrapper<MaterialInventory>().lambda()
|
||||
.eq(MaterialInventory::getMaterialBaseInfoId,inventoryAdjustmentRecordDO.getMaterialBaseInfoId())
|
||||
.eq(MaterialInventory::getWarehouseId,inventoryAdjustmentRecordDO.getWarehouseId())
|
||||
.eq(MaterialInventory::getStorageSectionId,inventoryAdjustmentRecordDO.getStorageSectionId())
|
||||
.eq(MaterialInventory::getStorageLocationId,inventoryAdjustmentRecordDO.getStorageLocationId())
|
||||
.eq(MaterialInventory::getMaterialStatusCode,inventoryAdjustmentRecordDO.getAdjustAfterStatusCode())
|
||||
.eq(MaterialInventory::getBatchNumber,inventoryAdjustmentRecordDO.getBatchNumber())
|
||||
.eq(MaterialInventory::getContainerId,inventoryAdjustmentRecordDO.getContainerId())
|
||||
.eq(BaseVOEntity::getDelFlag, 1));
|
||||
if (ObjectUtil.isNotNull(materialInventory1)) {
|
||||
materialInventory1.setInventoryQuantity(materialInventory1.getInventoryQuantity().add(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
materialInventory1.setAllocationQuantity(materialInventory1.getAllocationQuantity().add(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
materialInventoryService.updateById(materialInventory1);
|
||||
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory1.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory1.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory1.getFreezeQuantity());
|
||||
} else {
|
||||
throw new ServiceException("根据现物料状态查询不到调整库存库存信息!");
|
||||
}
|
||||
inventoryAdjustmentRecord.setAdjustAfterStatusCode(inventoryAdjustmentRecordDO.getAdjustAfterStatusCode());
|
||||
inventoryAdjustmentRecord.setAdjustAfterStatusName(inventoryAdjustmentRecordDO.getAdjustAfterStatusName());
|
||||
}
|
||||
//生成库存调整追溯记录
|
||||
if (ObjectUtil.isNotNull(materialInventory)){
|
||||
genInventoryStandingDetail(materialInventory, inventoryAdjustmentRecordDO.getAdjustQuantity());
|
||||
}
|
||||
materialInventoryService.updateById(materialInventory);
|
||||
return inventoryAdjustmentRecordService.insert(inventoryAdjustmentRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:库存冻结
|
||||
* @param inventoryAdjustmentRecordDO
|
||||
* @return: java.lang.Boolean
|
||||
* @author: lianzj
|
||||
* @time: 2024-07-18 14:58:50
|
||||
*/
|
||||
@Transactional
|
||||
public Boolean inventoryFrozen(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
InventoryAdjustmentRecordDO inventoryAdjustmentRecord = new InventoryAdjustmentRecordDO();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
inventoryAdjustmentRecord.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inventoryAdjustmentRecord.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inventoryAdjustmentRecord.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
|
||||
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
|
||||
inventoryAdjustmentRecord.setCreateTime(new Date());
|
||||
MaterialInventory materialInventory = materialInventoryService.getById(inventoryAdjustmentRecordDO.getMaterialInventoryId());
|
||||
inventoryAdjustmentRecord.setAdjustType(3L);
|
||||
if (ObjectUtil.isNotNull(materialInventory)) {
|
||||
BeanUtils.copyProperties(materialInventory, inventoryAdjustmentRecord);
|
||||
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory.getFreezeQuantity());
|
||||
MaterialBaseInfo materialBaseInfo = materialBaseInfoService.getOne(new QueryWrapper<MaterialBaseInfo>().lambda()
|
||||
.eq(MaterialBaseInfo::getMaterialBaseInfoId,materialInventory.getMaterialBaseInfoId()).eq(BaseVOEntity::getDelFlag,1));
|
||||
if (ObjectUtil.isNotNull(materialBaseInfo)) {
|
||||
inventoryAdjustmentRecord.setMaterialCode(materialBaseInfo.getMaterialCode());
|
||||
inventoryAdjustmentRecord.setMaterialName(materialBaseInfo.getMaterialName());
|
||||
inventoryAdjustmentRecord.setBarCode(materialBaseInfo.getBarCode());
|
||||
inventoryAdjustmentRecord.setShipperId(materialBaseInfo.getShipperId());
|
||||
inventoryAdjustmentRecord.setShipperName(materialBaseInfo.getShipperName());
|
||||
}
|
||||
//可用数量减,冻结数量加
|
||||
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
materialInventory.setFreezeQuantity(materialInventory.getFreezeQuantity().add(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("冻结可用数量不能小于0");
|
||||
}
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity());
|
||||
} else {
|
||||
throw new ServiceException("根据物料库存id查询不到物料库存信息!");
|
||||
}
|
||||
materialInventoryService.updateById(materialInventory);
|
||||
return inventoryAdjustmentRecordService.insert(inventoryAdjustmentRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:库存冻结,根据禅道BUG8000,重新编写:http://chandao.manhuoda.com/bug-view-8000.html?tid=0nj582b2
|
||||
* @param inventoryAdjustmentRecordDO
|
||||
* @return: java.lang.Boolean
|
||||
* @author: lianzj
|
||||
* @time: 2024-07-18 14:58:50
|
||||
*/
|
||||
@Transactional
|
||||
public Boolean inventoryFrozenForAll(InventoryAdjustmentRecordDO inventoryAdjustmentRecordDO) {
|
||||
InventoryAdjustmentRecordDO inventoryAdjustmentRecord = new InventoryAdjustmentRecordDO();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
inventoryAdjustmentRecord.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inventoryAdjustmentRecord.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inventoryAdjustmentRecord.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
|
||||
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
|
||||
inventoryAdjustmentRecord.setCreateTime(new Date());
|
||||
MaterialInventory materialInventory = materialInventoryService.getById(inventoryAdjustmentRecordDO.getMaterialInventoryId());
|
||||
inventoryAdjustmentRecord.setAdjustType(3L);
|
||||
if (ObjectUtil.isNotNull(materialInventory)) {
|
||||
BeanUtils.copyProperties(materialInventory, inventoryAdjustmentRecord);
|
||||
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory.getFreezeQuantity());
|
||||
MaterialBaseInfo materialBaseInfo = materialBaseInfoService.getOne(new QueryWrapper<MaterialBaseInfo>().lambda()
|
||||
.eq(MaterialBaseInfo::getMaterialBaseInfoId,materialInventory.getMaterialBaseInfoId()).eq(BaseVOEntity::getDelFlag,1));
|
||||
if (ObjectUtil.isNotNull(materialBaseInfo)) {
|
||||
inventoryAdjustmentRecord.setMaterialCode(materialBaseInfo.getMaterialCode());
|
||||
inventoryAdjustmentRecord.setMaterialName(materialBaseInfo.getMaterialName());
|
||||
inventoryAdjustmentRecord.setBarCode(materialBaseInfo.getBarCode());
|
||||
inventoryAdjustmentRecord.setShipperId(materialBaseInfo.getShipperId());
|
||||
inventoryAdjustmentRecord.setShipperName(materialBaseInfo.getShipperName());
|
||||
}
|
||||
//可用数量减,冻结数量加
|
||||
materialInventory.setAllocationQuantity(materialInventory.getInventoryQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
|
||||
materialInventory.setFreezeQuantity(inventoryAdjustmentRecordDO.getAdjustQuantity());
|
||||
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("冻结可用数量不能小于0");
|
||||
}
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity());
|
||||
} else {
|
||||
throw new ServiceException("根据物料库存id查询不到物料库存信息!");
|
||||
}
|
||||
materialInventoryService.updateById(materialInventory);
|
||||
return inventoryAdjustmentRecordService.insert(inventoryAdjustmentRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 生成库存调整追溯记录
|
||||
* @author ZhouGY
|
||||
* @date 2024/7/27 14:19
|
||||
* @param materialInventory
|
||||
* @param adjustQuantity
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void genInventoryStandingDetail(MaterialInventory materialInventory, BigDecimal adjustQuantity){
|
||||
MaterialBaseInfo materialBaseInfo = materialBaseInfoService.getById(materialInventory.getMaterialBaseInfoId());
|
||||
if (ObjectUtil.isNull(materialInventory)){
|
||||
throw new ServiceException("物料基础信息不存在");
|
||||
}
|
||||
//生成追溯记录
|
||||
InventoryStandingDetailDO inventoryStandingDetailDO = new InventoryStandingDetailDO();
|
||||
inventoryStandingDetailDO.setOrganizationId(materialInventory.getOrganizationId());
|
||||
inventoryStandingDetailDO.setOrganizationName(materialInventory.getOrganizationName());
|
||||
inventoryStandingDetailDO.setTopOrganizationId(materialInventory.getTopOrganizationId());
|
||||
inventoryStandingDetailDO.setMaterialCode(materialBaseInfo.getMaterialCode());
|
||||
inventoryStandingDetailDO.setMaterialName(materialBaseInfo.getMaterialName());
|
||||
inventoryStandingDetailDO.setMaterialBarCode(materialBaseInfo.getBarCode());
|
||||
inventoryStandingDetailDO.setTrackingNumber("");
|
||||
inventoryStandingDetailDO.setWarehouseId(materialInventory.getWarehouseId());
|
||||
inventoryStandingDetailDO.setWarehouseCode(materialInventory.getWarehouseCode());
|
||||
inventoryStandingDetailDO.setWarehouseName(materialInventory.getWarehouseName());
|
||||
inventoryStandingDetailDO.setNodeStatus(6);
|
||||
inventoryStandingDetailDO.setMaterialQuantity(adjustQuantity);
|
||||
inventoryStandingDetailService.batchInsert(Collections.singletonList(inventoryStandingDetailDO));
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 库存分配规则对象 inventory_allocation_rule
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAllocationRule extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("规则编码")
|
||||
@Excel(name = "规则编码")
|
||||
private String ruleNum;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("启用状态;0启用1停用")
|
||||
@Excel(name = "启用状态;0启用1停用")
|
||||
private Integer enabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.entity.InventoryAllocationRule;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.po.InventoryAllocationRulePO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.todo.InventoryAllocationRuleDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存分配规则Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface IInventoryAllocationRuleService extends IService<InventoryAllocationRule>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存分配规则列表
|
||||
*/
|
||||
public List<InventoryAllocationRulePO> queryList(InventoryAllocationRuleDO inventoryAllocationRuleDO);
|
||||
|
||||
/**
|
||||
* 新增库存分配规则
|
||||
*/
|
||||
public Boolean insert(InventoryAllocationRuleDO inventoryAllocationRuleDO);
|
||||
|
||||
/**
|
||||
* 修改库存分配规则
|
||||
*/
|
||||
public Boolean update(InventoryAllocationRuleDO inventoryAllocationRuleDO);
|
||||
|
||||
/**
|
||||
* 批量删除库存分配规则
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存分配规则
|
||||
*/
|
||||
public InventoryAllocationRulePO getInfo(Long id);
|
||||
|
||||
Long insertToId(InventoryAllocationRuleDO inventoryAllocationRuleDO);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.entity.InventoryAllocationRule;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.po.InventoryAllocationRulePO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.todo.InventoryAllocationRuleDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存分配规则Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface InventoryAllocationRuleMapper extends BaseMapper<InventoryAllocationRule>
|
||||
{
|
||||
/**
|
||||
* 查询库存分配规则列表
|
||||
*/
|
||||
public List<InventoryAllocationRulePO> queryList(InventoryAllocationRuleDO inventoryAllocationRuleDO);
|
||||
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.entity.InventoryAllocationRule;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.facade.IInventoryAllocationRuleService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.mapper.InventoryAllocationRuleMapper;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.po.InventoryAllocationRulePO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.todo.InventoryAllocationRuleDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存分配规则Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
@Service
|
||||
public class InventoryAllocationRuleImpl extends ServiceImpl<InventoryAllocationRuleMapper, InventoryAllocationRule> implements IInventoryAllocationRuleService{
|
||||
@Autowired
|
||||
private InventoryAllocationRuleMapper inventoryAllocationRuleMapper;
|
||||
|
||||
/**
|
||||
* 查询库存分配规则列表
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryAllocationRulePO> queryList(InventoryAllocationRuleDO inventoryAllocationRuleDO)
|
||||
{
|
||||
return inventoryAllocationRuleMapper.queryList(inventoryAllocationRuleDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存分配规则
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
InventoryAllocationRule inventoryAllocationRule = new InventoryAllocationRule();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDO,inventoryAllocationRule);
|
||||
return this.save(inventoryAllocationRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存分配规则
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
InventoryAllocationRule inventoryAllocationRule = new InventoryAllocationRule();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDO,inventoryAllocationRule);
|
||||
return this.updateById(inventoryAllocationRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存分配规则
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] ids ) {
|
||||
List<InventoryAllocationRule> list = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
InventoryAllocationRule inventoryAllocationRule = new InventoryAllocationRule();
|
||||
inventoryAllocationRule.setId(id);
|
||||
inventoryAllocationRule.setDelFlag(2);
|
||||
list.add(inventoryAllocationRule);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存分配规则
|
||||
*/
|
||||
@Override
|
||||
public InventoryAllocationRulePO getInfo(Long id) {
|
||||
InventoryAllocationRule inventoryAllocationRule = this.getById(id);
|
||||
InventoryAllocationRulePO inventoryAllocationRulePO = new InventoryAllocationRulePO();
|
||||
BeanUtils.copyProperties(inventoryAllocationRule,inventoryAllocationRulePO);
|
||||
return inventoryAllocationRulePO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long insertToId(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
InventoryAllocationRule inventoryAllocationRule = new InventoryAllocationRule();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDO,inventoryAllocationRule);
|
||||
this.save(inventoryAllocationRule);
|
||||
|
||||
return inventoryAllocationRule.getId();
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po.InventoryAllocationRuleDetailPO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存分配规则对象 inventory_allocation_rule
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存分配规则对象", description = "库存分配规则响应对象")
|
||||
public class InventoryAllocationRulePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("规则编码")
|
||||
@Excel(name = "规则编码")
|
||||
private String ruleNum;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("启用状态;0启用1停用")
|
||||
@Excel(name = "启用状态;0启用1停用")
|
||||
private Integer enabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("库存分配规则明细")
|
||||
private List<InventoryAllocationRuleDetailPO> inventoryAllocationRuleDetailList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo.InventoryAllocationRuleDetailDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存分配规则对象 inventory_allocation_rule
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAllocationRuleDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("规则编码")
|
||||
@Excel(name = "规则编码")
|
||||
private String ruleNum;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("启用状态;0启用1停用")
|
||||
@Excel(name = "启用状态;0启用1停用")
|
||||
private Integer enabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "库存分配规则明细")
|
||||
private List<InventoryAllocationRuleDetailDO> inventoryAllocationRuleDetailDOS;
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRule.service;
|
||||
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.facade.IInventoryAllocationRuleService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.po.InventoryAllocationRulePO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRule.repository.todo.InventoryAllocationRuleDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存分配规则
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InventoryAllocationRuleDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInventoryAllocationRuleService inventoryAllocationRuleService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询库存分配规则列表
|
||||
*/
|
||||
public List<InventoryAllocationRulePO> queryList(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
return inventoryAllocationRuleService.queryList(inventoryAllocationRuleDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增库存分配规则
|
||||
*/
|
||||
public Boolean insert(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
|
||||
return inventoryAllocationRuleService.insert(inventoryAllocationRuleDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存分配规则
|
||||
*/
|
||||
public Boolean update(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
return inventoryAllocationRuleService.update(inventoryAllocationRuleDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存分配规则
|
||||
*/
|
||||
public Boolean delete(Long[] ids) {
|
||||
return inventoryAllocationRuleService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存分配规则详细信息
|
||||
*/
|
||||
public InventoryAllocationRulePO getInfo(Long id)
|
||||
{
|
||||
return inventoryAllocationRuleService.getInfo(id);
|
||||
}
|
||||
|
||||
|
||||
public Long insertToId(InventoryAllocationRuleDO inventoryAllocationRuleDO) {
|
||||
return inventoryAllocationRuleService.insertToId(inventoryAllocationRuleDO);
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 库存规则分配明细对象 inventory_allocation_rule_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAllocationRuleDetail extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("库存分配表ID")
|
||||
@Excel(name = "库存分配表ID")
|
||||
private Long inventoryAllocationRuleId;
|
||||
|
||||
@ApiModelProperty("库位种类ID")
|
||||
@Excel(name = "库位种类ID")
|
||||
private String locationKindId;
|
||||
|
||||
@ApiModelProperty("库位种类")
|
||||
@Excel(name = "库位种类")
|
||||
private String locationKind;
|
||||
|
||||
@ApiModelProperty("库位分类ID")
|
||||
@Excel(name = "库位分类ID")
|
||||
private String locationTypeId;
|
||||
|
||||
@ApiModelProperty("库位分类")
|
||||
@Excel(name = "库位分类")
|
||||
private String locationType;
|
||||
|
||||
@ApiModelProperty("混放策略ID")
|
||||
@Excel(name = "混放策略ID")
|
||||
private String mixingSlgId;
|
||||
|
||||
@ApiModelProperty("混放策略")
|
||||
@Excel(name = "混放策略")
|
||||
private String mixingSlg;
|
||||
|
||||
@ApiModelProperty("物料状态ID")
|
||||
@Excel(name = "物料状态ID")
|
||||
private String materialStatusId;
|
||||
|
||||
@ApiModelProperty("物料状态")
|
||||
@Excel(name = "物料状态")
|
||||
private String materialStatus;
|
||||
|
||||
@ApiModelProperty("优先级")
|
||||
@Excel(name = "优先级")
|
||||
private Long seqNum;
|
||||
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.entity.InventoryAllocationRuleDetail;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po.InventoryAllocationRuleDetailPO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo.InventoryAllocationRuleDetailDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存规则分配明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface IInventoryAllocationRuleDetailService extends IService<InventoryAllocationRuleDetail>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存规则分配明细列表
|
||||
*/
|
||||
public List<InventoryAllocationRuleDetailPO> queryList(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO);
|
||||
|
||||
/**
|
||||
* 新增库存规则分配明细
|
||||
*/
|
||||
public Boolean insert(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO);
|
||||
|
||||
/**
|
||||
* 修改库存规则分配明细
|
||||
*/
|
||||
public Boolean update(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO);
|
||||
|
||||
/**
|
||||
* 批量删除库存规则分配明细
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存规则分配明细
|
||||
*/
|
||||
public InventoryAllocationRuleDetailPO getInfo(Long id);
|
||||
|
||||
Long[] selectIdsByInventoryAllocationRuleId(Long id);
|
||||
|
||||
Boolean batchInsert(List<InventoryAllocationRuleDetailDO> inventoryAllocationRuleDetailDOS);
|
||||
|
||||
List<InventoryAllocationRuleDetailPO> selectListByInventoryAllocationRuleId(Long id);
|
||||
|
||||
Long[] selectIdsByInventoryAllocationRuleIds(Long[] ids);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.entity.InventoryAllocationRuleDetail;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po.InventoryAllocationRuleDetailPO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo.InventoryAllocationRuleDetailDO;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存规则分配明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface InventoryAllocationRuleDetailMapper extends BaseMapper<InventoryAllocationRuleDetail>
|
||||
{
|
||||
/**
|
||||
* 查询库存规则分配明细列表
|
||||
*/
|
||||
public List<InventoryAllocationRuleDetailPO> queryList(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO);
|
||||
|
||||
@Select("select id from inventory_allocation_rule_detail where del_flag = 1 and inventory_allocation_rule_id = #{id}")
|
||||
Long[] selectIdsByInventoryAllocationRuleId(Long id);
|
||||
|
||||
List<InventoryAllocationRuleDetailPO> selectListByInventoryAllocationRuleId(Long id);
|
||||
|
||||
Long[] selectIdsByInventoryAllocationRuleIds(Long[] ids);
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.entity.InventoryAllocationRuleDetail;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.facade.IInventoryAllocationRuleDetailService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.mapper.InventoryAllocationRuleDetailMapper;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po.InventoryAllocationRuleDetailPO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo.InventoryAllocationRuleDetailDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 库存规则分配明细Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
@Service
|
||||
public class InventoryAllocationRuleDetailImpl extends ServiceImpl<InventoryAllocationRuleDetailMapper, InventoryAllocationRuleDetail> implements IInventoryAllocationRuleDetailService {
|
||||
@Autowired
|
||||
private InventoryAllocationRuleDetailMapper inventoryAllocationRuleDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询库存规则分配明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryAllocationRuleDetailPO> queryList(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO)
|
||||
{
|
||||
return inventoryAllocationRuleDetailMapper.queryList(inventoryAllocationRuleDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存规则分配明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO) {
|
||||
InventoryAllocationRuleDetail inventoryAllocationRuleDetail = new InventoryAllocationRuleDetail();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDetailDO,inventoryAllocationRuleDetail);
|
||||
return this.save(inventoryAllocationRuleDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存规则分配明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO) {
|
||||
InventoryAllocationRuleDetail inventoryAllocationRuleDetail = new InventoryAllocationRuleDetail();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDetailDO,inventoryAllocationRuleDetail);
|
||||
return this.updateById(inventoryAllocationRuleDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存规则分配明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] ids ) {
|
||||
List<InventoryAllocationRuleDetail> list = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
InventoryAllocationRuleDetail inventoryAllocationRuleDetail = new InventoryAllocationRuleDetail();
|
||||
inventoryAllocationRuleDetail.setId(id);
|
||||
inventoryAllocationRuleDetail.setDelFlag(2);
|
||||
list.add(inventoryAllocationRuleDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存规则分配明细
|
||||
*/
|
||||
@Override
|
||||
public InventoryAllocationRuleDetailPO getInfo(Long id) {
|
||||
InventoryAllocationRuleDetail inventoryAllocationRuleDetail = this.getById(id);
|
||||
InventoryAllocationRuleDetailPO inventoryAllocationRuleDetailPO = new InventoryAllocationRuleDetailPO();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDetail,inventoryAllocationRuleDetailPO);
|
||||
return inventoryAllocationRuleDetailPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long[] selectIdsByInventoryAllocationRuleId(Long id) {
|
||||
return inventoryAllocationRuleDetailMapper.selectIdsByInventoryAllocationRuleId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchInsert(List<InventoryAllocationRuleDetailDO> inventoryAllocationRuleDetailDOS) {
|
||||
List<InventoryAllocationRuleDetail> inventoryAllocationRuleDetails = inventoryAllocationRuleDetailDOS.stream().map(inventoryAllocationRuleDetailDO -> {
|
||||
InventoryAllocationRuleDetail inventoryAllocationRuleDetail = new InventoryAllocationRuleDetail();
|
||||
BeanUtils.copyProperties(inventoryAllocationRuleDetailDO, inventoryAllocationRuleDetail);
|
||||
return inventoryAllocationRuleDetail;
|
||||
}).collect(Collectors.toList());
|
||||
return this.saveBatch(inventoryAllocationRuleDetails);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventoryAllocationRuleDetailPO> selectListByInventoryAllocationRuleId(Long id) {
|
||||
return inventoryAllocationRuleDetailMapper.selectListByInventoryAllocationRuleId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long[] selectIdsByInventoryAllocationRuleIds(Long[] ids) {
|
||||
return inventoryAllocationRuleDetailMapper.selectIdsByInventoryAllocationRuleIds(ids);
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 库存规则分配明细对象 inventory_allocation_rule_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存规则分配明细对象", description = "库存规则分配明细响应对象")
|
||||
public class InventoryAllocationRuleDetailPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("库存分配表ID")
|
||||
@Excel(name = "库存分配表ID")
|
||||
private Long inventoryAllocationRuleId;
|
||||
|
||||
@ApiModelProperty("库位种类ID")
|
||||
@Excel(name = "库位种类ID")
|
||||
private String locationKindId;
|
||||
|
||||
@ApiModelProperty("库位种类")
|
||||
@Excel(name = "库位种类")
|
||||
private String locationKind;
|
||||
|
||||
@ApiModelProperty("库位分类ID")
|
||||
@Excel(name = "库位分类ID")
|
||||
private String locationTypeId;
|
||||
|
||||
@ApiModelProperty("库位分类")
|
||||
@Excel(name = "库位分类")
|
||||
private String locationType;
|
||||
|
||||
@ApiModelProperty("混放策略ID")
|
||||
@Excel(name = "混放策略ID")
|
||||
private String mixingSlgId;
|
||||
|
||||
@ApiModelProperty("混放策略")
|
||||
@Excel(name = "混放策略")
|
||||
private String mixingSlg;
|
||||
|
||||
@ApiModelProperty("物料状态ID")
|
||||
@Excel(name = "物料状态ID")
|
||||
private String materialStatusId;
|
||||
|
||||
@ApiModelProperty("物料状态")
|
||||
@Excel(name = "物料状态")
|
||||
private String materialStatus;
|
||||
|
||||
@ApiModelProperty("优先级")
|
||||
@Excel(name = "优先级")
|
||||
private Long seqNum;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存规则分配明细对象 inventory_allocation_rule_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryAllocationRuleDetailDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("库存分配表ID")
|
||||
@Excel(name = "库存分配表ID")
|
||||
private Long inventoryAllocationRuleId;
|
||||
|
||||
@ApiModelProperty("库位种类ID")
|
||||
@Excel(name = "库位种类ID")
|
||||
private String locationKindId;
|
||||
|
||||
@ApiModelProperty("库位种类")
|
||||
@Excel(name = "库位种类")
|
||||
private String locationKind;
|
||||
|
||||
@ApiModelProperty("库位分类ID")
|
||||
@Excel(name = "库位分类ID")
|
||||
private String locationTypeId;
|
||||
|
||||
@ApiModelProperty("库位分类")
|
||||
@Excel(name = "库位分类")
|
||||
private String locationType;
|
||||
|
||||
@ApiModelProperty("混放策略ID")
|
||||
@Excel(name = "混放策略ID")
|
||||
private String mixingSlgId;
|
||||
|
||||
@ApiModelProperty("混放策略")
|
||||
@Excel(name = "混放策略")
|
||||
private String mixingSlg;
|
||||
|
||||
@ApiModelProperty("物料状态ID")
|
||||
@Excel(name = "物料状态ID")
|
||||
private String materialStatusId;
|
||||
|
||||
@ApiModelProperty("物料状态")
|
||||
@Excel(name = "物料状态")
|
||||
private String materialStatus;
|
||||
|
||||
@ApiModelProperty("优先级")
|
||||
@Excel(name = "优先级")
|
||||
private Long seqNum;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.wms.domain.inventoryAllocationRuleDetail.service;
|
||||
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.facade.IInventoryAllocationRuleDetailService;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.po.InventoryAllocationRuleDetailPO;
|
||||
import com.mhd.wms.domain.inventoryAllocationRuleDetail.repository.todo.InventoryAllocationRuleDetailDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存规则分配明细
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InventoryAllocationRuleDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInventoryAllocationRuleDetailService inventoryAllocationRuleDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询库存规则分配明细列表
|
||||
*/
|
||||
public List<InventoryAllocationRuleDetailPO> queryList(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO) {
|
||||
return inventoryAllocationRuleDetailService.queryList(inventoryAllocationRuleDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增库存规则分配明细
|
||||
*/
|
||||
public Boolean insert(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO) {
|
||||
|
||||
return inventoryAllocationRuleDetailService.insert(inventoryAllocationRuleDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存规则分配明细
|
||||
*/
|
||||
public Boolean update(InventoryAllocationRuleDetailDO inventoryAllocationRuleDetailDO) {
|
||||
return inventoryAllocationRuleDetailService.update(inventoryAllocationRuleDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存规则分配明细
|
||||
*/
|
||||
public Boolean delete(Long[] ids) {
|
||||
return inventoryAllocationRuleDetailService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存规则分配明细详细信息
|
||||
*/
|
||||
public InventoryAllocationRuleDetailPO getInfo(Long id)
|
||||
{
|
||||
return inventoryAllocationRuleDetailService.getInfo(id);
|
||||
}
|
||||
|
||||
|
||||
public Long[] selectIdsByInventoryAllocationRuleId(Long id) {
|
||||
return inventoryAllocationRuleDetailService.selectIdsByInventoryAllocationRuleId(id);
|
||||
}
|
||||
|
||||
public Boolean batchInsert(List<InventoryAllocationRuleDetailDO> inventoryAllocationRuleDetailDOS) {
|
||||
return inventoryAllocationRuleDetailService.batchInsert(inventoryAllocationRuleDetailDOS);
|
||||
}
|
||||
|
||||
public List<InventoryAllocationRuleDetailPO> selectListByInventoryAllocationRuleId(Long id) {
|
||||
return inventoryAllocationRuleDetailService.selectListByInventoryAllocationRuleId(id);
|
||||
|
||||
}
|
||||
|
||||
public Long[] selectIdsByInventoryAllocationRuleIds(Long[] ids) {
|
||||
return inventoryAllocationRuleDetailService.selectIdsByInventoryAllocationRuleIds(ids);
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情对象 inventory_standing_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryStandingDetail extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long inventoryStandingDetailId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String materialBarCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主名称编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.entity.InventoryStandingDetail;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.po.InventoryStandingDetailPO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.statementStatistics.po.WarehousingReportPO;
|
||||
import com.mhd.wms.domain.statementStatistics.todo.WarehousingReportDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
public interface IInventoryStandingDetailService extends IService<InventoryStandingDetail>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存台账追溯详情列表
|
||||
*/
|
||||
public List<InventoryStandingDetailPO> queryList(InventoryStandingDetailDO inventoryStandingDetailDO);
|
||||
|
||||
/**
|
||||
* 批量新增库存台账追溯详情
|
||||
*/
|
||||
public Boolean batchInsert(List<InventoryStandingDetailDO> inventoryStandingDetailDOList);
|
||||
|
||||
/**
|
||||
* 批量删除库存台账追溯详情
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryStandingDetailIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存台账追溯详情
|
||||
*/
|
||||
public InventoryStandingDetailPO getInfo(Long inventoryStandingDetailId);
|
||||
|
||||
/**
|
||||
* 分页查询入库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingReportList(WarehousingReportDO warehousingReportDO);
|
||||
/**
|
||||
* 分页查询出库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryOutboundReportList(WarehousingReportDO warehousingReportDO);
|
||||
|
||||
/**
|
||||
* 分页查询出进出存合并报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingAndOutboundReportList(WarehousingReportDO warehousingReportDO);
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.entity.InventoryStandingDetail;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.po.InventoryStandingDetailPO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.statementStatistics.po.WarehousingReportPO;
|
||||
import com.mhd.wms.domain.statementStatistics.todo.WarehousingReportDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
public interface InventoryStandingDetailMapper extends BaseMapper<InventoryStandingDetail>
|
||||
{
|
||||
/**
|
||||
* 查询库存台账追溯详情列表
|
||||
*/
|
||||
public List<InventoryStandingDetailPO> queryList(InventoryStandingDetailDO inventoryStandingDetailDO);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询入库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingReportList(WarehousingReportDO warehousingReportDO);
|
||||
|
||||
/**
|
||||
* 分页查询出库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryOutboundReportList(WarehousingReportDO warehousingReportDO);/**
|
||||
* 分页查询出进出存合并报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingAndOutboundReportList(WarehousingReportDO warehousingReportDO);
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.entity.InventoryStandingDetail;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.facade.IInventoryStandingDetailService;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.mapper.InventoryStandingDetailMapper;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.po.InventoryStandingDetailPO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.statementStatistics.po.WarehousingReportPO;
|
||||
import com.mhd.wms.domain.statementStatistics.todo.WarehousingReportDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
@Service
|
||||
public class InventoryStandingDetailImpl extends ServiceImpl<InventoryStandingDetailMapper, InventoryStandingDetail> implements IInventoryStandingDetailService {
|
||||
@Autowired
|
||||
private InventoryStandingDetailMapper inventoryStandingDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询库存台账追溯详情列表
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryStandingDetailPO> queryList(InventoryStandingDetailDO inventoryStandingDetailDO)
|
||||
{
|
||||
return inventoryStandingDetailMapper.queryList(inventoryStandingDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存台账追溯详情
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchInsert(List<InventoryStandingDetailDO> inventoryStandingDetailDOList) {
|
||||
//生成追溯记录
|
||||
List<InventoryStandingDetail> inventoryStandingDetailList = new ArrayList<>();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
for (InventoryStandingDetailDO inventoryStandingDetailDO : inventoryStandingDetailDOList){
|
||||
InventoryStandingDetail inventoryStandingDetail = new InventoryStandingDetail();
|
||||
BeanUtils.copyProperties(inventoryStandingDetailDO, inventoryStandingDetail);
|
||||
inventoryStandingDetail.setCreateBy(loginUser.getUserid());
|
||||
inventoryStandingDetail.setCreateByName(loginUser.getUsername());
|
||||
inventoryStandingDetail.setCreateTime(new Date());
|
||||
inventoryStandingDetailList.add(inventoryStandingDetail);
|
||||
}
|
||||
return saveBatch(inventoryStandingDetailList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除库存台账追溯详情
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inventoryStandingDetailIds ) {
|
||||
List<InventoryStandingDetail> list = new ArrayList<>();
|
||||
for (Long id : inventoryStandingDetailIds) {
|
||||
InventoryStandingDetail inventoryStandingDetail = new InventoryStandingDetail();
|
||||
inventoryStandingDetail.setInventoryStandingDetailId(id);
|
||||
inventoryStandingDetail.setDelFlag(2);
|
||||
list.add(inventoryStandingDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存台账追溯详情
|
||||
*/
|
||||
@Override
|
||||
public InventoryStandingDetailPO getInfo(Long inventoryStandingDetailId) {
|
||||
InventoryStandingDetail inventoryStandingDetail = this.getById(inventoryStandingDetailId);
|
||||
InventoryStandingDetailPO inventoryStandingDetailPO = new InventoryStandingDetailPO();
|
||||
BeanUtils.copyProperties(inventoryStandingDetail,inventoryStandingDetailPO);
|
||||
return inventoryStandingDetailPO;
|
||||
}
|
||||
/**
|
||||
* 分页查询入库日报表列表
|
||||
*/
|
||||
@Override
|
||||
public List<WarehousingReportPO> queryWarehousingReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailMapper.queryWarehousingReportList(warehousingReportDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询出库日报表列表
|
||||
*/
|
||||
@Override
|
||||
public List<WarehousingReportPO> queryOutboundReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailMapper.queryOutboundReportList(warehousingReportDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WarehousingReportPO> queryWarehousingAndOutboundReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailMapper.queryWarehousingAndOutboundReportList(warehousingReportDO);
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情对象 inventory_standing_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存台账追溯详情对象", description = "库存台账追溯详情响应对象")
|
||||
public class InventoryStandingDetailPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
private Long inventoryStandingDetailId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String materialBarCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主名称编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情对象 inventory_standing_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryStandingDetailDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
private Long inventoryStandingDetailId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String materialBarCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主名称编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String trackingNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.mhd.wms.domain.inventoryStandingDetail.service;
|
||||
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.facade.IInventoryStandingDetailService;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.po.InventoryStandingDetailPO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.statementStatistics.po.WarehousingReportPO;
|
||||
import com.mhd.wms.domain.statementStatistics.todo.WarehousingReportDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账追溯详情
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-13
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InventoryStandingDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInventoryStandingDetailService inventoryStandingDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询库存台账追溯详情列表
|
||||
*/
|
||||
public List<InventoryStandingDetailPO> queryList(InventoryStandingDetailDO inventoryStandingDetailDO) {
|
||||
return inventoryStandingDetailService.queryList(inventoryStandingDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存台账追溯详情
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryStandingDetailIds) {
|
||||
return inventoryStandingDetailService.delete(inventoryStandingDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存台账追溯详情详细信息
|
||||
*/
|
||||
public InventoryStandingDetailPO getInfo(Long inventoryStandingDetailId)
|
||||
{
|
||||
return inventoryStandingDetailService.getInfo(inventoryStandingDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询入库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailService.queryWarehousingReportList(warehousingReportDO);
|
||||
}
|
||||
/**
|
||||
* 分页查询出库日报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryOutboundReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailService.queryOutboundReportList(warehousingReportDO);
|
||||
}
|
||||
/**
|
||||
* 分页查询出进出存合并报表列表
|
||||
*/
|
||||
public List<WarehousingReportPO> queryWarehousingAndOutboundReportList(WarehousingReportDO warehousingReportDO) {
|
||||
return inventoryStandingDetailService.queryWarehousingAndOutboundReportList(warehousingReportDO);
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账报对象 inventory_standing_report
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryStandingReport extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long inventoryStandingId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主名称编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.entity.InventoryStandingReport;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.todo.InventoryStandingReportDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账报Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
public interface IInventoryStandingReportService extends IService<InventoryStandingReport>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存台账报列表
|
||||
*/
|
||||
public List<InventoryStandingReportPO> queryList(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
|
||||
/**
|
||||
* 新增库存台账报
|
||||
*/
|
||||
public Boolean insert(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
|
||||
/**
|
||||
* 修改库存台账报
|
||||
*/
|
||||
public Boolean update(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
|
||||
/**
|
||||
* 批量删除库存台账报
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryStandingIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存台账报
|
||||
*/
|
||||
public InventoryStandingReportPO getInfo(Long inventoryStandingId);
|
||||
|
||||
public InventoryStandingReportPO getInventoryStandingInfo(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.entity.InventoryStandingReport;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingDetailReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.todo.InventoryStandingReportDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账报Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
public interface InventoryStandingReportMapper extends BaseMapper<InventoryStandingReport>
|
||||
{
|
||||
/**
|
||||
* 查询库存台账报列表
|
||||
*/
|
||||
public List<InventoryStandingReportPO> queryList(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
|
||||
public List<InventoryStandingReportPO> queryListForRealTime(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
public List<InventoryStandingDetailReportPO> getInfoForReceipt(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
public List<InventoryStandingDetailReportPO> getInfoForShelf(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
public List<InventoryStandingDetailReportPO> getInfoForPick(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
public List<InventoryStandingDetailReportPO> getInfoForReCheck(InventoryStandingReportDO inventoryStandingReportDO);
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.entity.InventoryStandingReport;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.facade.IInventoryStandingReportService;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.mapper.InventoryStandingReportMapper;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingDetailReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.todo.InventoryStandingReportDO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.mapper.ReceiptMaterialDetailMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账报Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
@Service
|
||||
public class InventoryStandingReportImpl extends ServiceImpl<InventoryStandingReportMapper, InventoryStandingReport> implements IInventoryStandingReportService{
|
||||
@Autowired
|
||||
private InventoryStandingReportMapper inventoryStandingReportMapper;
|
||||
// @Autowired
|
||||
// private InventoryStandingDetailMapper inventoryStandingDetailMapper;
|
||||
@Autowired
|
||||
private ReceiptMaterialDetailMapper receiptMaterialDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询库存台账报列表
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryStandingReportPO> queryList(InventoryStandingReportDO inventoryStandingReportDO)
|
||||
{
|
||||
return inventoryStandingReportMapper.queryListForRealTime(inventoryStandingReportDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存台账报
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
boolean flag = true;
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
InventoryStandingReport inventoryStandingReport = inventoryStandingReportMapper.selectOne(new QueryWrapper<InventoryStandingReport>().lambda()
|
||||
.eq(InventoryStandingReport::getMaterialCode,inventoryStandingReportDO.getMaterialCode())
|
||||
.eq(InventoryStandingReport::getShipperId,inventoryStandingReportDO.getShipperId())
|
||||
.eq(InventoryStandingReport::getWarehouseId,inventoryStandingReportDO.getWarehouseId())
|
||||
.eq(InventoryStandingReport::getNodeStatus,inventoryStandingReportDO.getNodeStatus())
|
||||
.eq(BaseVOEntity::getDelFlag,1));
|
||||
if (inventoryStandingReport == null) {
|
||||
inventoryStandingReport = new InventoryStandingReport();
|
||||
BeanUtils.copyProperties(inventoryStandingReportDO,inventoryStandingReport);
|
||||
inventoryStandingReport.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inventoryStandingReport.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inventoryStandingReport.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inventoryStandingReport.setCreateBy(loginUser.getUserid());
|
||||
inventoryStandingReport.setCreateByName(loginUser.getUsername());
|
||||
inventoryStandingReport.setCreateTime(new Date());
|
||||
flag = this.save(inventoryStandingReport);
|
||||
} else {
|
||||
inventoryStandingReport.setMaterialQuantity(inventoryStandingReport.getMaterialQuantity().add(inventoryStandingReportDO.getMaterialQuantity()));
|
||||
flag = this.updateById(inventoryStandingReport);
|
||||
}
|
||||
// //保存追溯明细信息
|
||||
// InventoryStandingDetail inventoryStandingDetail = new InventoryStandingDetail();
|
||||
// BeanUtils.copyProperties(inventoryStandingReportDO,inventoryStandingDetail);
|
||||
// inventoryStandingDetail.setTrackingNumber(inventoryStandingReport.getInventoryStandingId());
|
||||
// inventoryStandingDetailMapper.insert(inventoryStandingDetail);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存台账报
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
InventoryStandingReport inventoryStandingReport = new InventoryStandingReport();
|
||||
BeanUtils.copyProperties(inventoryStandingReportDO,inventoryStandingReport);
|
||||
return this.updateById(inventoryStandingReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存台账报
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inventoryStandingIds ) {
|
||||
List<InventoryStandingReport> list = new ArrayList<>();
|
||||
for (Long id : inventoryStandingIds) {
|
||||
InventoryStandingReport inventoryStandingReport = new InventoryStandingReport();
|
||||
inventoryStandingReport.setInventoryStandingId(id);
|
||||
inventoryStandingReport.setDelFlag(2);
|
||||
list.add(inventoryStandingReport);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存台账报
|
||||
*/
|
||||
@Override
|
||||
public InventoryStandingReportPO getInfo(Long inventoryStandingId) {
|
||||
InventoryStandingReport inventoryStandingReport = this.getById(inventoryStandingId);
|
||||
InventoryStandingReportPO inventoryStandingReportPO = new InventoryStandingReportPO();
|
||||
BeanUtils.copyProperties(inventoryStandingReport,inventoryStandingReportPO);
|
||||
return inventoryStandingReportPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryStandingReportPO getInventoryStandingInfo(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
InventoryStandingReportPO inventoryStandingReportPO = new InventoryStandingReportPO();
|
||||
BeanUtils.copyProperties(inventoryStandingReportDO,inventoryStandingReportPO);
|
||||
List<InventoryStandingDetailReportPO> inventoryStandingDetailReportPOs = new ArrayList<>();
|
||||
switch (inventoryStandingReportDO.getNodeStatus()) {
|
||||
case 1:
|
||||
inventoryStandingDetailReportPOs = inventoryStandingReportMapper.getInfoForReceipt(inventoryStandingReportDO);
|
||||
break;
|
||||
case 2:
|
||||
// 上架操作
|
||||
inventoryStandingDetailReportPOs = inventoryStandingReportMapper.getInfoForShelf(inventoryStandingReportDO);
|
||||
break;
|
||||
case 3:
|
||||
// 拣货
|
||||
inventoryStandingDetailReportPOs = inventoryStandingReportMapper.getInfoForPick(inventoryStandingReportDO);
|
||||
break;
|
||||
case 4:
|
||||
// 复核
|
||||
inventoryStandingDetailReportPOs = inventoryStandingReportMapper.getInfoForReCheck(inventoryStandingReportDO);
|
||||
break;
|
||||
default:
|
||||
// 当节点状态不是我们关心的状态时,设置标志变量为 false 来结束循环
|
||||
throw new RuntimeException("节点状态不正确");
|
||||
}
|
||||
inventoryStandingReportPO.setInventoryStandingDetailReportPOs(inventoryStandingDetailReportPOs);
|
||||
return inventoryStandingReportPO;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存台账报表明细汇总", description = "库存台账报表明细汇总")
|
||||
public class InventoryStandingDetailReportPO extends BaseVOEntity
|
||||
{
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String businessNo;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("来源单号")
|
||||
@Excel(name = "来源单号")
|
||||
private String sourceNo;
|
||||
|
||||
@ApiModelProperty("作业数量")
|
||||
@Excel(name = "作业数量")
|
||||
private BigDecimal workQuantity;
|
||||
|
||||
@ApiModelProperty("是否异常")
|
||||
@Excel(name = "是否异常")
|
||||
private String abnormal;
|
||||
|
||||
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账报对象 inventory_standing_report
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存台账报对象", description = "库存台账报响应对象")
|
||||
public class InventoryStandingReportPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
private Long inventoryStandingId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "明细集合")
|
||||
private List<InventoryStandingDetailReportPO> inventoryStandingDetailReportPOs;
|
||||
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 库存台账报对象 inventory_standing_report
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryStandingReportDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存台账id")
|
||||
private Long inventoryStandingId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料条码")
|
||||
@Excel(name = "物料条码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主名称编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
@Excel(name = "节点状态: 1-收货 2-上架 3-拣货 4-复核 5-移位 6-库存调整 7-盘点(盘盈) 8-盘点(盘亏)9-盘点(正常)")
|
||||
private Integer nodeStatus;
|
||||
|
||||
@ApiModelProperty("物料数量")
|
||||
@Excel(name = "物料数量")
|
||||
private BigDecimal materialQuantity;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.mhd.wms.domain.inventoryStandingReport.service;
|
||||
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.facade.IInventoryStandingReportService;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.po.InventoryStandingReportPO;
|
||||
import com.mhd.wms.domain.inventoryStandingReport.repository.todo.InventoryStandingReportDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存台账报
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-12
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InventoryStandingReportDomainService {
|
||||
|
||||
@Autowired
|
||||
private IInventoryStandingReportService inventoryStandingReportService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询库存台账报列表
|
||||
*/
|
||||
public List<InventoryStandingReportPO> queryList(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
return inventoryStandingReportService.queryList(inventoryStandingReportDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增库存台账报
|
||||
*/
|
||||
public Boolean insert(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
|
||||
return inventoryStandingReportService.insert(inventoryStandingReportDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存台账报
|
||||
*/
|
||||
public Boolean update(InventoryStandingReportDO inventoryStandingReportDO) {
|
||||
return inventoryStandingReportService.update(inventoryStandingReportDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存台账报
|
||||
*/
|
||||
public Boolean delete(Long[] inventoryStandingIds) {
|
||||
return inventoryStandingReportService.delete(inventoryStandingIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存台账报详细信息
|
||||
*/
|
||||
public InventoryStandingReportPO getInfo(Long inventoryStandingId)
|
||||
{
|
||||
return inventoryStandingReportService.getInfo(inventoryStandingId);
|
||||
}
|
||||
|
||||
public InventoryStandingReportPO getInventoryStandingInfo(InventoryStandingReportDO inventoryStandingReportDO)
|
||||
{
|
||||
return inventoryStandingReportService.getInventoryStandingInfo(inventoryStandingReportDO);
|
||||
}
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.wms.domain.inventoryTurnoverRule.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 库存周转规则对象 inventory_turnover_rule
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InventoryTurnoverRule extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("规则编码")
|
||||
@Excel(name = "规则编码")
|
||||
private String ruleNum;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("启用状态;0启用1停用")
|
||||
@Excel(name = "启用状态;0启用1停用")
|
||||
private Integer enabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.wms.domain.inventoryTurnoverRule.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.entity.InventoryTurnoverRule;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.repository.po.InventoryTurnoverRulePO;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.repository.todo.InventoryTurnoverRuleDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存周转规则Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface IInventoryTurnoverRuleService extends IService<InventoryTurnoverRule>
|
||||
{
|
||||
/**
|
||||
* 分页查询库存周转规则列表
|
||||
*/
|
||||
public List<InventoryTurnoverRulePO> queryList(InventoryTurnoverRuleDO inventoryTurnoverRuleDO);
|
||||
|
||||
/**
|
||||
* 新增库存周转规则
|
||||
*/
|
||||
public Boolean insert(InventoryTurnoverRuleDO inventoryTurnoverRuleDO);
|
||||
|
||||
/**
|
||||
* 修改库存周转规则
|
||||
*/
|
||||
public Boolean update(InventoryTurnoverRuleDO inventoryTurnoverRuleDO);
|
||||
|
||||
/**
|
||||
* 批量删除库存周转规则
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询库存周转规则
|
||||
*/
|
||||
public InventoryTurnoverRulePO getInfo(Long id);
|
||||
|
||||
Long insertData(InventoryTurnoverRuleDO inventoryTurnoverRuleDO);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.domain.inventoryTurnoverRule.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.entity.InventoryTurnoverRule;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.repository.po.InventoryTurnoverRulePO;
|
||||
import com.mhd.wms.domain.inventoryTurnoverRule.repository.todo.InventoryTurnoverRuleDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存周转规则Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-22
|
||||
*/
|
||||
public interface InventoryTurnoverRuleMapper extends BaseMapper<InventoryTurnoverRule>
|
||||
{
|
||||
/**
|
||||
* 查询库存周转规则列表
|
||||
*/
|
||||
public List<InventoryTurnoverRulePO> queryList(InventoryTurnoverRuleDO inventoryTurnoverRuleDO);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user