fix:PC出入库

This commit is contained in:
zhangzq
2025-06-30 20:04:44 +08:00
parent bf1480032f
commit d427b9e093
11 changed files with 31 additions and 4701 deletions

View File

@@ -4,29 +4,29 @@
<select id="getCanuseIvt" resultType="com.alibaba.fastjson.JSONObject">
SELECT
ext.storagevehicleext_id,
ext.storagevehicle_code,
ext.material_id,
material.material_code,
grop.group_id,
grop.storagevehicle_code,
grop.material_id,
grop.qty,
grop.frozen_qty,
grop.pcsn,
grop.ext_code,
grop.status,
material.material_spec,
material.material_name,
ext.pcsn,
ext.qty_unit_id,
ext.qty_unit_name,
ext.canuse_qty AS qty,
ext.frozen_qty,
attr.sect_name AS turnout_sect_name,
attr.sect_code AS turnout_sect_code,
attr.sect_id,
attr.struct_id,
attr.struct_code AS turnout_struct_code
FROM
md_pb_storagevehicleext ext
INNER JOIN md_me_materialbase material ON material.material_id = ext.material_id
INNER JOIN st_ivt_structattr attr ON ext.storagevehicle_code = attr.storagevehicle_code
md_pb_groupplate grop
INNER JOIN md_me_materialbase material ON material.material_id = grop.material_id
INNER JOIN st_ivt_structattr attr ON grop.storagevehicle_code = attr.storagevehicle_code
<where>
attr.lock_type = '0'
AND attr.is_used = "1"
AND ext.canuse_qty > 0
AND grop.qty > 0 and grop.frozen_qty = 0
<if test="param.stor_id != null and param.stor_id != ''">
AND
attr.stor_id LIKE #{param.stor_id}
@@ -44,16 +44,15 @@
<if test="param.material_code != null and param.material_code != ''">
AND
material.material_code LIKE #{param.material_code}
grop.material_code LIKE #{param.material_code}
</if>
<if test="param.pcsn != null and param.pcsn != ''">
AND
ext.pcsn = #{param.pcsn}
grop.pcsn = #{param.pcsn}
</if>
</where>
ORDER BY ext.insert_time Desc
ORDER BY grop.create_time Desc
</select>
<select id="queryAllByPage" resultType="com.alibaba.fastjson.JSONObject">

View File

@@ -184,7 +184,7 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
stor_cas.put("label", stor_jo.getStor_name());
List<Sectattr> sectattrList = sectattrMapper.selectList(new LambdaQueryWrapper<>(Sectattr.class)
.select(Sectattr::getSect_id,Sectattr::getSect_name)
.select(Sectattr::getSect_code,Sectattr::getSect_name)
.eq(StrUtil.isNotEmpty(stor_jo.getStor_id()),Sectattr::getStor_id,stor_jo.getStor_id())
.eq(StrUtil.isNotEmpty(sect_type_attr),Sectattr::getSect_type_attr,sect_type_attr)
.eq(Sectattr::getIs_delete,BaseDataEnum.IS_YES_NOT.code(""))
@@ -196,7 +196,7 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
for (int j = 0; j < sectattrList.size(); j++) {
Sectattr sect_jo = sectattrList.get(j);
JSONObject sect_cas = new JSONObject();
sect_cas.put("value", sect_jo.getSect_id());
sect_cas.put("value", sect_jo.getSect_code());
sect_cas.put("label", sect_jo.getSect_name());
sect_ja.add(sect_cas);
}

View File

@@ -116,7 +116,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getByCode(unit_code);
GroupPlate groupDao = iMdPbGroupplateService.getOne(
new QueryWrapper<GroupPlate>().lambda()
.eq(GroupPlate::getMaterial_code, materDao.getMaterial_code())
.eq(GroupPlate::getMaterial_id, materDao.getMaterial_id())
.eq(GroupPlate::getPcsn, pcsn)
.eq(GroupPlate::getQty, qty)
.eq(GroupPlate::getQty_unit_id, unitDao.getMeasure_unit_id())
@@ -129,7 +129,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
// 插入组盘记录表
groupDao = new GroupPlate();
groupDao.setGroup_id(IdUtil.getStringId());
groupDao.setMaterial_code(materDao.getMaterial_code());
groupDao.setMaterial_id(materDao.getMaterial_code());
groupDao.setPcsn(pcsn);
groupDao.setQty_unit_id(unitDao.getMeasure_unit_id());
groupDao.setQty_unit_name(unitDao.getUnit_name());
@@ -171,7 +171,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
);
if (ObjectUtil.isNotEmpty(plateDaoList)) {
boolean is_like = plateDaoList.stream()
.allMatch(row -> row.getMaterial_code().equals(groupDao.getMaterial_code()) &&
.allMatch(row -> row.getMaterial_id().equals(groupDao.getMaterial_id()) &&
row.getPcsn().equals(groupDao.getPcsn())
);
if (!is_like) {
@@ -264,12 +264,12 @@ public class PdaIosInServiceImpl implements PdaIosInService {
HashMap<String, String> dtl = new HashMap<>();
GroupPlate plateDao = plateDaoList.get(0);
dtl.put("storagevehicle_code", plateDao.getStoragevehicle_code());
dtl.put("material_id", plateDao.getMaterial_code());
dtl.put("material_id", plateDao.getMaterial_id());
dtl.put("pcsn", plateDao.getPcsn());
dtl.put("qty_unit_id", plateDao.getQty_unit_id());
dtl.put("qty_unit_name", plateDao.getQty_unit_name());
dtl.put("qty", String.valueOf(total_qty));
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(plateDao.getMaterial_code());
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(plateDao.getMaterial_id());
dtl.put("material_code", materDao.getMaterial_code());
dtl.put("material_name", materDao.getMaterial_name());
dtl.put("plan_qty", String.valueOf(total_qty));

View File

@@ -30,7 +30,7 @@ public class GroupPlate implements Serializable {
/**
* 物料编码
*/
private String material_code;
private String material_id;
/**
* 批次

View File

@@ -50,13 +50,13 @@
<select id="getGroupPlate" resultType="org.nl.wms.warehouse_management.service.dto.GroupPlateDto">
SELECT group_id,
storagevehicle_code,
gp.material_code,pcsn,
gp.material_id,pcsn,
qty_unit_id,
qty_unit_name,qty,frozen_qty,remark,
status,ext_code,ext_type,
mater.material_name,mater.material_spec,mater.material_id
mater.material_name,mater.material_spec,mater.material_code
FROM md_pb_groupplate gp
LEFT JOIN md_me_materialbase mater ON mater.material_code = gp.material_code
LEFT JOIN md_me_materialbase mater ON mater.material_id = gp.material_id
<where>
gp.status = '01' and frozen_qty = 0
<if test="params.material_code != null">

View File

@@ -18,20 +18,10 @@ public class GroupPlateDto extends GroupPlate{
*/
private String material_spec;
private String material_id;
private String material_code;
/**
* 物料名称
*/
private String material_name;
/**
* 计划数量
*/
private BigDecimal plan_qty;
/**
* 总数量
*/
private BigDecimal sum_qty;
}

View File

@@ -2,7 +2,6 @@ package org.nl.wms.warehouse_management.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
@@ -24,8 +23,6 @@ import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleext;
import org.nl.wms.basedata_manage.service.dao.Structattr;
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
import org.nl.wms.sch_manage.enums.TaskStatus;
@@ -33,7 +30,6 @@ import org.nl.wms.sch_manage.service.ISchBaseTaskService;
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
import org.nl.wms.sch_manage.service.util.tasks.StInTask;
import org.nl.wms.sch_manage.service.util.tasks.StOutTask;
import org.nl.wms.warehouse_management.enums.IOSConstant;
import org.nl.wms.warehouse_management.enums.IOSEnum;
@@ -48,7 +44,6 @@ import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDtlMapper;
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvMapper;
import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
import org.nl.wms.warehouse_management.service.dto.IOStorInvDtlDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -1137,7 +1132,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
groupPlateMapper.update(new GroupPlate(),new LambdaUpdateWrapper<>(GroupPlate.class)
.set(GroupPlate::getStatus,IOSEnum.GROUP_PLATE_STATUS.code("出库"))
.eq(GroupPlate::getPcsn,ioStorInvDis.getPcsn())
.eq(GroupPlate::getMaterial_code,ioStorInvDis.getMaterial_code())
.eq(GroupPlate::getMaterial_id,ioStorInvDis.getMaterial_id())
.eq(GroupPlate::getStoragevehicle_code,ioStorInvDis.getStoragevehicle_code())
);
}
@@ -1221,7 +1216,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
groupPlateMapper.update(new GroupPlate(),new LambdaUpdateWrapper<>(GroupPlate.class)
.set(GroupPlate::getStatus,IOSEnum.GROUP_PLATE_STATUS.code("出库"))
.eq(GroupPlate::getPcsn,ioStorInvDis.getPcsn())
.eq(GroupPlate::getMaterial_code,ioStorInvDis.getMaterial_code())
.eq(GroupPlate::getMaterial_id,ioStorInvDis.getMaterial_id())
.eq(GroupPlate::getStoragevehicle_code,ioStorInvDis.getStoragevehicle_code())
);

View File

@@ -1,43 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 80030
Source Host : localhost:3306
Source Schema : storm-dev
Target Server Type : MySQL
Target Server Version : 80030
File Encoding : 65001
Date: 06/06/2024 17:11:56
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for system_tenant
-- ----------------------------
DROP TABLE IF EXISTS `system_tenant`;
CREATE TABLE `system_tenant` (
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '租户编号',
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户名',
`contact_user_id` bigint(0) NULL DEFAULT NULL COMMENT '联系人的用户编号',
`contact_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '联系人',
`contact_mobile` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '联系手机',
`status` tinyint(0) NOT NULL DEFAULT 0 COMMENT '租户状态0正常 1停用',
`website` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '绑定域名',
`package_id` bigint(0) NOT NULL COMMENT '租户套餐编号',
`expire_time` datetime(0) NOT NULL COMMENT '过期时间',
`account_count` int(0) NOT NULL COMMENT '账号数量',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 162 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;