add:出入库策略
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package org.nl.wms.base_manage.strategy.controller;
|
||||
|
||||
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.base_manage.strategy.service.IStStrategyConfigService;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.StStrategyConfig;
|
||||
import org.nl.wms.base_manage.strategy.service.dto.StrategyQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓储策略配置表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/strategy")
|
||||
public class StStrategyConfigController {
|
||||
|
||||
@Autowired
|
||||
private IStStrategyConfigService iStStrategyConfigService;
|
||||
|
||||
@GetMapping
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<Object> query(StrategyQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(iStStrategyConfigService.pageQuery(query, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody StStrategyConfig dao) {
|
||||
iStStrategyConfigService.create(dao);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody StStrategyConfig dao) {
|
||||
iStStrategyConfigService.update(dao);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除")
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
iStStrategyConfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping("/changeActive")
|
||||
@Log("修改启用状态")
|
||||
public ResponseEntity<Object> changeActive(@Validated @RequestBody StStrategyConfig dao) {
|
||||
iStStrategyConfigService.changeActive(dao);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.nl.wms.base_manage.strategy.service;
|
||||
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.StStrategyConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.base_manage.strategy.service.dto.StrategyQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓储策略配置表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
public interface IStStrategyConfigService extends IService<StStrategyConfig> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param query,page /
|
||||
* @return JSONObject
|
||||
*/
|
||||
Object pageQuery(StrategyQuery query, PageQuery page);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param dao:实体类
|
||||
*/
|
||||
void create(StStrategyConfig dao);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param dao: 实体类
|
||||
*/
|
||||
void update(StStrategyConfig dao);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param ids : 标识
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 修改启用状态
|
||||
* @param dao:实体类
|
||||
*/
|
||||
void changeActive(StStrategyConfig dao);
|
||||
}
|
||||
@@ -1,87 +1,80 @@
|
||||
package org.nl.wms.stor_manage.service.iostor.dao;
|
||||
package org.nl.wms.base_manage.strategy.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表
|
||||
* 仓储策略配置表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-28
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinv")
|
||||
public class StIvtIostorinv implements Serializable {
|
||||
@TableName("st_strategy_config")
|
||||
public class StStrategyConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
* 策略标识
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
* 策略编码
|
||||
*/
|
||||
private String code;
|
||||
private String strategy_code;
|
||||
|
||||
/**
|
||||
* 出入类型
|
||||
* 策略名称
|
||||
*/
|
||||
private Boolean io_type;
|
||||
private String strategy_name;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
* 策略类型
|
||||
*/
|
||||
private String biz_date;
|
||||
private String strategy_type;
|
||||
|
||||
/**
|
||||
* 生产区域编码
|
||||
* 类处理类型
|
||||
*/
|
||||
private String product_code;
|
||||
private String class_type;
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
* 参数
|
||||
*/
|
||||
private String status;
|
||||
private String param;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
* 描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean is_delete;
|
||||
private String is_used;
|
||||
|
||||
/**
|
||||
* 源单号
|
||||
*/
|
||||
private String source_code;
|
||||
|
||||
/**
|
||||
* 源单类型
|
||||
*/
|
||||
private String source_type;
|
||||
|
||||
/**
|
||||
* 关联订单
|
||||
*/
|
||||
private String order;
|
||||
|
||||
/**
|
||||
* 制单人
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
* 创建人名称
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
@@ -90,15 +83,20 @@ public class StIvtIostorinv implements Serializable {
|
||||
*/
|
||||
private String update_id;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 自定义映射数据
|
||||
* 是否删除
|
||||
*/
|
||||
private String form_data;
|
||||
private String is_delete;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.nl.wms.base_manage.strategy.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.StStrategyConfig;
|
||||
import org.nl.wms.base_manage.strategy.service.dto.StrategyQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓储策略配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
public interface StStrategyConfigMapper extends BaseMapper<StStrategyConfig> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param query:查询条件
|
||||
* @param pageQuery 分页
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getPageQuery(@Param("query") StrategyQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.base_manage.strategy.service.dao.mapper.StStrategyConfigMapper">
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
st_strategy_config
|
||||
<where>
|
||||
is_delete = "0"
|
||||
|
||||
<if test="query.strategy_name != null and query.strategy_name != ''">
|
||||
and (strategy_name LIKE '%${query.strategy_name}%'
|
||||
or strategy_code LIKE '%${query.strategy_name}%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.base_manage.strategy.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.entity.BaseQuery;
|
||||
import org.nl.common.domain.entity.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.base_manage.measure.service.dao.BmMeasureUnit;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.StStrategyConfig;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/4 19:49
|
||||
*/
|
||||
@Data
|
||||
public class StrategyQuery extends BaseQuery<StStrategyConfig> {
|
||||
|
||||
private String strategy_name;
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("strategy_name", QParam.builder().k(new String[]{"strategy_name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.nl.wms.base_manage.strategy.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.base_manage.strategy.service.IStStrategyConfigService;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.StStrategyConfig;
|
||||
import org.nl.wms.base_manage.strategy.service.dao.mapper.StStrategyConfigMapper;
|
||||
import org.nl.wms.base_manage.strategy.service.dto.StrategyQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓储策略配置表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-07
|
||||
*/
|
||||
@Service
|
||||
public class StStrategyConfigServiceImpl extends ServiceImpl<StStrategyConfigMapper, StStrategyConfig> implements IStStrategyConfigService {
|
||||
|
||||
@Override
|
||||
public Object pageQuery(StrategyQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("create_time DESC");
|
||||
List<Map> mstDetail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mstDetail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(StStrategyConfig dao) {
|
||||
|
||||
StStrategyConfig oldDao = this.getOne(
|
||||
new QueryWrapper<StStrategyConfig>().lambda()
|
||||
.eq(StStrategyConfig::getStrategy_name, dao.getStrategy_name())
|
||||
);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(oldDao)) {
|
||||
throw new BadRequestException("已存在相同名称的策略【"+dao.getStrategy_name()+"】");
|
||||
}
|
||||
|
||||
dao.setId(IdUtil.getStringId());
|
||||
dao.setStrategy_code("000");
|
||||
dao.setIs_used("1");
|
||||
dao.setIs_delete("0");
|
||||
dao.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
dao.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
dao.setCreate_time(DateUtil.now());
|
||||
this.save(dao);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(StStrategyConfig dao) {
|
||||
|
||||
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
dao.setUpdate_time(DateUtil.now());
|
||||
this.updateById(dao);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAll(Long[] ids) {
|
||||
this.update(
|
||||
new UpdateWrapper<StStrategyConfig>().lambda()
|
||||
.set(StStrategyConfig::getUpdate_id,SecurityUtils.getCurrentUserId())
|
||||
.set(StStrategyConfig::getUpdate_name, SecurityUtils.getCurrentNickName())
|
||||
.set(StStrategyConfig::getUpdate_time, DateUtil.now())
|
||||
.set(StStrategyConfig::getIs_delete, "1")
|
||||
.in(StStrategyConfig::getId, ids)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void changeActive(StStrategyConfig dao) {
|
||||
|
||||
String isUsed = "1";
|
||||
if (StrUtil.equals("1", dao.getIs_used())) {
|
||||
isUsed = "0";
|
||||
}
|
||||
|
||||
dao.setIs_used(isUsed);
|
||||
dao.setUpdate_time(DateUtil.now());
|
||||
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
this.updateById(dao);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.base_manage.struct.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓位属性表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stIvtStructattr")
|
||||
public class StIvtStructattrController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.base_manage.struct.service;
|
||||
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓位属性表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface IStIvtStructattrService extends IService<StIvtStructattr> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package org.nl.wms.base_manage.struct.service.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓位属性表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_structattr")
|
||||
public class StIvtStructattr implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 仓位标识
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 仓位编码
|
||||
*/
|
||||
private String struct_code;
|
||||
|
||||
/**
|
||||
* 仓位名称
|
||||
*/
|
||||
private String struct_name;
|
||||
|
||||
/**
|
||||
* 库区标识
|
||||
*/
|
||||
private String sect_id;
|
||||
|
||||
/**
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
*/
|
||||
private BigDecimal capacity;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 深度
|
||||
*/
|
||||
private BigDecimal zdepth;
|
||||
|
||||
/**
|
||||
* 承受重量
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 起始X坐标
|
||||
*/
|
||||
private BigDecimal xqty;
|
||||
|
||||
/**
|
||||
* 起始Y坐标
|
||||
*/
|
||||
private BigDecimal yqty;
|
||||
|
||||
/**
|
||||
* 起始Z坐标
|
||||
*/
|
||||
private BigDecimal zqty;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
private BigDecimal row_num;
|
||||
|
||||
/**
|
||||
* 列
|
||||
*/
|
||||
private BigDecimal col_num;
|
||||
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
private BigDecimal layer_num;
|
||||
|
||||
/**
|
||||
* 块
|
||||
*/
|
||||
private BigDecimal block_num;
|
||||
|
||||
/**
|
||||
* 入库顺序
|
||||
*/
|
||||
private BigDecimal in_order_seq;
|
||||
|
||||
/**
|
||||
* 出库库顺序
|
||||
*/
|
||||
private BigDecimal out_order_seq;
|
||||
|
||||
/**
|
||||
* 放置类型
|
||||
*/
|
||||
private String placement_type;
|
||||
|
||||
/**
|
||||
* 超限货位关联的货位编号
|
||||
*/
|
||||
private String control_code;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 是否临时仓位
|
||||
*/
|
||||
private Boolean is_temp;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean is_used;
|
||||
|
||||
/**
|
||||
* 是否判断高度
|
||||
*/
|
||||
private String is_zdepth;
|
||||
|
||||
/**
|
||||
* 是否空载具
|
||||
*/
|
||||
private Boolean is_emp;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 存储载具号
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
private String back_ground_pic;
|
||||
|
||||
/**
|
||||
* 前景色
|
||||
*/
|
||||
private String front_ground_color;
|
||||
|
||||
/**
|
||||
* 背景色
|
||||
*/
|
||||
private String back_ground_color;
|
||||
|
||||
/**
|
||||
* 字体显示方向
|
||||
*/
|
||||
private String font_direction_scode;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.base_manage.struct.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓位属性表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface StIvtStructattrMapper extends BaseMapper<StIvtStructattr> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.base_manage.struct.service.dao.mapper.StIvtStructattrMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.base_manage.struct.service.impl;
|
||||
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.struct.service.dao.mapper.StIvtStructattrMapper;
|
||||
import org.nl.wms.base_manage.struct.service.IStIvtStructattrService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓位属性表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Service
|
||||
public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMapper, StIvtStructattr> implements IStIvtStructattrService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.base_manage.vehicleext.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdPbStoragevehicleext")
|
||||
public class MdPbStoragevehicleextController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.base_manage.vehicleext.service;
|
||||
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-09
|
||||
*/
|
||||
public interface IMdPbStoragevehicleextService extends IService<MdPbStoragevehicleext> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package org.nl.wms.base_manage.vehicleext.service.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_pb_storagevehicleext")
|
||||
public class MdPbStoragevehicleext implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String storagevehicle_code;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 数量计量单位标识
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 入库时间
|
||||
*/
|
||||
private String insert_time;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.base_manage.vehicleext.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-09
|
||||
*/
|
||||
public interface MdPbStoragevehicleextMapper extends BaseMapper<MdPbStoragevehicleext> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.base_manage.vehicleext.service.dao.mapper.MdPbStoragevehicleextMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.base_manage.vehicleext.service.impl;
|
||||
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-09
|
||||
*/
|
||||
@Service
|
||||
public class MdPbStoragevehicleextServiceImpl extends ServiceImpl<MdPbStoragevehicleextMapper, MdPbStoragevehicleext> implements IMdPbStoragevehicleextService {
|
||||
|
||||
}
|
||||
@@ -1,17 +1,240 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.IStIvtStructattrService;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 巷道均衡策略
|
||||
*/
|
||||
public class AlleyAveRuleHandler extends DecisionHandler<String,String> {
|
||||
@Service
|
||||
public class AlleyAveRuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 仓位服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtStructattrService iStIvtStructattrService;
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 巷道均衡策略
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识(此方法只根据物料进行匹配)
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
// in查询条件处理
|
||||
List<BigDecimal> blockNumIn = attrList.stream()
|
||||
.map(StIvtStructattr::getBlock_num)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询相同巷道货位相同物料
|
||||
List<StIvtStructattr> blockAttrList = iStIvtStructattrService.list(
|
||||
new QueryWrapper<StIvtStructattr>().lambda()
|
||||
.eq(StIvtStructattr::getMaterial_id, jsonParam.getString("materialId"))
|
||||
.in(StIvtStructattr::getBlock_num, blockNumIn)
|
||||
);
|
||||
|
||||
// 如果为空说明这些巷道都没有相同物料的巷道,则返回所有仓位
|
||||
if (ObjectUtil.isEmpty(blockAttrList)) {
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 计算每个巷道的相同物料
|
||||
Map<BigDecimal, List<StIvtStructattr>> collectMap = blockAttrList.stream()
|
||||
.collect(Collectors.groupingBy(StIvtStructattr::getBlock_num));
|
||||
|
||||
// 巷道
|
||||
int blockNum = blockAttrList.get(0).getBlock_num().intValue();
|
||||
// 集合数量
|
||||
int size = blockAttrList.size();
|
||||
for (BigDecimal num : collectMap.keySet()) {
|
||||
int min = Math.min(size, collectMap.get(num).size());
|
||||
|
||||
if (size > min) {
|
||||
// 返回最小的巷道
|
||||
blockNum = num.intValue();
|
||||
size = min;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 匹配相同巷道的集合并返回
|
||||
int finalBlockNum = blockNum;
|
||||
return attrList.stream()
|
||||
.filter(row -> row.getBlock_num().intValue() == finalBlockNum)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据明细物料匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
// 找出物料最多的巷道
|
||||
int blockNum = getMaxMaterial(attrList);
|
||||
|
||||
// 匹配此巷道对应的仓位物料
|
||||
StIvtStructattr attrDao = attrList.stream()
|
||||
.filter(row -> row.getBlock_num().intValue() == blockNum)
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(attrDao)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略 - 查询物料最多的巷道
|
||||
* @param attrList: 仓位物料
|
||||
* @return 巷道
|
||||
*/
|
||||
private int getMaxMaterial(List<StIvtStructattr> attrList) {
|
||||
// 根据巷道分组
|
||||
Map<BigDecimal, List<StIvtStructattr>> collectMap = attrList.stream()
|
||||
.collect(Collectors.groupingBy(StIvtStructattr::getBlock_num));
|
||||
|
||||
// 找最大物料巷道
|
||||
// 巷道
|
||||
int blockNum = attrList.get(0).getBlock_num().intValue();
|
||||
// 集合数量
|
||||
int size = 0;
|
||||
|
||||
for (BigDecimal num : collectMap.keySet()) {
|
||||
int max = Math.max(size, collectMap.get(num).size());
|
||||
|
||||
if (size < max) {
|
||||
// 返回最大的巷道
|
||||
blockNum = num.intValue();
|
||||
size = max;
|
||||
}
|
||||
}
|
||||
|
||||
return blockNum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,180 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.IStIvtStructattrService;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 同类型聚簇策略
|
||||
*/
|
||||
public class ClusterRuleHandler extends DecisionHandler<String,String> {
|
||||
@Service
|
||||
public class ClusterRuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 仓位服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtStructattrService iStIvtStructattrService;
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 同类物品集中原则
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识(此方法只根据物料、排进行匹配)
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// in查询条件处理
|
||||
List<BigDecimal> rowNumIn = attrList.stream()
|
||||
.map(StIvtStructattr::getRow_num)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询仓位中是否有相同的物料
|
||||
List<StIvtStructattr> attrLikeList = iStIvtStructattrService.list(
|
||||
new QueryWrapper<StIvtStructattr>().lambda()
|
||||
.eq(StIvtStructattr::getMaterial_id, jsonParam.getString("materialId"))
|
||||
.in(StIvtStructattr::getRow_num, rowNumIn)
|
||||
);
|
||||
|
||||
if (ObjectUtil.isEmpty(attrLikeList)) {
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 取其中一个排进行匹配并返回
|
||||
return attrList.stream()
|
||||
.filter(row -> row.getRow_num().intValue() == attrLikeList.get(0).getRow_num().intValue())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据明细物料匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
StIvtStructattr attrDao = attrList.get(0);
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,154 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.IStIvtStructattrService;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 先进先出策略
|
||||
*/
|
||||
public class FIFORuleHandler extends DecisionHandler<String,String> {
|
||||
public class FIFORuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 巷道均衡策略
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
return attrList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询对应的载具物料,根据入库时间升序(先进先出规则)
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
.orderByAsc(MdPbStoragevehicleext::getInsert_time)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
StIvtStructattr attrDao = attrList.get(0);
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,161 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 货位限位策略:限高,限宽,双货位
|
||||
*/
|
||||
public class LimitStorageRuleHandler extends DecisionHandler<String,String> {
|
||||
@Service
|
||||
public class LimitStorageRuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 货位限位策略:根据货位的长宽高
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略:判断货位的长宽高
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识、width: 宽度、 height:高度、zdepth:深度
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 判断长宽高是否符合要求
|
||||
return attrList.stream()
|
||||
.filter(row -> row.getWidth().doubleValue() <= jsonParam.getDoubleValue("width") &&
|
||||
row.getHeight().doubleValue() <= jsonParam.getDoubleValue("height") &&
|
||||
row.getZdepth().doubleValue() <= jsonParam.getDoubleValue("zdepth")
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略:默认出库
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询对应的载具物料
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
StIvtStructattr attrDao = attrList.get(0);
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,162 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 就近放置策略:根据物料ABC类区分
|
||||
*/
|
||||
public class NearbyRuleHandler extends DecisionHandler<String,String> {
|
||||
@Service
|
||||
public class NearbyRuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 就近放置策略:根据出入库顺序进行判断
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略:默认入库顺序数小的一方为靠近出口方向
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
return attrList.stream()
|
||||
.sorted(Comparator.comparing(StIvtStructattr::getIn_order_seq))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略:默认出库顺序数大的一方为靠近出口方向
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 先进行顺序排序
|
||||
attrList = attrList.stream()
|
||||
.sorted(Comparator.comparing(StIvtStructattr::getIn_order_seq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询对应的载具物料
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
StIvtStructattr attrDao = attrList.get(0);
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,158 @@
|
||||
package org.nl.wms.decision_manage.handler.service.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.decision_manage.handler.service.DecisionHandler;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/4/6 16:18
|
||||
* 轻上重下策略
|
||||
*/
|
||||
public class WeightRuleHandler extends DecisionHandler<String,String> {
|
||||
@Service
|
||||
public class WeightRuleHandler extends DecisionHandler<StIvtStructattr,String> {
|
||||
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 轻上重下策略:根据物品的重量
|
||||
* @param list :仓位集合
|
||||
* @param param:物料相关信息、出入类型:{
|
||||
* ioType: 出入类型
|
||||
* materialId: 物料标识
|
||||
* ...
|
||||
* }
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
@Override
|
||||
public List<String> handler(List<String> list, String param) {
|
||||
return null;
|
||||
public List<StIvtStructattr> handler(List<StIvtStructattr> list, String param) {
|
||||
// 判断仓位是否为空
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("仓位集合为空!");
|
||||
}
|
||||
|
||||
// 判断策略类型
|
||||
JSONObject jsonParam = JSONObject.parseObject(param, JSONObject.class);
|
||||
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
|
||||
switch (jsonParam.getString("ioType")) {
|
||||
case "1":
|
||||
// 入库策略
|
||||
resultList = inHandler(list,jsonParam);
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("策略类型错误!");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库策略:根据重量找对应的货位
|
||||
* @param attrList :仓位集合
|
||||
* @param jsonParam:materialId :物料标识、weight: 重量
|
||||
* @return List<StIvtStructattr> :仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> inHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
// 过滤对应的货位
|
||||
return attrList.stream()
|
||||
.filter(row -> row.getWeight().doubleValue() <= jsonParam.getDoubleValue("weight"))
|
||||
.sorted(Comparator.comparing(StIvtStructattr::getWeight))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库策略:默认出库
|
||||
* @param attrList :仓位物料信息
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.getById(jsonParam.getString("iostorinvdtlId"));
|
||||
|
||||
// 查询传入仓位物料中的数量是否满足明细中的数量
|
||||
List<String> vehicleCodeIn = attrList.stream()
|
||||
.map(StIvtStructattr::getVehicle_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询对应的载具物料
|
||||
List<MdPbStoragevehicleext> extList = iMdPbStoragevehicleextService.list(
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code, vehicleCodeIn)
|
||||
);
|
||||
|
||||
double attrQty = extList.stream()
|
||||
.map(MdPbStoragevehicleext::getQty)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.doubleValue();
|
||||
|
||||
if (dtlDao.getUnassign_qty().doubleValue() > attrQty) {
|
||||
// 说明不满足所需重量则全部返回
|
||||
return attrList;
|
||||
}
|
||||
|
||||
// 需返回仓位物料集合
|
||||
List<StIvtStructattr> resultList = new ArrayList<>();
|
||||
// 满足所需数量: 根据巷道进行平均分配
|
||||
double unAssingQty = dtlDao.getUnassign_qty().doubleValue();
|
||||
|
||||
while (unAssingQty > 0) {
|
||||
|
||||
// 添加需返回的仓位物料
|
||||
StIvtStructattr attrDao = attrList.get(0);
|
||||
resultList.add(attrDao);
|
||||
|
||||
// 减去未分配重量
|
||||
MdPbStoragevehicleext extDao = extList.stream()
|
||||
.filter(row -> row.getStoragevehicle_code().equals(attrDao.getVehicle_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isEmpty(extDao)) {
|
||||
throw new BadRequestException("未查询到载具对应的物料【"+attrDao.getVehicle_code()+"】");
|
||||
}
|
||||
|
||||
unAssingQty = NumberUtil.sub(unAssingQty,extDao.getQty().doubleValue());
|
||||
|
||||
// 移出此仓位物料,方便下一轮进行匹配
|
||||
attrList.remove(attrDao);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ import org.nl.wms.flow_manage.flow.framework.entity.node.base.impl.FlowElement;
|
||||
import org.nl.wms.flow_manage.flow.framework.entity.node.impl.task.impl.FormTask;
|
||||
import org.nl.wms.flow_manage.flow.framework.process.nodeType.TypeHandler;
|
||||
import org.nl.wms.pm_manage.form_data.service.dto.PmFormDataDto;
|
||||
import org.nl.wms.stor_manage.service.iostor.IStIvtIostorinvService;
|
||||
import org.nl.wms.stor_manage.service.iostor.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvService;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-28
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stIvtIostorinv")
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-29
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stIvtIostorinvdtl")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.nl.wms.stor_manage.service.iostor;
|
||||
package org.nl.wms.stor_manage.service;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor.dao.StIvtIostorinv;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinv;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-28
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface IStIvtIostorinvService extends IService<StIvtIostorinv> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.nl.wms.stor_manage.service.iostor_dtl;
|
||||
package org.nl.wms.stor_manage.service;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,9 +11,10 @@ import java.util.List;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-29
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface IStIvtIostorinvdtlService extends IService<StIvtIostorinvdtl> {
|
||||
|
||||
void batchInsert(List<StIvtIostorinvdtl> dtls);
|
||||
void batchInsert(List<StIvtIostorinvdtl> iostorinvs);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package org.nl.wms.stor_manage.service.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinv")
|
||||
public class StIvtIostorinv implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
*/
|
||||
@TableId
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String bill_code;
|
||||
|
||||
/**
|
||||
* 出入类型
|
||||
*/
|
||||
private String io_type;
|
||||
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
private String bill_type;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
private String biz_date;
|
||||
|
||||
/**
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
|
||||
/**
|
||||
* 来源方标识
|
||||
*/
|
||||
private String source_id;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal total_qty;
|
||||
|
||||
/**
|
||||
* 总重量
|
||||
*/
|
||||
private BigDecimal total_weight;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String bill_status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
*/
|
||||
private String create_mode;
|
||||
|
||||
/**
|
||||
* 制单人
|
||||
*/
|
||||
private String input_optid;
|
||||
|
||||
/**
|
||||
* 制单人姓名
|
||||
*/
|
||||
private String input_optname;
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String input_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 分配人
|
||||
*/
|
||||
private String dis_optid;
|
||||
|
||||
/**
|
||||
* 分配人姓名
|
||||
*/
|
||||
private String dis_optname;
|
||||
|
||||
/**
|
||||
* 分配时间
|
||||
*/
|
||||
private String dis_time;
|
||||
|
||||
/**
|
||||
* 确认人
|
||||
*/
|
||||
private String confirm_optid;
|
||||
|
||||
/**
|
||||
* 确认人姓名
|
||||
*/
|
||||
private String confirm_optname;
|
||||
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private String confirm_time;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean is_delete;
|
||||
|
||||
/**
|
||||
* 是否已上传
|
||||
*/
|
||||
private Boolean is_upload;
|
||||
|
||||
/**
|
||||
* 回传人
|
||||
*/
|
||||
private String upload_optid;
|
||||
|
||||
/**
|
||||
* 回传时间
|
||||
*/
|
||||
private String upload_time;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.stor_manage.service.iostor_dtl.dao;
|
||||
package org.nl.wms.stor_manage.service.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
@@ -12,7 +14,7 @@ import lombok.EqualsAndHashCode;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-29
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -24,12 +26,13 @@ public class StIvtIostorinvdtl implements Serializable {
|
||||
/**
|
||||
* 出入单明细标识
|
||||
*/
|
||||
private Long iostorinvdtl_id;
|
||||
@TableId
|
||||
private String iostorinvdtl_id;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
*/
|
||||
private Long iostorinv_id;
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 明细序号
|
||||
@@ -39,7 +42,7 @@ public class StIvtIostorinvdtl implements Serializable {
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private Long material_id;
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
@@ -59,12 +62,7 @@ public class StIvtIostorinvdtl implements Serializable {
|
||||
/**
|
||||
* 数量计量单位标识
|
||||
*/
|
||||
private Long qty_unit_id;
|
||||
|
||||
/**
|
||||
* 数量计量单位名称
|
||||
*/
|
||||
private String qty_unit_name;
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
@@ -74,7 +72,7 @@ public class StIvtIostorinvdtl implements Serializable {
|
||||
/**
|
||||
* 来源单据明细标识
|
||||
*/
|
||||
private Long source_billdtl_id;
|
||||
private String source_billdtl_id;
|
||||
|
||||
/**
|
||||
* 来源单据类型
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.nl.wms.stor_manage.service.iostor.dao.mapper;
|
||||
package org.nl.wms.stor_manage.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinv;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-28
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.nl.wms.stor_manage.service.iostor_dtl.dao.mapper;
|
||||
package org.nl.wms.stor_manage.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,10 +11,9 @@ import java.util.List;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-29
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface StIvtIostorinvdtlMapper extends BaseMapper<StIvtIostorinvdtl> {
|
||||
|
||||
Integer batchInsert(List<StIvtIostorinvdtl> dtls);
|
||||
|
||||
void batchInsert(List<StIvtIostorinvdtl> iostorinvs);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.stor_manage.service.iostor.dao.mapper.StIvtIostorinvMapper">
|
||||
<mapper namespace="org.nl.wms.stor_manage.service.dao.mapper.StIvtIostorinvMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.stor_manage.service.iostor_dtl.dao.mapper.StIvtIostorinvdtlMapper">
|
||||
|
||||
<mapper namespace="org.nl.wms.stor_manage.service.dao.mapper.StIvtIostorinvdtlMapper">
|
||||
<insert id="batchInsert">
|
||||
insert into st_ivt_iostorinvdtl() values <foreach collection="dtls" open="(" close=")" item="item">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.nl.wms.stor_manage.service.iostor.impl;
|
||||
package org.nl.wms.stor_manage.service.impl;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor.IStIvtIostorinvService;
|
||||
import org.nl.wms.stor_manage.service.iostor.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.service.iostor.dao.mapper.StIvtIostorinvMapper;
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinv;
|
||||
import org.nl.wms.stor_manage.service.dao.mapper.StIvtIostorinvMapper;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-28
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper, StIvtIostorinv> implements IStIvtIostorinvService {
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.nl.wms.stor_manage.service.impl;
|
||||
|
||||
import org.nl.wms.stor_manage.service.dao.StIvtIostorinvdtl;
|
||||
import org.nl.wms.stor_manage.service.dao.mapper.StIvtIostorinvdtlMapper;
|
||||
import org.nl.wms.stor_manage.service.IStIvtIostorinvdtlService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvdtlServiceImpl extends ServiceImpl<StIvtIostorinvdtlMapper, StIvtIostorinvdtl> implements IStIvtIostorinvdtlService {
|
||||
|
||||
@Override
|
||||
public void batchInsert(List<StIvtIostorinvdtl> iostorinvs) {
|
||||
this.baseMapper.batchInsert(iostorinvs);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package org.nl.wms.stor_manage.service.iostor_dtl.impl;
|
||||
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.dao.StIvtIostorinvdtl;
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.dao.mapper.StIvtIostorinvdtlMapper;
|
||||
import org.nl.wms.stor_manage.service.iostor_dtl.IStIvtIostorinvdtlService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-03-29
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvdtlServiceImpl extends ServiceImpl<StIvtIostorinvdtlMapper, StIvtIostorinvdtl> implements IStIvtIostorinvdtlService {
|
||||
|
||||
|
||||
@Override
|
||||
public void batchInsert(List<StIvtIostorinvdtl> dtls) {
|
||||
this.baseMapper.batchInsert(dtls);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -434,4 +434,4 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
baseMapper.getMenusByRole(systemType,category);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user