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++) {
|
||||
|
||||
@@ -10,8 +10,8 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/delete',
|
||||
method: 'get',
|
||||
url: 'api/bmFormStruc',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
v-for="item in form_types"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -139,7 +139,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="自定义字段2" prop="form_param">
|
||||
<el-form-item label="自定义字段JSON" prop="form_param">
|
||||
<el-input type="textarea" v-model="form.form_param" :formatter="jsonFormat" style="width: 430px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -265,9 +265,12 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getFormSelect() // 获取分类
|
||||
// this.getFormSelect() // 获取分类
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.getFormSelect()
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
this.form.form_param = JSON.stringify(this.form.form_param)
|
||||
return true
|
||||
|
||||
@@ -169,6 +169,7 @@ export default {
|
||||
}
|
||||
const nodeModel = this.lf.getNodeModelById(row.activity_id);
|
||||
nodeModel.setStyle("stroke", "red")
|
||||
nodeModel.setStyle("stroke-width", "2.5")
|
||||
},
|
||||
closeDialog() {
|
||||
this.$data.dialogVisible = false
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="自定义字段2" prop="class_desc">
|
||||
<el-form-item label="自定义字段JSON" prop="class_desc">
|
||||
<el-input type="textarea" v-model="form.form_param" :formatter="jsonFormat" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -110,6 +110,9 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">组盘表配置信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
@@ -137,24 +140,24 @@
|
||||
<el-table-column prop="qty" label="物料数量映射" />
|
||||
<el-table-column prop="pcsn" label="物料批次映射" />
|
||||
<el-table-column prop="form_param" :show-overflow-tooltip="true" :formatter="jsonFormat" label="自定义字段映射" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="250px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="scope.row.is_modify === '0'"
|
||||
:disabled-dle="scope.row.is_modify === '0'"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
/>
|
||||
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="crud.toAddAndData(addSibling(scope.row))">新增同级</el-button>
|
||||
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus" @click="crud.toAddAndData(addChildren(scope.row))">新增子级</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- width="250px"-->
|
||||
<!-- align="center"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <udOperation-->
|
||||
<!-- style="display: inline"-->
|
||||
<!-- :data="scope.row"-->
|
||||
<!-- :permission="permission"-->
|
||||
<!-- :disabled-edit="scope.row.is_modify === '0'"-->
|
||||
<!-- :disabled-dle="scope.row.is_modify === '0'"-->
|
||||
<!-- msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"-->
|
||||
<!-- />-->
|
||||
<!-- <el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="crud.toAddAndData(addSibling(scope.row))">新增同级</el-button>-->
|
||||
<!-- <el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus" @click="crud.toAddAndData(addChildren(scope.row))">新增子级</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
|
||||
@@ -67,22 +73,21 @@
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="storagevehicle_code" label="托盘号">
|
||||
<el-table-column prop="code" label="组盘编号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="vechile(scope.row.vehicle_code)">{{ scope.row.vehicle_code }}</el-link>
|
||||
<el-link type="warning" @click="vechile(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="parent_vehicle_code" label="父托盘" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_specs" label="物料规格" show-overflow-tooltip/>
|
||||
<el-table-column prop="qty" label="总数量"/>
|
||||
<el-table-column prop="qty_unit_name" label="计量单位"/>
|
||||
<el-table-column prop="source_form_type" label="源单号" show-overflow-tooltip/>
|
||||
<el-table-column prop="source_form_id" label="源单id" show-overflow-tooltip/>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.BOX_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_time" label="组盘时间"/>
|
||||
<el-table-column prop="create_time" label="组盘时间"/>
|
||||
<el-table-column prop="create_name" label="组盘人"/>
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
@@ -96,6 +101,7 @@
|
||||
<pagination/>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog ref="viewRef" :form="form" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -109,6 +115,7 @@ import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/md_manage/group_dick/AddDialog'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import ViewDialog from '@/views/wms/md_manage/group_dick/viewDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
@@ -125,11 +132,11 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'DeliveryOrder',
|
||||
dicts: ['PCS_DELIVER_TYPE', 'BOX_STATUS'],
|
||||
components: {AddDialog, formstruc,pagination, crudOperation, rrOperation, udOperation},
|
||||
components: {ViewDialog, AddDialog, formstruc,pagination, crudOperation, rrOperation, udOperation},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '发货单', url: '/api/mdGruopDick', idField: 'bucket_record_id', sort: 'storagevehicle_code,desc',
|
||||
title: '组盘表', url: '/api/mdGruopDick', idField: 'id', sort: 'code,desc',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
@@ -144,6 +151,7 @@ export default {
|
||||
return {
|
||||
cols:[],
|
||||
GroupShow: false,
|
||||
viewShow: false,
|
||||
statusEdit:false,
|
||||
vachileView:false,
|
||||
editForm:{},
|
||||
@@ -158,14 +166,20 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$set(this.query, 'form_query', {})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
formstruc.getHeader('GROUP_DICK').then(res => {
|
||||
formstruc.getHeader('md_gruop_dick').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
querytable(){
|
||||
this.crud.toQuery()
|
||||
},
|
||||
vechile(row){
|
||||
this.$refs.viewRef.setForm(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="托盘明细"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="80%"
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column type="index" fixed width="80" label="序号" />
|
||||
<el-table-column prop="storagevehicle_code" fixed width="120" label="托盘号" />
|
||||
<el-table-column prop="sale_code" width="120" label="销售单号" />
|
||||
<el-table-column prop="seq_no" label="销售单明细" width="100" />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="150" />
|
||||
<el-table-column prop="storage_qty" label="数量" width="150" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" width="150" />
|
||||
<el-table-column prop="create_time" label="组盘时间" width="150" />
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.BOX_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bucketrecord from '@/views/wms/md_manage/group_dick/groupdick'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'vechileViewDialog',
|
||||
components: {pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '组盘明细', url: '/api/mdPbBucketrecord/vechile_code', crudMethod: { ...bucketrecord }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['BOX_STATUS'],
|
||||
props: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
checkrow: null,
|
||||
rows: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openQ(query) {
|
||||
this.crud.query.storagevehicle_code = query
|
||||
this.dialogVisible = true
|
||||
this.crud.toQuery()
|
||||
},
|
||||
submit() {
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
224
wms_pro/qd/src/views/wms/md_manage/group_dick/viewDialog.vue
Normal file
224
wms_pro/qd/src/views/wms/md_manage/group_dick/viewDialog.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="dialogVisible"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="主载具编码" prop="parent_vehicle_code">
|
||||
<label slot="label">主载具编码:</label>
|
||||
<el-input v-model="form.parent_vehicle_code" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="子托盘总数" prop="child_qty">
|
||||
<label slot="label">子托盘总数:</label>
|
||||
<el-input-number
|
||||
v-model="form.child_qty"
|
||||
:controls="false"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编号" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].vehicle_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="has_child" label="是否含有子载具" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].has_child" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="parent_vehicle_code" label="父载具编码" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].parent_vehicle_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_name" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_spec" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="数量" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty_unit_name" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].remark" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import vehicleMater from '@/views/wms/md_manage/vehicleMater/vehicleMater'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
parent_vehicle_code: '',
|
||||
child_qty: '0',
|
||||
remark: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
status: '',
|
||||
tableData: [],
|
||||
form_data: {}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'viewDialog',
|
||||
components: { formstruc, vehicleMater },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area', 'PCS_SAL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
dialogVisible: false,
|
||||
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setForm(row){
|
||||
this.form=row
|
||||
this.dialogVisible = true
|
||||
vehicleMater.
|
||||
},
|
||||
open() {
|
||||
formstruc.getHeader('md_gruop_dick').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
}),
|
||||
formstruc.getHeader('md_pb_vehicleivt').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -209,15 +209,18 @@ export default {
|
||||
this.crud.notify('同步类型不能为空!!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
|
||||
const isInvalidRow = this.tableData.some(row => !row.mapping_field)
|
||||
if (isInvalidRow) {
|
||||
this.crud.notify('外部字段名称不能为空!!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
const isdtlRow = this.tableDtlData.some(row => !row.mapping_field)
|
||||
if (isdtlRow) {
|
||||
this.crud.notify('外部字段名称不能为空!!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
if (this.form.has_child){
|
||||
const isdtlRow = this.tableDtlData.some(row => !row.mapping_field)
|
||||
if (isdtlRow) {
|
||||
this.crud.notify('外部字段名称不能为空!!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
const requestData = {
|
||||
'mst': this.form,
|
||||
|
||||
Reference in New Issue
Block a user