Merge remote-tracking branch 'origin/master'

This commit is contained in:
zccbbg 2023-07-26 14:46:33 +08:00
commit bd9bce39da
5 changed files with 31 additions and 32 deletions

View file

@ -249,7 +249,6 @@ INSERT INTO `sys_dict_data` VALUES (116, 4, '入库完成', '3', 'wms_receipt_st
INSERT INTO `sys_dict_data` VALUES (117, 3, '作废', '4', 'wms_receipt_status', NULL, 'default', 'N', '0', 1, '2022-09-21 11:59:23.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (117, 3, '作废', '4', 'wms_receipt_status', NULL, 'default', 'N', '0', 1, '2022-09-21 11:59:23.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (118, 0, '销售出库', '11', 'wms_shipment_type', NULL, 'default', 'N', '0', 1, '2022-10-20 13:34:06.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (118, 0, '销售出库', '11', 'wms_shipment_type', NULL, 'default', 'N', '0', 1, '2022-10-20 13:34:06.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (119, 1, '外协出库', '12', 'wms_shipment_type', NULL, 'default', 'N', '0', 1, '2022-10-20 13:34:26.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (119, 1, '外协出库', '12', 'wms_shipment_type', NULL, 'default', 'N', '0', 1, '2022-10-20 13:34:26.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (120, 2, '调拨出库', '13', 'wms_shipment_type', NULL, 'default', 'N', '0', 1, '2022-10-20 13:34:42.000', 1, '2022-11-01 17:50:58.000', NULL);
INSERT INTO `sys_dict_data` VALUES (121, 0, '未发货', '11', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:02.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (121, 0, '未发货', '11', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:02.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (122, 1, '部分发货', '12', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:26.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (122, 1, '部分发货', '12', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:26.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (123, 2, '已发货', '13', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:44.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (123, 2, '已发货', '13', 'wms_shipment_status', NULL, 'default', 'N', '0', 1, '2022-10-20 13:40:44.000', NULL, NULL, NULL);
@ -268,7 +267,8 @@ INSERT INTO `sys_dict_data` VALUES (135, 0, '采购入库', '33', 'wms_supplier_
INSERT INTO `sys_dict_data` VALUES (136, 0, '结款', '11', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 16:59:16.000', NULL, NULL, NULL); INSERT INTO `sys_dict_data` VALUES (136, 0, '结款', '11', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 16:59:16.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (137, 0, '应收', '22', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 16:59:28.000', 1, '2023-05-04 17:49:51.000', NULL); INSERT INTO `sys_dict_data` VALUES (137, 0, '应收', '22', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 16:59:28.000', 1, '2023-05-04 17:49:51.000', NULL);
INSERT INTO `sys_dict_data` VALUES (138, 0, '销售出库', '33', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 17:00:43.000', 1, '2023-05-04 17:40:09.000', NULL); INSERT INTO `sys_dict_data` VALUES (138, 0, '销售出库', '33', 'wms_customer_transaction_type', NULL, 'default', 'N', '0', 1, '2023-05-04 17:00:43.000', 1, '2023-05-04 17:40:09.000', NULL);
INSERT INTO `sys_dict_data` VALUES (139, 1, '盘盈入库', '32', 'wms_check_type', NULL, 'default', 'N', '0', 1, '2023-07-25 05:30:29.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_data` VALUES (140, 0, '盘亏出库', '31', 'wms_check_type', NULL, 'default', 'N', '0', 1, '2023-07-25 05:30:52.000', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- Table structure for sys_dict_type -- Table structure for sys_dict_type
-- ---------------------------- -- ----------------------------
@ -312,6 +312,7 @@ INSERT INTO `sys_dict_type` VALUES (108, '移库状态', 'wms_movement_status',
INSERT INTO `sys_dict_type` VALUES (109, '盘点单据状态', 'wms_check_status', '0', 1, '2023-04-26 11:17:35.000', NULL, NULL, NULL); INSERT INTO `sys_dict_type` VALUES (109, '盘点单据状态', 'wms_check_status', '0', 1, '2023-04-26 11:17:35.000', NULL, NULL, NULL);
INSERT INTO `sys_dict_type` VALUES (110, '供应商账号交易类型', 'wms_supplier_transaction_type', '0', 1, '2023-05-04 12:52:59.000', NULL, NULL, '1:结款2:应付3:入库单'); INSERT INTO `sys_dict_type` VALUES (110, '供应商账号交易类型', 'wms_supplier_transaction_type', '0', 1, '2023-05-04 12:52:59.000', NULL, NULL, '1:结款2:应付3:入库单');
INSERT INTO `sys_dict_type` VALUES (111, '客户账户交易类型', 'wms_customer_transaction_type', '0', 1, '2023-05-04 16:58:45.000', NULL, NULL, '1:结款2:应付3:出库单'); INSERT INTO `sys_dict_type` VALUES (111, '客户账户交易类型', 'wms_customer_transaction_type', '0', 1, '2023-05-04 16:58:45.000', NULL, NULL, '1:结款2:应付3:出库单');
INSERT INTO `sys_dict_type` VALUES (112, '盘点类型', 'wms_check_type', '0', 1, '2023-07-25 05:29:44.000', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- Table structure for sys_job -- Table structure for sys_job

View file

@ -20,5 +20,5 @@ public interface ReceiptOrderConstant {
//退货 //退货
int RETURN = 3; int RETURN = 3;
//盘盈入库 //盘盈入库
int CHECK = 4; int CHECK_IN = 32;
} }

View file

@ -18,5 +18,5 @@ public interface ShipmentOrderConstant {
//部门领料出库 //部门领料出库
int DEPT = 14; int DEPT = 14;
//盘亏出库 //盘亏出库
int CHECK = 15; int CHECK_OUT = 31;
} }

View file

@ -1,14 +1,5 @@
package com.cyl.wms.service; package com.cyl.wms.service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.time.LocalDateTime;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -16,11 +7,14 @@ import com.cyl.wms.constant.ReceiptOrderConstant;
import com.cyl.wms.constant.ShipmentOrderConstant; import com.cyl.wms.constant.ShipmentOrderConstant;
import com.cyl.wms.convert.InventoryCheckConvert; import com.cyl.wms.convert.InventoryCheckConvert;
import com.cyl.wms.convert.InventoryCheckDetailConvert; import com.cyl.wms.convert.InventoryCheckDetailConvert;
import com.cyl.wms.domain.InventoryCheck;
import com.cyl.wms.domain.InventoryCheckDetail; import com.cyl.wms.domain.InventoryCheckDetail;
import com.cyl.wms.domain.InventoryHistory; import com.cyl.wms.domain.InventoryHistory;
import com.cyl.wms.domain.Item; import com.cyl.wms.domain.Item;
import com.cyl.wms.mapper.InventoryCheckDetailMapper; import com.cyl.wms.mapper.InventoryCheckDetailMapper;
import com.cyl.wms.mapper.InventoryCheckMapper;
import com.cyl.wms.pojo.query.InventoryCheckDetailQuery; import com.cyl.wms.pojo.query.InventoryCheckDetailQuery;
import com.cyl.wms.pojo.query.InventoryCheckQuery;
import com.cyl.wms.pojo.query.ItemQuery; import com.cyl.wms.pojo.query.ItemQuery;
import com.cyl.wms.pojo.vo.InventoryCheckDetailVO; import com.cyl.wms.pojo.vo.InventoryCheckDetailVO;
import com.cyl.wms.pojo.vo.ItemVO; import com.cyl.wms.pojo.vo.ItemVO;
@ -28,15 +22,19 @@ import com.cyl.wms.pojo.vo.form.InventoryCheckFrom;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.cyl.wms.mapper.InventoryCheckMapper;
import com.cyl.wms.domain.InventoryCheck;
import com.cyl.wms.pojo.query.InventoryCheckQuery;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* 库存盘点单据Service业务层处理 * 库存盘点单据Service业务层处理
* *
@ -284,10 +282,10 @@ public class InventoryCheckService {
return; return;
} else if (subtract.compareTo(BigDecimal.ZERO) > 0) { } else if (subtract.compareTo(BigDecimal.ZERO) > 0) {
// 盘盈入库 // 盘盈入库
h.setFormType(ReceiptOrderConstant.CHECK); h.setFormType(ReceiptOrderConstant.CHECK_IN);
} else { } else {
// 盘亏出库 // 盘亏出库
h.setFormType(ShipmentOrderConstant.CHECK); h.setFormType(ShipmentOrderConstant.CHECK_OUT);
} }
h.setQuantity(subtract); h.setQuantity(subtract);

View file

@ -1,11 +1,5 @@
package com.cyl.wms.service; package com.cyl.wms.service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.time.LocalDateTime;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cyl.wms.constant.ShipmentOrderConstant; import com.cyl.wms.constant.ShipmentOrderConstant;
@ -14,11 +8,14 @@ import com.cyl.wms.convert.ShipmentOrderConvert;
import com.cyl.wms.convert.ShipmentOrderDetailConvert; import com.cyl.wms.convert.ShipmentOrderDetailConvert;
import com.cyl.wms.domain.*; import com.cyl.wms.domain.*;
import com.cyl.wms.mapper.ShipmentOrderDetailMapper; import com.cyl.wms.mapper.ShipmentOrderDetailMapper;
import com.cyl.wms.mapper.ShipmentOrderMapper;
import com.cyl.wms.pojo.query.DeliveryQuery; import com.cyl.wms.pojo.query.DeliveryQuery;
import com.cyl.wms.pojo.query.ItemQuery; import com.cyl.wms.pojo.query.ItemQuery;
import com.cyl.wms.pojo.query.ShipmentOrderDetailQuery; import com.cyl.wms.pojo.query.ShipmentOrderDetailQuery;
import com.cyl.wms.pojo.vo.*; import com.cyl.wms.pojo.query.ShipmentOrderQuery;
import com.cyl.wms.pojo.vo.form.ReceiptOrderForm; import com.cyl.wms.pojo.vo.ItemVO;
import com.cyl.wms.pojo.vo.ShipmentOrderDetailVO;
import com.cyl.wms.pojo.vo.ShipmentOrderVO;
import com.cyl.wms.pojo.vo.form.ShipmentOrderFrom; import com.cyl.wms.pojo.vo.form.ShipmentOrderFrom;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
@ -26,17 +23,20 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.cyl.wms.mapper.ShipmentOrderMapper;
import com.cyl.wms.pojo.query.ShipmentOrderQuery;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/** /**
* 出库单Service业务层处理 * 出库单Service业务层处理
* *
@ -251,7 +251,7 @@ public class ShipmentOrderService {
InventoryHistory h = detailConvert.do2InventoryHistory(it); InventoryHistory h = detailConvert.do2InventoryHistory(it);
h.setFormId(order.getId()); h.setFormId(order.getId());
h.setFormType(order.getShipmentOrderType()); h.setFormType(order.getShipmentOrderType());
h.setQuantity(added); h.setQuantity(added.negate());
h.setDelFlag(0); h.setDelFlag(0);
h.setId(null); h.setId(null);
h.setCreateTime(now); h.setCreateTime(now);
@ -260,7 +260,7 @@ public class ShipmentOrderService {
}); });
if (adds.size() > 0) { if (adds.size() > 0) {
int add1 = inventoryHistoryService.batchInsert(adds); int add1 = inventoryHistoryService.batchInsert(adds);
adds.forEach(it -> it.setQuantity(it.getQuantity().negate())); // adds.forEach(it -> it.setQuantity(it.getQuantity().negate()));
int update1 = inventoryService.batchUpdate1(adds); int update1 = inventoryService.batchUpdate1(adds);
log.info("inventoryHistory: {}, inventory: {}", add1, update1); log.info("inventoryHistory: {}, inventory: {}", add1, update1);
} }