rev:组盘
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleattr;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface IMdPbVehicleattrService extends IService<MdPbVehicleattr> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleivt;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具物料信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface IMdPbVehicleivtService extends IService<MdPbVehicleivt> {
|
||||
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_pb_vehicleattr")
|
||||
public class MdPbVehicleattr implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 载具名称
|
||||
*/
|
||||
private String vehicle_name;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
|
||||
/**
|
||||
* 一维码
|
||||
*/
|
||||
private String one_code;
|
||||
|
||||
/**
|
||||
* 二维码
|
||||
*/
|
||||
private String two_code;
|
||||
|
||||
/**
|
||||
* RFID编码
|
||||
*/
|
||||
private String rfid_code;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_id;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date update_time;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean is_used;
|
||||
|
||||
/**
|
||||
* 载具宽度
|
||||
*/
|
||||
private Integer w;
|
||||
|
||||
/**
|
||||
* 载具长度
|
||||
*/
|
||||
private Integer l;
|
||||
|
||||
/**
|
||||
* 载具高度
|
||||
*/
|
||||
private Integer h;
|
||||
|
||||
/**
|
||||
* 载具重量
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 载具超限情况:0无1超w2h3l4W
|
||||
*/
|
||||
private String overstruct_type;
|
||||
|
||||
/**
|
||||
* 超限参数
|
||||
*/
|
||||
private Integer occupystruct_qty;
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
private String ext_json;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具物料信息表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_pb_vehicleivt")
|
||||
public class MdPbVehicleivt implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 工序id
|
||||
*/
|
||||
private String workprocedure_id;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 数量计量单位标识
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 父容器
|
||||
*/
|
||||
private String parent_id;
|
||||
|
||||
/**
|
||||
* 是否含子容器
|
||||
*/
|
||||
private Boolean has_child;
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
private String ext_json;
|
||||
|
||||
/**
|
||||
* 物料关联单据
|
||||
*/
|
||||
private String correlate_order;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleattr;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface MdPbVehicleattrMapper extends BaseMapper<MdPbVehicleattr> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleivt;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具物料信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
public interface MdPbVehicleivtMapper extends BaseMapper<MdPbVehicleivt> {
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.base_manage.vehicle.service.IMdPbVehicleattrService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleattr;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.mapper.MdPbVehicleattrMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Service
|
||||
public class MdPbVehicleattrServiceImpl extends ServiceImpl<MdPbVehicleattrMapper, MdPbVehicleattr> implements IMdPbVehicleattrService {
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.base_manage.vehicle.service.IMdPbVehicleivtService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.MdPbVehicleivt;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.mapper.MdPbVehicleivtMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具物料信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-08
|
||||
*/
|
||||
@Service
|
||||
public class MdPbVehicleivtServiceImpl extends ServiceImpl<MdPbVehicleivtMapper, MdPbVehicleivt> implements IMdPbVehicleivtService {
|
||||
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.nl.wms.base_manage.vehicle.controller;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.base_manage.vehicle.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dto.VehicleQuery;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dto.VehicleQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.nl.wms.base_manage.vehicle.service;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.service.dto.VehicleQuery;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dto.VehicleQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -1,10 +1,8 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dao.mapper;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 Mapper 接口
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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.vehicle.service.dao.mapper.BmVehicleInfoMapper">
|
||||
<mapper namespace="org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.mapper.BmVehicleInfoMapper">
|
||||
|
||||
<select id="vehileInfo" resultType="org.nl.wms.base_manage.vehicle.service.dao.BmVehicleInfo">
|
||||
<select id="vehileInfo" resultType="org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo">
|
||||
select *
|
||||
from md_pb_storagevehicleinfo
|
||||
where md_pb_storagevehicleinfo.storagevehicle_code = #{vehicle_code}
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.dto;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.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.vehicle.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.base_manage.vehicle.service.impl;
|
||||
package org.nl.wms.base_manage.vehicle.vehicleInfo.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
@@ -8,16 +8,14 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.base_manage.vehicle.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.mapper.BmVehicleInfoMapper;
|
||||
import org.nl.wms.base_manage.vehicle.service.dto.VehicleQuery;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.mapper.BmVehicleInfoMapper;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dto.VehicleQuery;
|
||||
import org.nl.wms.system_manage.service.dict.ISysDictService;
|
||||
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -25,7 +23,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
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 {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
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> {
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
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> {
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,20 +0,0 @@
|
||||
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 {
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
@@ -22,11 +21,8 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -60,7 +56,7 @@ public class BmFormStrucController {
|
||||
public ResponseEntity<Object> queryAll(FormStrucQuery query, PageQuery pageQuery){
|
||||
//参数判读,参数解析,调用参数入库
|
||||
//Page<BmFormStruc> page = iBmFormStrucService.page(pageQuery.build(), query.build());
|
||||
return new ResponseEntity<>(iBmFormStrucService.queryAll(query,pageQuery),HttpStatus.OK);
|
||||
return new ResponseEntity<>(iBmFormStrucService.queryTree(query,pageQuery),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@@ -73,23 +69,28 @@ public class BmFormStrucController {
|
||||
iBmFormStrucService.save(formStruc);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/delete")
|
||||
public ResponseEntity<Object> delete(List<String> types){
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids){
|
||||
//参数判读,参数解析,调用参数入库
|
||||
int dataCount = iPmFormDataService.count(new QueryWrapper<PmFormData>().in("form_type", types));
|
||||
if (dataCount>0){
|
||||
throw new BadRequestException("当前表单存在业务数据,不允许删除");
|
||||
if (ids.length>0){
|
||||
List<PmFormData> pmFormData = iPmFormDataService.listByIds(Arrays.asList(ids));
|
||||
Set<String> collect = pmFormData.stream().map(PmFormData::getForm_type).collect(Collectors.toSet());
|
||||
int dataCount = iPmFormDataService.count(new QueryWrapper<PmFormData>().in("form_type", collect));
|
||||
if (dataCount>0){
|
||||
throw new BadRequestException("当前表单存在业务数据,不允许删除");
|
||||
}
|
||||
iBmFormStrucService.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
iBmFormStrucService.remove(new QueryWrapper<BmFormStruc>().in("form_type", types));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/getTypes")
|
||||
public ResponseEntity<Object> getTypes(){
|
||||
//参数判读,参数解析,调用参数入库
|
||||
List<Map<String, Object>> select = iBmFormStrucService.listMaps(new QueryWrapper<BmFormStruc>().select("form_type", "form_name").groupBy("form_type"));
|
||||
List<Map<String, Object>> select = iBmFormStrucService.listMaps(new QueryWrapper<BmFormStruc>()
|
||||
.select("form_type", "form_name","id"));
|
||||
List<Map> list = new ArrayList<>();
|
||||
for (Map<String, Object> map : select) {
|
||||
list.add(MapOf.of("lable",map.get("form_name"),"value",map.get("form_type")));
|
||||
list.add(MapOf.of("lable",map.get("form_name"),"value",map.get("form_type"),"id",map.get("id")));
|
||||
}
|
||||
return new ResponseEntity<>(list,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ public interface IBmFormStrucService extends IService<BmFormStruc> {
|
||||
|
||||
BmFormStruc getFormType(String form_type);
|
||||
|
||||
Object queryAll(FormStrucQuery query, PageQuery pageQuery);
|
||||
Object queryTree(FormStrucQuery query, PageQuery pageQuery);
|
||||
|
||||
}
|
||||
|
||||
@@ -123,10 +123,5 @@ public class BmFormStruc implements Serializable {
|
||||
*/
|
||||
private String parent_id;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<BmFormStruc> children = new ArrayList<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean hasChildren = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@ public class FormStrucQuery extends BaseQuery<BmFormStruc> {
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
// this.doP.put("parent_id", QParam.builder().k(new String[]{"parent_id"}).type(QueryTEnum.NULL_OR_EMPTY).build());
|
||||
this.doP.put("form_type", QParam.builder().k(new String[]{"form_type"}).type(QueryTEnum.LK).build());
|
||||
this.doP.put("search", QParam.builder().k(new String[]{"form_name"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package org.nl.wms.config_manage.form_struc.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -10,15 +8,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.CopyUtil;
|
||||
import org.nl.wms.config_manage.form_struc.service.dao.BmFormStruc;
|
||||
import org.nl.wms.config_manage.form_struc.service.dao.mapper.BmFormStrucMapper;
|
||||
import org.nl.wms.config_manage.form_struc.service.IBmFormStrucService;
|
||||
import org.nl.wms.config_manage.form_struc.service.dto.BmFormStrucDto;
|
||||
import org.nl.wms.config_manage.form_struc.service.dto.FormStrucQuery;
|
||||
import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
|
||||
import org.nl.wms.flow_manage.flow.service.execution.dao.ActRuExecution;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -40,25 +43,33 @@ public class BmFormStrucServiceImpl extends ServiceImpl<BmFormStrucMapper, BmFor
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object queryAll(FormStrucQuery query, PageQuery page) {
|
||||
LambdaQueryWrapper<BmFormStruc> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.isNull(BmFormStruc::getParent_id);
|
||||
Page<BmFormStruc> executionPage = this.page(page.build(), lqw);
|
||||
List<BmFormStruc> records = executionPage.getRecords();
|
||||
this.findChildren(records);
|
||||
public Object queryTree(FormStrucQuery query, PageQuery page) {
|
||||
QueryWrapper<BmFormStruc> build = (QueryWrapper)query.build();
|
||||
build.isNull("parent_id");
|
||||
Page executionPage = this.page(page.build(), build);
|
||||
executionPage.setRecords(this.findChildren(executionPage.getRecords()));
|
||||
return TableDataInfo.build(executionPage);
|
||||
}
|
||||
|
||||
private void findChildren(List<BmFormStruc> records) {
|
||||
for (BmFormStruc record : records) {
|
||||
LambdaQueryWrapper<BmFormStruc> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(BmFormStruc::getParent_id, record.getId());
|
||||
List<BmFormStruc> list = this.list(lambdaQueryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
record.setHasChildren(true);
|
||||
record.setChildren(list);
|
||||
this.findChildren(list);
|
||||
private List<BmFormStrucDto> findChildren(List<BmFormStruc> records) {
|
||||
List<BmFormStrucDto> list = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(records)){
|
||||
List<String> ids = records.stream().filter(BmFormStruc::getHas_child).map(BmFormStruc::getId).collect(Collectors.toList());
|
||||
List<BmFormStruc> childs = this.list(new QueryWrapper<BmFormStruc>().in("parent_id", ids));
|
||||
Map<String, List<BmFormStruc>> childMap = childs.stream().collect(Collectors.groupingBy(BmFormStruc::getParent_id));
|
||||
for (BmFormStruc record : records) {
|
||||
BmFormStrucDto strucDto = new BmFormStrucDto();
|
||||
BeanUtils.copyProperties(record, strucDto);
|
||||
list.add(strucDto);
|
||||
if (record.getHas_child()){
|
||||
List<BmFormStruc> childList = childMap.get(strucDto.getId());
|
||||
if (CollectionUtil.isNotEmpty(childList)) {
|
||||
strucDto.setHasChildren(true);
|
||||
strucDto.setChildren(CopyUtil.copyList(childList,BmFormStrucDto.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ 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.struct.service.dto.StructattrQuery;
|
||||
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.Decisioner;
|
||||
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.IStIvtIostorinvdtlInService;
|
||||
@@ -41,12 +39,6 @@ public class AlleyAveRuleHandler extends Decisioner<StIvtStructattr, PmFormData>
|
||||
private IStIvtStructattrService iStIvtStructattrService;
|
||||
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 巷道均衡策略
|
||||
* @param list :仓位集合
|
||||
@@ -139,70 +131,70 @@ public class AlleyAveRuleHandler extends Decisioner<StIvtStructattr, PmFormData>
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据明细物料匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtlIn 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;
|
||||
}
|
||||
// private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
//
|
||||
// // 查询对应的出入库明细
|
||||
// StIvtIostorinvdtlIn 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;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 出库策略 - 查询物料最多的巷道
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
package org.nl.wms.decision_manage.handler.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.common.utils.ListOf;
|
||||
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.Decisioner;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.IStIvtIostorinvdtlInService;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.dao.StIvtIostorinvdtlIn;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -41,11 +36,6 @@ public class ClusterRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlInService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 同类物品集中原则
|
||||
@@ -76,7 +66,7 @@ public class ClusterRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
// resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
@@ -125,58 +115,58 @@ public class ClusterRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据明细物料匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtlIn 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;
|
||||
}
|
||||
// private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
//
|
||||
// // 查询对应的出入库明细
|
||||
// StIvtIostorinvdtlIn 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;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ 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.Decisioner;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.IStIvtIostorinvdtlInService;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.dao.StIvtIostorinvdtlIn;
|
||||
@@ -36,8 +34,8 @@ public class FIFORuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
// @Autowired
|
||||
// private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 巷道均衡策略
|
||||
@@ -68,7 +66,7 @@ public class FIFORuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
// resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
@@ -96,60 +94,60 @@ public class FIFORuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtlIn 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;
|
||||
}
|
||||
// private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
//
|
||||
// // 查询对应的出入库明细
|
||||
// StIvtIostorinvdtlIn 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,28 +1,16 @@
|
||||
package org.nl.wms.decision_manage.handler.impl.base;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.utils.ListOf;
|
||||
import org.nl.common.utils.SpringContextHolder;
|
||||
import org.nl.wms.base_manage.struct.service.dao.StIvtStructattr;
|
||||
import org.nl.wms.base_manage.vehicle.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.base_manage.vehicleext.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.base_manage.vehicleext.service.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.IBmVehicleInfoService;
|
||||
import org.nl.wms.base_manage.vehicle.vehicleInfo.service.dao.BmVehicleInfo;
|
||||
import org.nl.wms.decision_manage.handler.Decisioner;
|
||||
import org.nl.wms.decision_manage.service.IStStrategyConfigService;
|
||||
import org.nl.wms.decision_manage.service.dao.StStrategyConfig;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.IStIvtIostorinvdtlInService;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.dao.StIvtIostorinvdtlIn;
|
||||
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.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.utils.SpringContextHolder;
|
||||
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.Decisioner;
|
||||
import org.nl.wms.decision_manage.service.IStStrategyConfigService;
|
||||
import org.nl.wms.decision_manage.service.dao.StStrategyConfig;
|
||||
@@ -42,8 +40,7 @@ public class NearbyRuleHandler extends Decisioner<StIvtStructattr,StIvtIostorinv
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
|
||||
/**
|
||||
* 就近放置策略:根据出入库顺序进行判断
|
||||
@@ -83,61 +80,61 @@ public class NearbyRuleHandler extends Decisioner<StIvtStructattr,StIvtIostorinv
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 先进行顺序排序
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtlIn 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;
|
||||
}
|
||||
// private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
//
|
||||
// // 先进行顺序排序
|
||||
//
|
||||
// // 查询对应的出入库明细
|
||||
// StIvtIostorinvdtlIn 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,19 +1,12 @@
|
||||
package org.nl.wms.decision_manage.handler.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.common.utils.SpringContextHolder;
|
||||
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.Decisioner;
|
||||
import org.nl.wms.decision_manage.service.IStStrategyConfigService;
|
||||
import org.nl.wms.decision_manage.service.dao.StStrategyConfig;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.IStIvtIostorinvdtlInService;
|
||||
import org.nl.wms.stor_manage.service.in.iostor_dtl.dao.StIvtIostorinvdtlIn;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -30,19 +23,12 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service("weight")
|
||||
public class WeightRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
//每个策略的配置信息
|
||||
private static StStrategyConfig stStrategyConfig;
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvdtlInService iStIvtIostorinvdtlService;
|
||||
|
||||
/**
|
||||
* 载具扩展属性服务服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
/**
|
||||
* 轻上重下策略:根据物品的重量
|
||||
@@ -73,7 +59,7 @@ public class WeightRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
break;
|
||||
case "2":
|
||||
// 出库策略
|
||||
resultList = outHandler(list,jsonParam);
|
||||
// resultList = outHandler(list,jsonParam);
|
||||
break;
|
||||
case "3":
|
||||
// 通用策略
|
||||
@@ -104,59 +90,59 @@ public class WeightRuleHandler extends Decisioner<StIvtStructattr,String> {
|
||||
* @param jsonParam:iostorinvdtlId : 出入库明细标识(此方法只根据时间匹配)
|
||||
* @return List<StIvtStructattr> :需出库仓位集合
|
||||
*/
|
||||
private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
|
||||
// 查询对应的出入库明细
|
||||
StIvtIostorinvdtlIn 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;
|
||||
}
|
||||
// private List<StIvtStructattr> outHandler(List<StIvtStructattr> attrList, JSONObject jsonParam) {
|
||||
//
|
||||
// // 查询对应的出入库明细
|
||||
// StIvtIostorinvdtlIn 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;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -35,22 +35,7 @@ public class MdGruopDick implements Serializable {
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
private String mst_id;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 子否含有子载具
|
||||
*/
|
||||
private Boolean has_child;
|
||||
|
||||
/**
|
||||
* 组盘状态
|
||||
*/
|
||||
private String status;
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 父载具
|
||||
@@ -58,49 +43,22 @@ public class MdGruopDick implements Serializable {
|
||||
private String parent_vehicle_code;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
* 组盘状态
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 物料规格
|
||||
*/
|
||||
private String material_spec;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
/**
|
||||
* 数量计量单位标识
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 数量计量单位名称
|
||||
*/
|
||||
private String qty_unit_name;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 源单
|
||||
*/
|
||||
private String source_form_type;
|
||||
/**
|
||||
* 源单id
|
||||
*/
|
||||
private String source_form_id;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
@@ -111,6 +69,10 @@ public class MdGruopDick implements Serializable {
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 自定义字段
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package org.nl.wms.md_manage.group_dick.service.dao.mapper;
|
||||
|
||||
import org.nl.wms.md_manage.group_dick.service.dao.MdGroupMst;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具组盘主表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-04-28
|
||||
*/
|
||||
public interface MdGroupMstMapper extends BaseMapper<MdGroupMst> {
|
||||
|
||||
}
|
||||
@@ -25,11 +25,10 @@
|
||||
|
||||
<select id="query" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
child.*
|
||||
*
|
||||
FROM
|
||||
md_gruop_dick child
|
||||
md_gruop_dick
|
||||
<where>
|
||||
has_child = false
|
||||
<if test="query.material_code != null and query.material_code != ''">
|
||||
and material_code = #{query.material_code}
|
||||
</if>
|
||||
@@ -42,7 +41,7 @@
|
||||
<if test="query.form_query != null and query.form_query.size() > 0">
|
||||
<foreach collection="query.form_query" item="value" index="key" >
|
||||
<if test="value != null and value != ''">
|
||||
and JSON_CONTAINS(child.form_data, '{"${key}":"${value}"}')
|
||||
and JSON_CONTAINS(form_data, '{"${key}":"${value}"}')
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
@@ -13,8 +13,6 @@ import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.config_manage.form_struc.service.IBmFormStrucService;
|
||||
import org.nl.wms.config_manage.form_struc.service.dao.BmFormStruc;
|
||||
import org.nl.wms.flow_manage.flow.service.execution.IFlowOperationService;
|
||||
import org.nl.wms.md_manage.group_dick.service.IMdGroupMstService;
|
||||
import org.nl.wms.md_manage.group_dick.service.dao.MdGroupMst;
|
||||
import org.nl.wms.md_manage.group_dick.service.dao.MdGruopDick;
|
||||
import org.nl.wms.md_manage.group_dick.service.dao.mapper.MdGruopDickMapper;
|
||||
import org.nl.wms.md_manage.group_dick.service.IMdGruopDickService;
|
||||
@@ -44,10 +42,7 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
|
||||
|
||||
@Autowired
|
||||
private IFlowOperationService iFlowOperationService;
|
||||
@Autowired
|
||||
private IBmFormStrucService iBmFormStrucService;
|
||||
@Autowired
|
||||
private IMdGroupMstService iMdGroupMstService;
|
||||
|
||||
|
||||
@Override
|
||||
public Object queryAll(GroupDickQuery query, PageQuery pageQuery) {
|
||||
@@ -68,7 +63,7 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
|
||||
forms.put("update_name",SecurityUtils.getCurrentNickName());
|
||||
forms.put("update_time",DateUtil.now());
|
||||
forms.put("id",IdUtil.getStringId());
|
||||
MdGroupMst mdGroupMst = forms.toJavaObject(MdGroupMst.class);
|
||||
MdGruopDick mdGroupMst = forms.toJavaObject(MdGruopDick.class);
|
||||
if (!CollectionUtils.isEmpty(forms)){
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (int i = 0; i < tableData.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user