diff --git a/yxt-wms-biz/docs/databases/tables/create_table_base.sql b/yxt-wms-biz/docs/databases/tables/create_table_base.sql new file mode 100644 index 0000000000..52a1043939 --- /dev/null +++ b/yxt-wms-biz/docs/databases/tables/create_table_base.sql @@ -0,0 +1,326 @@ + + +DROP TABLE IF EXISTS `base_goods_spu`; +CREATE TABLE `base_goods_spu` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + + goodsCode varchar(64) DEFAULT NULL COMMENT '商品代码', + barCode varchar(64) DEFAULT NULL COMMENT '条形码', + goodsName varchar(200) DEFAULT NULL COMMENT '商品名称', + goodsPY varchar(64) DEFAULT NULL COMMENT '拼音缩写', + goodsShortName varchar(64) DEFAULT NULL COMMENT '商品简称', + externalCode varchar(64) DEFAULT NULL COMMENT '外部编码', + factoryCode varchar(64) DEFAULT NULL COMMENT '厂家货号', + typeSid varchar(64) DEFAULT NULL COMMENT '分类sid', + isListed int DEFAULT NULL COMMENT '是否上架', + brandSid varchar(64) DEFAULT NULL COMMENT '品牌sid', + manufacturerSid varchar(64) DEFAULT NULL COMMENT '厂家sid', + goodsUnitSid varchar(64) DEFAULT NULL COMMENT '商品单位sid', + goodsModelSid varchar(64) DEFAULT NULL COMMENT '供应商sid', + taxRate decimal(2,2) DEFAULT NULL COMMENT '税率', + shelfLife int DEFAULT NULL COMMENT '保质期天', + nationalStandardCode varchar(64) DEFAULT NULL COMMENT '国标码', + sortNo int DEFAULT NULL COMMENT '排序', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品spu'; + +DROP TABLE IF EXISTS `base_goods_spu_detail`; +CREATE TABLE `base_goods_spu_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + + goodSpuSid varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + goodsExplain text DEFAULT NULL COMMENT '商品详细说明', + goodsDescription varchar(64) DEFAULT NULL COMMENT '商品描述', + length decimal(10,2) DEFAULT NULL COMMENT '长度cm', + width decimal(10,2) DEFAULT NULL COMMENT '宽度cm', + height decimal(10,2) DEFAULT NULL COMMENT '高度cm', + volume decimal(10,2) DEFAULT NULL COMMENT '体积cm3', + picUrl varchar(500) DEFAULT NULL COMMENT '图片', + producer varchar(200) DEFAULT NULL COMMENT '产地', + costPrice decimal(10,2) DEFAULT NULL COMMENT '成本价', + tagPrice decimal(10,2) DEFAULT NULL COMMENT '吊牌价', + salesPrice decimal(10,2) DEFAULT NULL COMMENT '销售单价', + standardPurchasePrice decimal(10,2) DEFAULT NULL COMMENT '标准进价', + agencyPrice decimal(10,2) DEFAULT NULL COMMENT '代理价', + discount decimal(10,2) DEFAULT NULL COMMENT '折扣', + minimumSalesPrice decimal(10,2) DEFAULT NULL COMMENT '最低零售价', + safetyStockDays int DEFAULT NULL COMMENT '安全库存天数', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品详情'; + +DROP TABLE IF EXISTS `base_goods_sku`; +CREATE TABLE `base_goods_sku` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + + goodsSkuCode varchar(64) DEFAULT NULL COMMENT '商品Sku代码', + goodsSkuName varchar(200) DEFAULT NULL COMMENT '商品Sku名称', + goodsSpuSid varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + externalCode varchar(64) DEFAULT NULL COMMENT '外部编码', + length decimal(10,2) DEFAULT NULL COMMENT '长度cm', + width decimal(10,2) DEFAULT NULL COMMENT '宽度cm', + height decimal(10,2) DEFAULT NULL COMMENT '高度cm', + volume decimal(10,2) DEFAULT NULL COMMENT '体积cm3', + colourSid varchar(64) DEFAULT NULL COMMENT '颜色sid', + sizeSid varchar(64) DEFAULT NULL COMMENT '尺码sid', + grossWeight decimal(10,2) DEFAULT NULL COMMENT '毛重g', + netWeight decimal(10,2) DEFAULT NULL COMMENT '净重g', + finalPurchasePrice decimal(10,2) DEFAULT NULL COMMENT '最后采购价', + safetyStockDays int DEFAULT NULL COMMENT '安全库存天数', + isOriginalFactory int DEFAULT NULL COMMENT '是否原厂', + isInventoryAlert int DEFAULT NULL COMMENT '是否库存警戒', + InventoryAlertUpperLimit int DEFAULT NULL COMMENT '库存警戒上线', + InventoryAlertLowerLimit int DEFAULT NULL COMMENT '库存警戒下线', + costPrice decimal(10,2) DEFAULT NULL COMMENT '成本价', + tagPrice decimal(10,2) DEFAULT NULL COMMENT '吊牌价', + salesPrice decimal(10,2) DEFAULT NULL COMMENT '销售单价', + standardPurchasePrice decimal(10,2) DEFAULT NULL COMMENT '标准进价', + agencyPrice decimal(10,2) DEFAULT NULL COMMENT '代理价', + discount decimal(10,2) DEFAULT NULL COMMENT '折扣', + minimumSalesPrice decimal(10,2) DEFAULT NULL COMMENT '最低零售价', + isLockingSalesPrice int DEFAULT NULL COMMENT '是否锁定销售价', + isIntegralExchange int DEFAULT NULL COMMENT '是否可以积分兑换', + integralAmount int DEFAULT NULL COMMENT '积分数量', + sortNo int DEFAULT NULL COMMENT '排序', + picUrl varchar(500) DEFAULT NULL COMMENT '图片', + model varchar(200) DEFAULT NULL COMMENT '型号', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品sku'; + +DROP TABLE IF EXISTS `base_goods_sku_extend`; +CREATE TABLE `base_goods_sku_extend` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +goodsSkuCode varchar(64) DEFAULT NULL COMMENT '商品Sku代码', +component varchar(64) DEFAULT NULL COMMENT '成分', +pattern varchar(64) DEFAULT NULL COMMENT '花纹', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品sku扩展表'; + +DROP TABLE IF EXISTS `base_goods_type`; +CREATE TABLE `base_goods_type` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +goodsTypeName varchar(64) DEFAULT NULL COMMENT '商品类别名称', +goodsTypeCode varchar(64) DEFAULT NULL COMMENT '类别编码', +percentageRate int DEFAULT NULL COMMENT '提成比例', +percentageAmount double(10,2) DEFAULT NULL COMMENT '提成金额', +pSid varchar(64) DEFAULT NULL COMMENT '父级sid', +isGoodsID int DEFAULT NULL COMMENT '是否一品一码(goodID),0否,1是', +sortNo int DEFAULT NULL COMMENT '排序', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品类别'; + + +DROP TABLE IF EXISTS `base_brand_info`; +CREATE TABLE `base_brand_info` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + + brandCode varchar(64) DEFAULT NULL COMMENT '品牌代码', + brandName varchar(64) DEFAULT NULL COMMENT '品牌名称', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品品牌'; + +DROP TABLE IF EXISTS `base_goods_unit`; +CREATE TABLE `base_goods_unit` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +unitName varchar(64) DEFAULT NULL COMMENT '单位名称', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品单位'; + +DROP TABLE IF EXISTS `base_goods_size`; +CREATE TABLE `base_goods_size` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +sizeName varchar(64) DEFAULT NULL COMMENT '尺寸名称', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品尺寸'; + +DROP TABLE IF EXISTS `base_goods_color`; +CREATE TABLE `base_goods_color` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +colorName varchar(64) DEFAULT NULL COMMENT '颜色名称', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品颜色'; + + +DROP TABLE IF EXISTS `base_manufacturer`; +CREATE TABLE `base_manufacturer` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +manufacturerCode varchar(64) DEFAULT NULL COMMENT '厂家名称', +manufacturerName varchar(64) DEFAULT NULL COMMENT '厂家编码', +address varchar(64) DEFAULT NULL COMMENT '地址', +telephone varchar(64) DEFAULT NULL COMMENT '电话', +contacts varchar(64) DEFAULT NULL COMMENT '联系人', +sortNo int DEFAULT NULL COMMENT '排序', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='厂家'; + +DROP TABLE IF EXISTS `base_markuprate_unified`; +CREATE TABLE `base_markuprate_unified` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +level varchar(64) DEFAULT NULL COMMENT '级别名称(客户)', +price double(10,2) DEFAULT NULL COMMENT '对应销售价', +markuprate int DEFAULT NULL COMMENT '加价率', +sortNo int DEFAULT NULL COMMENT '排序', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='统一加价率'; + +DROP TABLE IF EXISTS `base_range_markuprate`; +CREATE TABLE `base_range_markuprate` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +range_start int DEFAULT NULL COMMENT '区间起始', +range_end int DEFAULT NULL COMMENT '区间截止', +markupRate1 int DEFAULT NULL COMMENT '加价率1', +markupRate2 int DEFAULT NULL COMMENT '加价率2', +markupRate3 int DEFAULT NULL COMMENT '加价率3', +markupRate4 int DEFAULT NULL COMMENT '加价率4', +markupRate5 int DEFAULT NULL COMMENT '加价率5', +sortNo int DEFAULT NULL COMMENT '排序 ', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='区间加价率'; + diff --git a/yxt-wms-biz/docs/databases/tables/create_table_purchase.sql b/yxt-wms-biz/docs/databases/tables/create_table_purchase.sql new file mode 100644 index 0000000000..c02957e822 --- /dev/null +++ b/yxt-wms-biz/docs/databases/tables/create_table_purchase.sql @@ -0,0 +1,213 @@ + +DROP TABLE IF EXISTS `wms_purchase_bill`; +CREATE TABLE `wms_purchase_bill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值 0正常,1作废', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +sourceBillSid varchar(64) DEFAULT NULL COMMENT '来源单sid(工单sid)', +sourceBillNo varchar(64) DEFAULT NULL COMMENT '来源单编号', +billNo varchar(64) DEFAULT NULL COMMENT '单据编号', +createDate Varchar(64) DEFAULT NULL COMMENT '单据日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人sid', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +purchaseType varchar(64) DEFAULT NULL COMMENT '采购类型(厂家采购、外采)', +supplierSid varchar(64) DEFAULT NULL COMMENT '供应商sid', +supplierName varchar(64) DEFAULT NULL COMMENT '供应商名称', +supplierPhone varchar(64) DEFAULT NULL COMMENT '供应商联系电话', +billType varchar(64) DEFAULT NULL COMMENT '票据类型(不含税、增值税、普通税、已含增值税)', +markupType varchar(64) DEFAULT NULL COMMENT '加价方式(统一加价率、区间加价率、仓库加价率)', +priceStrategy varchar(64) DEFAULT NULL COMMENT '进价不同时的价格策略(加权平均、分别计价)', +isInvoicing int DEFAULT NULL COMMENT '是否需要开发票(是1,否0)', +invoiceCode varchar(64) DEFAULT NULL COMMENT '发票号码', +tempMarkupRate int DEFAULT NULL COMMENT '临时加价率', +purchaserSid varchar(64) DEFAULT NULL COMMENT '采购员sid(单选)', +purchaserName varchar(64) DEFAULT NULL COMMENT '', +storekeeperSid varchar(64) DEFAULT NULL COMMENT '库管员sid(单选)', +storekeeperName varchar(64) DEFAULT NULL COMMENT '', +errorAmount decimal(10,2) DEFAULT NULL COMMENT '误差调整金额', +freight decimal(10,2) DEFAULT NULL COMMENT '运费', +discountAmount decimal(10,2) DEFAULT NULL COMMENT '优惠金额', +payableAmount decimal(10,2) DEFAULT NULL COMMENT '应付金额(=采购金额+运费-优惠金额)', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='采购单'; + +DROP TABLE IF EXISTS `wms_purchase_bill_detail`; +CREATE TABLE `wms_purchase_bill_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '单据sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', +specification varchar(64) DEFAULT NULL COMMENT '规格', +goodsModel varchar(64) DEFAULT NULL COMMENT '型号', +currentCount double(10,2) DEFAULT NULL COMMENT '当前库存数量', +unit varchar(64) DEFAULT NULL COMMENT '计量单位', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +position varchar(64) DEFAULT NULL COMMENT '货位', +cost double(10,2) DEFAULT NULL COMMENT '单位成本(进货价)', +count double(10,2) DEFAULT NULL COMMENT '采购数量', +taxAmount double(10,2) DEFAULT NULL COMMENT '税额', +taxPrice double(10,2) DEFAULT NULL COMMENT '含税价', +amount double(10,2) DEFAULT NULL COMMENT '采购金额', +price1 double(10,2) DEFAULT NULL COMMENT '销售价1', +price2 double(10,2) DEFAULT NULL COMMENT '销售价2', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='采购单据明细'; + +DROP TABLE IF EXISTS `wms_purchase_bill_settle`; +CREATE TABLE `wms_purchase_bill_settle` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '采购单sid', +payableAmount double(10,2) DEFAULT NULL COMMENT '应付金额', +prepaymentdeductAmount double(10,2) DEFAULT NULL COMMENT '预付款抵扣', +settleKey varchar(64) DEFAULT NULL COMMENT '结算方式key', +settleValue varchar(64) DEFAULT NULL COMMENT '结算方式value', +settleAmount double(10,2) DEFAULT NULL COMMENT '结算金额', +otherSettleKey varchar(64) DEFAULT NULL COMMENT '其他结算方式', +otherSettleValue varchar(64) DEFAULT NULL COMMENT '其他结算金额', +debts double(10,2) DEFAULT NULL COMMENT '欠款金额', +settleTime datetime DEFAULT NULL COMMENT '结算时间', +createUserSid varchar(64) DEFAULT NULL COMMENT '结算人sid', +createByName varchar(64) DEFAULT NULL COMMENT '结算人姓名', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='采购单-结算'; + +DROP TABLE IF EXISTS `wms_purchaseback_bill`; +CREATE TABLE `wms_purchaseback_bill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '0正常,1作废', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +sourceBillSid varchar(64) DEFAULT NULL COMMENT '来源单sid(采购单sid)', +sourceBillNo varchar(64) DEFAULT NULL COMMENT '来源单编号', +billNo varchar(64) DEFAULT NULL COMMENT '单据编号', +createDate varchar(64) DEFAULT NULL COMMENT '单据日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人sid', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +backErrorAmount double(10,2) DEFAULT NULL COMMENT '退误差调整金额', +backDiscountAmount double(10,2) DEFAULT NULL COMMENT '退优惠金额', +deductDebts double(10,2) DEFAULT NULL COMMENT '抵扣欠款', +deductBillNo varchar(64) DEFAULT NULL COMMENT '抵扣单号', +toPrepayment double(10,2) DEFAULT NULL COMMENT '转入预付款', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='采购退货单据'; + +DROP TABLE IF EXISTS `wms_purchaseback_detail`; +CREATE TABLE `wms_purchaseback_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '单据sid', +goodsStockSid varchar(64) DEFAULT NULL COMMENT '商品库存sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', +specification varchar(64) DEFAULT NULL COMMENT '规格', +goodsModel varchar(64) DEFAULT NULL COMMENT '车型', +currentCount double(10,2) DEFAULT NULL COMMENT '退货后的库存数量', +unit varchar(64) DEFAULT NULL COMMENT '计量单位', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +position varchar(64) DEFAULT NULL COMMENT '货位', +returnedCount double(10,2) DEFAULT NULL COMMENT '已退数量', +backCount double(10,2) DEFAULT NULL COMMENT '退货数量', +maxAmount double(10,2) DEFAULT NULL COMMENT '税额', +maxPrice double(10,2) DEFAULT NULL COMMENT '含税价', +backAmount double(10,2) DEFAULT NULL COMMENT '退货金额', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='采购退货单据明细'; + +DROP TABLE IF EXISTS `wms_supplier`; +CREATE TABLE `wms_supplier` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +supplierName varchar(64) DEFAULT NULL COMMENT '供应商名称', +supplierCode varchar(64) DEFAULT NULL COMMENT '供应商编码(拼音缩写)', +contacts varchar(64) DEFAULT NULL COMMENT '联系人', +mobile varchar(64) DEFAULT NULL COMMENT '联系手机号码', +contactAddress varchar(100) DEFAULT NULL COMMENT '联系地址', +taxpayerNo varchar(64) DEFAULT NULL COMMENT '税号', +bankName varchar(64) DEFAULT NULL COMMENT '开户行', +bankAccount varchar(64) DEFAULT NULL COMMENT '开户行账号', +Address varchar(100) DEFAULT NULL COMMENT '地址、电话', +billType varchar(64) DEFAULT NULL COMMENT '票据类型(不含税、增值税、普通税、已含增值税)', +sortNo int DEFAULT NULL COMMENT '排序号', +initDebts decimal(10,2) DEFAULT NULL COMMENT '期初欠款', +prepayment decimal(10,2) DEFAULT NULL COMMENT '预付款', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='供应商'; + + diff --git a/yxt-wms-biz/docs/databases/tables/create_table_warehouse.sql b/yxt-wms-biz/docs/databases/tables/create_table_warehouse.sql new file mode 100644 index 0000000000..9415c1c28d --- /dev/null +++ b/yxt-wms-biz/docs/databases/tables/create_table_warehouse.sql @@ -0,0 +1,385 @@ + +DROP TABLE IF EXISTS `wms_inventory`; +CREATE TABLE `wms_inventory` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +goodsID varchar(64) DEFAULT NULL COMMENT '商品ID(唯一编码,入库时生成)', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +billSid varchar(64) DEFAULT NULL COMMENT '入库单sid', +billDetailSid varchar(64) DEFAULT NULL COMMENT '入库单明细sid', +price1 decimal(10,2) DEFAULT NULL COMMENT '销售价格1', +price2 decimal(10,2) DEFAULT NULL COMMENT '销售价格2', +price3 decimal(10,2) DEFAULT NULL COMMENT '销售价格3', +price4 decimal(10,2) DEFAULT NULL COMMENT '销售价格4', +price5 decimal(10,2) DEFAULT NULL COMMENT '销售价格5', +unit varchar(64) DEFAULT NULL COMMENT '计量单位', +count decimal(10,2) DEFAULT NULL COMMENT '库存数量', +minimumPrice decimal(10,2) DEFAULT NULL COMMENT '销售底价', +freePrice decimal(10,2) DEFAULT NULL COMMENT '三包价格', +firstMaintainPrice decimal(10,2) DEFAULT NULL COMMENT '首保价格', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +warehouseArea decimal(10,2) DEFAULT NULL COMMENT '货位', +isShowDiscount int DEFAULT NULL COMMENT '是否显示折扣标志', +firstInDate timestamp DEFAULT NULL COMMENT '首次入库日期-计算库龄的依据', +lockCount decimal(10,2) DEFAULT NULL COMMENT '锁定数量,计算字段,出库申请通过,但未实际出库', +sortNo int DEFAULT NULL COMMENT '排序', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='商品库存-台账'; + +DROP TABLE IF EXISTS `wms_inventory_bill`; +CREATE TABLE `wms_inventory_bill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值0正常,1作废;申请-审批中-完成-作废', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +sourceBillSid varchar(64) DEFAULT NULL COMMENT '来源单sid', +billNo varchar(64) DEFAULT NULL COMMENT '单据编号', +billType varchar(64) DEFAULT NULL COMMENT '单据类型(入库、出库)', +createDate varchar(64) DEFAULT NULL COMMENT '单据日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +busTypeKey varchar(64) DEFAULT NULL COMMENT '业务类型key(采购入库、维修出入库、销售出入库等)', +busTypeValue varchar(64) DEFAULT NULL COMMENT '业务类型value(采购入库、维修出入库、销售出入库等)', +warehouseManagerSid varchar(64) DEFAULT NULL COMMENT '库管操作人sid', +warehouseManager varchar(64) DEFAULT NULL COMMENT '库管操作人', +outTime timestamp DEFAULT NULL COMMENT '实际出库时间', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='出入库单据'; + +DROP TABLE IF EXISTS `wms_inventory_bill_detail`; +CREATE TABLE `wms_inventory_bill_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '单据sid', +inventorySid varchar(64) DEFAULT NULL COMMENT '商品库存sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', +specification varchar(64) DEFAULT NULL COMMENT '规格', +goodsModel varchar(64) DEFAULT NULL COMMENT '型号', +currentCount decimal(10,2) DEFAULT NULL COMMENT '出入库后的库存量', +unit varchar(64) DEFAULT NULL COMMENT '计量单位', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +warehouseArea varchar(64) DEFAULT NULL COMMENT '货位', +cost decimal(10,2) DEFAULT NULL COMMENT '单位成本(进货价)', +count decimal(10,2) DEFAULT NULL COMMENT '数量(出库为负)', +taxAmount decimal(10,2) DEFAULT NULL COMMENT '税额(出库为负)', +taxPrice decimal(10,2) DEFAULT NULL COMMENT '含税价(出库为负)', +amount decimal(10,2) DEFAULT NULL COMMENT '金额(出库为负)', +price1 decimal(10,2) DEFAULT NULL COMMENT '销售价1', +price2 decimal(10,2) DEFAULT NULL COMMENT '销售价2', +subjectSid varchar(64) DEFAULT NULL COMMENT '科目sid(出库时)', +subject varchar(64) DEFAULT NULL COMMENT '科目(出库时)', +operTime timestamp DEFAULT NULL COMMENT '操作时间', +operUserSid varchar(64) DEFAULT NULL COMMENT '操作人', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='单据明细'; + +DROP TABLE IF EXISTS `wms_inventory_checkbill`; +CREATE TABLE `wms_inventory_checkbill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billNo varchar(64) DEFAULT NULL COMMENT '单据编号', +createDate varchar(64) DEFAULT NULL COMMENT '制单日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人sid', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +checkType varchar(64) DEFAULT NULL COMMENT '盘点类型', +checkState decimal(10,2) DEFAULT NULL COMMENT '盘点状态(盘点中1,盘点完成2)', +profitCount decimal(10,2) DEFAULT NULL COMMENT '盘盈数量', +profitAmount decimal(10,2) DEFAULT NULL COMMENT '盘盈金额', +lossCount decimal(10,2) DEFAULT NULL COMMENT '盘亏数量', +lossAmount decimal(10,2) DEFAULT NULL COMMENT '盈亏金额', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='库存盘点'; + +DROP TABLE IF EXISTS `wms_inventory_checkbill_detail`; +CREATE TABLE `wms_inventory_checkbill_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值状态(0正常、2盘亏、1盘盈)', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '盘点单sid', +inventorySid varchar(64) DEFAULT NULL COMMENT '商品库存sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', +goodsModel varchar(64) DEFAULT NULL COMMENT '型号', +unit varchar(64) DEFAULT NULL COMMENT '单位', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库', +warehouseArea varchar(64) DEFAULT NULL COMMENT '货位', +taxPrice decimal(10,2) DEFAULT NULL COMMENT '含税价', +bookCount decimal(10,2) DEFAULT NULL COMMENT '账面数量', +realCount decimal(10,2) DEFAULT NULL COMMENT '实盘数量', +profitandlossNumber decimal(10,2) DEFAULT NULL COMMENT '盈亏数( |实盘数量-账面数量|)', +profitandlossAmount decimal(10,2) DEFAULT NULL COMMENT '盈亏金额(盈亏数*含税价)', +picUrl varchar(1000) DEFAULT NULL COMMENT '现场照片(多张中间用英文逗号分隔)', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='库存盘点-明细'; + +DROP TABLE IF EXISTS `wms_inventory_allocatebill`; +CREATE TABLE `wms_inventory_allocatebill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值状态(未完成0、已完成1)', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billNo varchar(64) DEFAULT NULL COMMENT '单据编号', +createDate varchar(64) DEFAULT NULL COMMENT '制单日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人sid', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +outOrgSid varchar(64) DEFAULT NULL COMMENT '调出分公司sid', +inOrgSid varchar(64) DEFAULT NULL COMMENT '调入分公司sid', +count decimal(10,2) DEFAULT NULL COMMENT '调拨数量', +amount decimal(10,2) DEFAULT NULL COMMENT '调拨金额', +confirmSid varchar(64) DEFAULT NULL COMMENT '确认人sid', +confirmName varchar(64) DEFAULT NULL COMMENT '确认人姓名', +finishTime timestamp DEFAULT NULL COMMENT '完成时间', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='(调拨单)-调出方操作'; + +DROP TABLE IF EXISTS `wms_inventory_allocatebill_detail`; +CREATE TABLE `wms_inventory_allocatebill_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '盘点单sid', +inventorySid varchar(64) DEFAULT NULL COMMENT '商品库存sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', +specification varchar(64) DEFAULT NULL COMMENT '规格', +goodsModel varchar(64) DEFAULT NULL COMMENT '车型', +unit varchar(64) DEFAULT NULL COMMENT '单位', +outWarehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +outWarehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +warehouseAreasid varchar(64) DEFAULT NULL COMMENT '货位sid', +warehouseArea varchar(64) DEFAULT NULL COMMENT '货位名称', +taxPrice decimal(10,2) DEFAULT NULL COMMENT '含税价', +stockCount decimal(10,2) DEFAULT NULL COMMENT '库存数量', +inWarehouseSid varchar(64) DEFAULT NULL COMMENT '调入仓库sid', +inWarehouseName varchar(64) DEFAULT NULL COMMENT '调入货位', +count decimal(10,2) DEFAULT NULL COMMENT '调拨数量', +amount decimal(10,2) DEFAULT NULL COMMENT '调拨金额(调拨数量*含税价)', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='(调拨单-明细)'; + +DROP TABLE IF EXISTS `wms_inventory_settlebill`; +CREATE TABLE `wms_inventory_settlebill` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billNo varchar(64) DEFAULT NULL COMMENT '结算单编号', +createDate varchar(64) DEFAULT NULL COMMENT '制单日期', +createUserSid varchar(64) DEFAULT NULL COMMENT '制单人sid', +createByName varchar(64) DEFAULT NULL COMMENT '制单人姓名', +settleState int DEFAULT NULL COMMENT '库存结算状态(1进行中 2已完成)', +settleType int DEFAULT NULL COMMENT '库存结算类型(1月结 2年结)', +settle_startTime timestamp DEFAULT NULL COMMENT '开始时间', +settle_endTime timestamp DEFAULT NULL COMMENT '结束时间', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='库存结算单'; + +DROP TABLE IF EXISTS `wms_inventory_settlebill_detail`; +CREATE TABLE `wms_inventory_settlebill_detail` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +billSid varchar(64) DEFAULT NULL COMMENT '结算单sid', +settleType timestamp DEFAULT NULL COMMENT '库存结算类型(1月结 2年结)', +inventorySid varchar(64) DEFAULT NULL COMMENT '商品库存sid', +goodsSid varchar(64) DEFAULT NULL COMMENT '商品sid', +goodsCode varchar(64) DEFAULT NULL COMMENT '商品编码', +goodsName varchar(64) DEFAULT NULL COMMENT '商品名称', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +warehouseCode varchar(64) DEFAULT NULL COMMENT '仓库编码', +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +warehouseAreasid varchar(64) DEFAULT NULL COMMENT '货位sid', +warehouseAreaCode varchar(64) DEFAULT NULL COMMENT '货位编码', +warehouseAreaName varchar(64) DEFAULT NULL COMMENT '货位名称', +preBalance decimal(10,2) DEFAULT NULL COMMENT '上期结存', +currentBalance decimal(10,2) DEFAULT NULL COMMENT '本期结存', +currentEnter decimal(10,2) DEFAULT NULL COMMENT '本期入库', +currentOut decimal(10,2) DEFAULT NULL COMMENT '本期出库', +currentCheck decimal(10,2) DEFAULT NULL COMMENT '本期盘点', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='库存结算明细'; + + + +DROP TABLE IF EXISTS `base_warehouse`; +CREATE TABLE `base_warehouse` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +warehouseName varchar(64) DEFAULT NULL COMMENT '仓库名称', +warehouseCode varchar(64) DEFAULT NULL COMMENT '仓库编码', +addr varchar(255) DEFAULT NULL COMMENT '具体地址', +manager varchar(64) DEFAULT NULL COMMENT '仓库管理员', +markupRate1 int DEFAULT NULL COMMENT '加价率1', +markupRate2 int DEFAULT NULL COMMENT '加价率2', +markupRate3 int DEFAULT NULL COMMENT '加价率3', +markupRate4 int DEFAULT NULL COMMENT '加价率4', +markupRate5 int DEFAULT NULL COMMENT '加价率5', +warehouseType int DEFAULT NULL COMMENT '仓库类型(0正常库、1旧件库等)', +sortNo int DEFAULT NULL COMMENT '排序', +useOrgSid varchar(64) DEFAULT NULL COMMENT '使用组织sid', +createOrgSid varchar(64) DEFAULT NULL COMMENT '创建组织sid', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='仓库'; + +DROP TABLE IF EXISTS `base_warehouse_area`; +CREATE TABLE `base_warehouse_area` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +areaName varchar(64) DEFAULT NULL COMMENT '库位名称', +areanCode varchar(64) DEFAULT NULL COMMENT '库位编码', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid', +volume double(10,2) DEFAULT NULL COMMENT '库位容量', +unit varchar(64) DEFAULT NULL COMMENT '计量单位', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='库区'; + +DROP TABLE IF EXISTS `base_warehouse_rack`; +CREATE TABLE `base_warehouse_rack` ( + `id` INT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` INT(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息', + `createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者', + `updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者', + +rackName varchar(64) DEFAULT NULL COMMENT '货架名称', +rackCode varchar(64) DEFAULT NULL COMMENT '货架编码', +warehouseSid varchar(64) DEFAULT NULL COMMENT '仓库sid ', +locationSid varchar(64) DEFAULT NULL COMMENT '库位sid ', + + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='货架'; \ No newline at end of file diff --git a/yxt-wms-biz/docs/databases/tables/wms.sql b/yxt-wms-biz/docs/databases/tables/wms.sql new file mode 100644 index 0000000000..1dd6d6c023 --- /dev/null +++ b/yxt-wms-biz/docs/databases/tables/wms.sql @@ -0,0 +1,507 @@ +DROP TABLE IF EXISTS `wms_inventory`; +CREATE TABLE `wms_inventory` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '1正常、0作废,申请-审批中-完成-作废', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `batchNumber` varchar(64) DEFAULT NULL COMMENT '批次号', + `goodsID` varchar(64) DEFAULT NULL COMMENT '商品ID(唯一编码,入库时生成)', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品Sku名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `count` decimal(10, 0) DEFAULT NULL COMMENT '库存数量', + `allocateCount` decimal(10, 2) DEFAULT NULL COMMENT '分配量', + `pickCount` decimal(10, 2) DEFAULT NULL COMMENT '拣货量', + `freezeCount` decimal(10, 2) DEFAULT NULL COMMENT '冻结量', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseRackSid` varchar(64) DEFAULT NULL COMMENT '库位sid', + `warehouseRackCode` varchar(64) DEFAULT NULL COMMENT '库位编码', + `firstInDate` timestamp null DEFAULT NULL COMMENT '首次入库日期-计算库龄的依据', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='商品库存/台账'; + +-- 预期到货通知单 +DROP TABLE IF EXISTS `wms_ans_bill`; +CREATE TABLE `wms_ans_bill` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '外部单号(业务单据编号)', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `busTypeKey` varchar(64) DEFAULT NULL COMMENT '业务类型key(采购预约、调拨预约、其他预约)', + `busTypeValue` varchar(64) DEFAULT NULL COMMENT '业务类型value(采购预约、调拨预约、其他预约)', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `billState` int(32) DEFAULT NULL COMMENT '货物状态(在途、部分收货、已收货、已取消)', + `reviewStatus` varchar(64) DEFAULT NULL COMMENT '审核状态(待审核、审核通过、审核拒绝)', + `refuseReason` varchar(64) DEFAULT NULL COMMENT '拒绝原因', + `contact` varchar(64) DEFAULT NULL COMMENT '联系人', + `mobile` varchar(64) DEFAULT NULL COMMENT '联系人手机', + `supplierSid` varchar(64) DEFAULT NULL COMMENT '供应商sid', + `supplierName` varchar(64) DEFAULT NULL COMMENT '供应商名称', + `goodsOwnerSid` varchar(64) DEFAULT NULL COMMENT '货主sid', + `goodsOwner` varchar(64) DEFAULT NULL COMMENT '货主', + `deliveryDate` timestamp null DEFAULT NULL COMMENT '预计到货日期', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='预期到货通知单'; + +-- 预期到货通知单 货物明细 +DROP TABLE IF EXISTS `wms_ans_bill_detail`; +CREATE TABLE `wms_ans_bill_detail` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `cost` decimal(10, 2) DEFAULT NULL COMMENT '单位成本(采购价)', + `orderCount` decimal(10, 2) DEFAULT NULL COMMENT '预约数量(采购订单数量)', + `waitInCount` int(32) DEFAULT NULL COMMENT '待入库数量-根据收货单计算', + `actualInCount` int(32) DEFAULT NULL COMMENT '实际入库数量-根据收货单计算', + `taxAmount` decimal(10, 2) DEFAULT NULL COMMENT '税额', + `taxPrice` decimal(10, 2) DEFAULT NULL COMMENT '含税价', + `amount` decimal(10, 2) DEFAULT NULL COMMENT '金额', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='预期到货通知单-货物明细'; + +-- 收货单据 +DROP TABLE IF EXISTS `wms_receipt_bill`; +CREATE TABLE `wms_receipt_bill` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid(asn单sid)', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单号(asn单号)', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `busTypeKey` varchar(64) DEFAULT NULL COMMENT '业务类型key(采购入库、销售退库等)', + `busTypeValue` varchar(64) DEFAULT NULL COMMENT '业务类型value(采购入库、销售退库等)', + `supplierSid` varchar(64) DEFAULT NULL COMMENT '供应商sid', + `supplierName` varchar(64) DEFAULT NULL COMMENT '供应商名称', + `goodsOwnerSid` varchar(64) DEFAULT NULL COMMENT '货主sid', + `goodsOwner` varchar(64) DEFAULT NULL COMMENT '货主', + `deliveryDate` timestamp null DEFAULT NULL COMMENT '到货日期', + `billState` int(32) DEFAULT NULL COMMENT '待收货/部分收货/已收货(默认)', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='收货单据'; + + +DROP TABLE IF EXISTS `wms_receipt_bill_detail`; +CREATE TABLE `wms_receipt_bill_detail` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品Sku名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品sku编码', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseRackSid` varchar(64) DEFAULT NULL COMMENT '库位sid', + `warehouseRackName` varchar(64) DEFAULT NULL COMMENT '库位名称', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `orderCount` decimal(10, 2) DEFAULT NULL COMMENT '预约数量', + `actualInCount` decimal(10, 2) DEFAULT NULL COMMENT '实收数量', + `rejectCount` decimal(10, 2) DEFAULT NULL COMMENT '拒收数量', + `rejectReason` varchar(64) DEFAULT NULL COMMENT '拒收原因', + `receivingGoodsTime` timestamp null DEFAULT NULL COMMENT '收货时间', + `isQuality` int(32) DEFAULT NULL COMMENT '是否需要质检(不需要0,需要1)', + `qualityState` int(32) DEFAULT NULL COMMENT '质检状态(合格0,不合格1)', + `packageRemark` varchar(200) DEFAULT NULL COMMENT '载具说明', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='收货单据-明细'; + +-- 批次属性 +DROP TABLE IF EXISTS `wms_receipt_bill_detail_batch`; +CREATE TABLE `wms_receipt_bill_detail_batch` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `detailSid` varchar(64) DEFAULT NULL COMMENT '收货明细sid', + `batchNumber` varchar(64) DEFAULT NULL COMMENT '批次号(收货日期+有效日期,如240320-241009)', + `batchCount` decimal(10, 0) DEFAULT NULL COMMENT '数量', + `manufactureDate` timestamp null DEFAULT NULL COMMENT '生产日期', + `expirationDate` timestamp null DEFAULT NULL COMMENT '有效期(根据spu中有效天数、生产日期计算)', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='批次属性'; + + +-- 上架单 +DROP TABLE IF EXISTS `wms_shelf_bill`; +CREATE TABLE `wms_shelf_bill` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid(收货单sid)', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单号(收货单号)', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `billState` int(64) DEFAULT '0' COMMENT '0新建1已完成', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='上架单'; + + +-- 上架单明细 +DROP TABLE IF EXISTS `wms_shelf_bill_detail`; +CREATE TABLE `wms_shelf_bill_detail` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `receiptDetailSid` varchar(64) DEFAULT NULL COMMENT '收货单明细sid', + `batchNumber` varchar(64) DEFAULT NULL COMMENT '批次号(入库日期+有效日期,如240320-241009)', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '库存sid', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseRackSid` varchar(64) DEFAULT NULL COMMENT '库位Sid', + `warehouseRackCode` varchar(64) DEFAULT NULL COMMENT '库位编号', + `count` decimal(10, 2) DEFAULT NULL COMMENT '上架数量', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='上架单明细'; + +-- 出库单据 +DROP TABLE IF EXISTS `wms_out_bill`; +CREATE TABLE `wms_out_bill` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单号', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `busTypeKey` varchar(64) DEFAULT NULL COMMENT '业务类型key', + `busTypeValue` varchar(64) DEFAULT NULL COMMENT '业务类型value((销售出库、采购退货出库等))', + `goodsOwnerSid` varchar(64) DEFAULT NULL COMMENT '货主sid', + `goodsOwner` varchar(64) DEFAULT NULL COMMENT '货主', + `billState` int(32) DEFAULT NULL COMMENT '已完成/已发货', + `isTogether` int(32) DEFAULT NULL COMMENT '是否一起发货(否0,是1)', + `isHandUp` int(32) DEFAULT NULL COMMENT '挂起状态(1挂起,0不挂起,2解锁)', + `priority` int(32) DEFAULT NULL COMMENT '优先级', + `actualDeliveTime` timestamp null DEFAULT NULL COMMENT '实际发货时间', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='出库单据'; + +-- 出库单明细 +DROP TABLE IF EXISTS `wms_out_bill_detail`; +CREATE TABLE `wms_out_bill_detail` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品Sku名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品sku编码', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `orderCount` decimal(10, 2) DEFAULT NULL COMMENT '订单数量', + `remainingCount` decimal(10, 2) DEFAULT NULL COMMENT '未结数量', + `adjustCount` decimal(10, 2) DEFAULT NULL COMMENT '调整数量', + `distributeCount` decimal(10, 2) DEFAULT NULL COMMENT '分配数量', + `deliveryCount` decimal(10, 2) DEFAULT NULL COMMENT '发货数量', + `billState` int(32) DEFAULT NULL COMMENT '状态(新建/已发货完成、部分分配、全部分配等)', + `deliveTime` timestamp null DEFAULT NULL COMMENT '发货时间', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='出库单-明细'; + +-- 配货单据 +DROP TABLE IF EXISTS `wms_distribute_bill`; +CREATE TABLE `wms_distribute_bill` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '出库单sid', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单号(出库单)', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `billState` int(32) DEFAULT NULL COMMENT '配货中/已发货', + `isHandUp` int(32) DEFAULT NULL COMMENT '挂起状态(1挂起,0不挂起,2解锁)', + `priority` int(32) DEFAULT NULL COMMENT '优先级', + `actualDeliveTime` timestamp null DEFAULT NULL COMMENT '实际发货时间', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='配货单据'; + +-- 配货单明细 +DROP TABLE IF EXISTS `wms_distribute_bill_detail`; +CREATE TABLE `wms_distribute_bill_detail` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `outBillDetailSid` varchar(64) DEFAULT NULL COMMENT '出库单明细sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品Sku名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品sku编码', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '库存sid', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseRackSid` varchar(64) DEFAULT NULL COMMENT '库位sid', + `warehouseRackCode` varchar(64) DEFAULT NULL COMMENT '库位编号', + `distributeCount` decimal(10, 2) DEFAULT NULL COMMENT '配货数量', + `deliveryCount` decimal(10, 2) DEFAULT NULL COMMENT '发货数量', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='配货单明细'; + + +-- 出入库记录 +DROP TABLE IF EXISTS `wms_inventory_record`; +CREATE TABLE `wms_inventory_record` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '库存sid', + `goodsID` varchar(64) DEFAULT NULL COMMENT '商品ID', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid(业务单sid)', + `billNo` varchar(64) DEFAULT NULL COMMENT '来源单据编号', + `billType` varchar(64) DEFAULT NULL COMMENT '单据类型(1入库、0出库)', + `busTypeKey` varchar(64) DEFAULT NULL COMMENT '业务类型key', + `busTypeValue` varchar(64) DEFAULT NULL COMMENT '业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)', + `billObjSid` varchar(64) DEFAULT NULL COMMENT '客户/供应商sid,出库是为客户,入库时为供应商', + `billObjName` varchar(64) DEFAULT NULL COMMENT '客户/供应商名称', + `batchNumber` varchar(64) DEFAULT NULL COMMENT '批次号', + `goodSpuSid` varchar(64) DEFAULT NULL COMMENT '商品基础信息Sid', + `goodsSpuName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuSid` varchar(64) DEFAULT NULL COMMENT '商品Skusid', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品Sku名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格型号', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseRackSid` varchar(64) DEFAULT NULL COMMENT '库位sid', + `warehouseRackCode` varchar(64) DEFAULT NULL COMMENT '库位编号', + `currentCount` decimal(10, 2) DEFAULT NULL COMMENT '出入库后的库存量', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `count` decimal(10, 2) DEFAULT NULL COMMENT '数量', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='配货单明细'; + +DROP TABLE IF EXISTS `wms_old_register`; +CREATE TABLE `wms_old_register` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `billNo` varchar(64) DEFAULT NULL COMMENT '维修工单编号', + `billTime` varchar(64) DEFAULT NULL COMMENT '工单创建日期', + `customerName` varchar(64) DEFAULT NULL COMMENT '客户名称', + `customerSid` varchar(64) DEFAULT NULL COMMENT '客户sid', + `vehMark` varchar(64) DEFAULT NULL COMMENT '车牌号', + `vinNo` varchar(64) DEFAULT NULL COMMENT '车架号', + `shortss` text DEFAULT NULL COMMENT '旧件回收说明', + `photos` text DEFAULT NULL COMMENT '旧件照片', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='旧件回收登记'; + + +DROP TABLE IF EXISTS `wms_old_inventory`; +CREATE TABLE `wms_old_inventory` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `goodsID` varchar(64) DEFAULT NULL COMMENT '商品ID', + `goodsSkuTitle` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsSkuCode` varchar(64) DEFAULT NULL COMMENT '商品编码', + `manufacturerName` varchar(64) DEFAULT NULL COMMENT '厂家', + `goodsSkuOwnSpec` varchar(64) DEFAULT NULL COMMENT '规格', + `unit` varchar(64) DEFAULT NULL COMMENT '单位', + `count` varchar(64) DEFAULT NULL COMMENT '数量', + `inCount` varchar(64) DEFAULT NULL COMMENT '已入库数量', + `billNo` varchar(64) DEFAULT NULL COMMENT '维修工单编号', + `customerName` varchar(64) DEFAULT NULL COMMENT '客户名称', + `vehMark` varchar(64) DEFAULT NULL COMMENT '车牌号', + `vinNo` varchar(64) DEFAULT NULL COMMENT '车架号', + `shortss` text DEFAULT NULL COMMENT '旧件回收说明', + `photos` text DEFAULT NULL COMMENT '旧件照片', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='待入库旧件'; + + diff --git a/yxt-wms-biz/docs/databases/数据备份/yxt_wms-20240301091036.sql b/yxt-wms-biz/docs/databases/数据备份/yxt_wms-20240301091036.sql new file mode 100644 index 0000000000..38c918b313 --- /dev/null +++ b/yxt-wms-biz/docs/databases/数据备份/yxt_wms-20240301091036.sql @@ -0,0 +1,841 @@ +-- -------------------------------------------------------- +-- 主机: 39.104.100.138 +-- 服务器版本: 8.0.30 - MySQL Community Server - GPL +-- 服务器操作系统: Linux +-- HeidiSQL 版本: 12.6.0.6765 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +-- 导出 yxt_wms 的数据库结构 +CREATE DATABASE IF NOT EXISTS `yxt_wms` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; +USE `yxt_wms`; + +-- 导出 表 yxt_wms.wms_goods 结构 +DROP TABLE IF EXISTS `wms_goods`; +CREATE TABLE IF NOT EXISTS `wms_goods` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `barCode` varchar(64) DEFAULT NULL COMMENT '条形码', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `goodsPY` varchar(64) DEFAULT NULL COMMENT '拼音缩写', + `goodsTypeSid` varchar(64) DEFAULT NULL COMMENT '商品分类sid', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `goodsModelSid` varchar(64) DEFAULT NULL COMMENT '商品型号sid', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '商品型号', + `specification` varchar(64) DEFAULT NULL COMMENT '规格', + `brandSid` varchar(64) DEFAULT NULL COMMENT '品牌sid', + `brand` varchar(64) DEFAULT NULL COMMENT '品牌', + `manufacturerSid` varchar(64) DEFAULT NULL COMMENT '厂家sid', + `manufacturer` varchar(64) DEFAULT NULL COMMENT '厂家', + `producer` varchar(64) DEFAULT NULL COMMENT '产地', + `validityDays` int DEFAULT NULL COMMENT '有效期天数', + `picUrl` varchar(500) DEFAULT NULL COMMENT '图片', + `sortNo` int DEFAULT NULL COMMENT '排序', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='商品基础信息'; + +-- 正在导出表 yxt_wms.wms_goods 的数据:~0 rows (大约) +INSERT INTO `wms_goods` (`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `state`, `isEnable`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `barCode`, `goodsName`, `goodsCode`, `goodsPY`, `goodsTypeSid`, `unit`, `goodsModelSid`, `goodsModel`, `specification`, `brandSid`, `brand`, `manufacturerSid`, `manufacturer`, `producer`, `validityDays`, `picUrl`, `sortNo`) VALUES + (1, '079c7d2a-fad0-4017-8af3-8be033e6304b', 0, '2024-02-29 06:08:15', '2024-02-29 06:08:15', 1, 1, 0, NULL, NULL, NULL, '8', '表所家', '87', 'elit adipisicing laborum', '11', 'in occaecat voluptate do eu', '61', NULL, 'pariatur fugiat', '70', NULL, '30', NULL, 'fugiat ullamco', 54, '', 1), + (2, '3c70386e-a726-47f0-ba70-a60665bc8b7f', 0, '2024-02-29 06:22:01', '2024-02-29 06:22:01', 1, 1, 0, NULL, NULL, NULL, '91', '件第后信同往须', '71', 'sit', '42', 'reprehenderit culpa exercitation velit', '32', NULL, 'sit sed consectetur', '13', NULL, '63', NULL, 'commodo labore', 74, '', 1); + +-- 导出 表 yxt_wms.wms_goods_brand 结构 +DROP TABLE IF EXISTS `wms_goods_brand`; +CREATE TABLE IF NOT EXISTS `wms_goods_brand` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `name` varchar(100) DEFAULT NULL COMMENT '品牌名称', + `logo` varchar(1024) DEFAULT NULL COMMENT '品牌logo', + `bigPic` varchar(1024) DEFAULT NULL COMMENT '专区大图', + `brandStory` text COMMENT '品牌故事', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品品牌'; + +-- 正在导出表 yxt_wms.wms_goods_brand 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_goods_other 结构 +DROP TABLE IF EXISTS `wms_goods_other`; +CREATE TABLE IF NOT EXISTS `wms_goods_other` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `isOriginalLogo` int DEFAULT NULL COMMENT '是否有原厂标志', + `figure` varchar(64) DEFAULT NULL COMMENT '花纹', + `materialCode` varchar(64) DEFAULT NULL COMMENT '材料编码', + `isWarning` int DEFAULT NULL COMMENT '是否库存预警', + `maximum` int DEFAULT NULL COMMENT '上限数量', + `minimum` int DEFAULT NULL COMMENT '下限数量', + `isScore` int DEFAULT NULL COMMENT '是否积分', + `islockPrice` int DEFAULT NULL COMMENT '是否锁定销售价', + `useScore` int DEFAULT NULL COMMENT '所需积分', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品其他信息'; + +-- 正在导出表 yxt_wms.wms_goods_other 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_goods_type 结构 +DROP TABLE IF EXISTS `wms_goods_type`; +CREATE TABLE IF NOT EXISTS `wms_goods_type` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `goodsTypeName` varchar(64) DEFAULT NULL COMMENT '商品类别名称', + `goodsTypeCode` varchar(64) DEFAULT NULL COMMENT '类别编码', + `percentageRate` int DEFAULT NULL COMMENT '提成比例', + `percentageAmount` double(10,2) DEFAULT NULL COMMENT '提成金额', + `pSid` varchar(64) DEFAULT NULL COMMENT '父级sid', + `isGoodsID` int DEFAULT NULL COMMENT '是否一品一码(goodID),0否,1是', + `sortNo` int DEFAULT NULL COMMENT '排序', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='商品类别'; + +-- 正在导出表 yxt_wms.wms_goods_type 的数据:~1 rows (大约) +INSERT INTO `wms_goods_type` (`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `state`, `isEnable`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `goodsTypeName`, `goodsTypeCode`, `percentageRate`, `percentageAmount`, `pSid`, `isGoodsID`, `sortNo`, `useOrgSid`, `createOrgSid`) VALUES + (1, '2ca961b0-0d65-4380-952e-569cd80b3eb5', 0, '2024-02-29 06:27:26', '2024-02-29 06:27:26', 1, 1, 0, NULL, NULL, NULL, '清立导白度', '78', 85, 73.07, NULL, 42, 90, '36', '54'); + +-- 导出 表 yxt_wms.wms_inventory 结构 +DROP TABLE IF EXISTS `wms_inventory`; +CREATE TABLE IF NOT EXISTS `wms_inventory` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `goodsID` varchar(64) DEFAULT NULL COMMENT '商品ID(唯一编码,入库时生成)', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `billSid` varchar(64) DEFAULT NULL COMMENT '入库单sid', + `billDetailSid` varchar(64) DEFAULT NULL COMMENT '入库单明细sid', + `price1` decimal(10,2) DEFAULT NULL COMMENT '销售价格1', + `price2` decimal(10,2) DEFAULT NULL COMMENT '销售价格2', + `price3` decimal(10,2) DEFAULT NULL COMMENT '销售价格3', + `price4` decimal(10,2) DEFAULT NULL COMMENT '销售价格4', + `price5` decimal(10,2) DEFAULT NULL COMMENT '销售价格5', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `count` decimal(10,2) DEFAULT NULL COMMENT '库存数量', + `minimumPrice` decimal(10,2) DEFAULT NULL COMMENT '销售底价', + `freePrice` decimal(10,2) DEFAULT NULL COMMENT '三包价格', + `firstMaintainPrice` decimal(10,2) DEFAULT NULL COMMENT '首保价格', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseArea` decimal(10,2) DEFAULT NULL COMMENT '货位', + `isShowDiscount` int DEFAULT NULL COMMENT '是否显示折扣标志', + `firstInDate` timestamp NULL DEFAULT NULL COMMENT '首次入库日期-计算库龄的依据', + `lockCount` decimal(10,2) DEFAULT NULL COMMENT '锁定数量,计算字段,出库申请通过,但未实际出库', + `sortNo` int DEFAULT NULL COMMENT '排序', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品库存-台账'; + +-- 正在导出表 yxt_wms.wms_inventory 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_allocatebill 结构 +DROP TABLE IF EXISTS `wms_inventory_allocatebill`; +CREATE TABLE IF NOT EXISTS `wms_inventory_allocatebill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值状态(未完成0、已完成1)', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createDate` varchar(64) DEFAULT NULL COMMENT '制单日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `outOrgSid` varchar(64) DEFAULT NULL COMMENT '调出分公司sid', + `inOrgSid` varchar(64) DEFAULT NULL COMMENT '调入分公司sid', + `count` decimal(10,2) DEFAULT NULL COMMENT '调拨数量', + `amount` decimal(10,2) DEFAULT NULL COMMENT '调拨金额', + `confirmSid` varchar(64) DEFAULT NULL COMMENT '确认人sid', + `confirmName` varchar(64) DEFAULT NULL COMMENT '确认人姓名', + `finishTime` timestamp NULL DEFAULT NULL COMMENT '完成时间', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='(调拨单)-调出方操作'; + +-- 正在导出表 yxt_wms.wms_inventory_allocatebill 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_allocatebill_detail 结构 +DROP TABLE IF EXISTS `wms_inventory_allocatebill_detail`; +CREATE TABLE IF NOT EXISTS `wms_inventory_allocatebill_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '盘点单sid', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '商品库存sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `specification` varchar(64) DEFAULT NULL COMMENT '规格', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '车型', + `unit` varchar(64) DEFAULT NULL COMMENT '单位', + `outWarehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `outWarehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseAreasid` varchar(64) DEFAULT NULL COMMENT '货位sid', + `warehouseArea` varchar(64) DEFAULT NULL COMMENT '货位名称', + `taxPrice` decimal(10,2) DEFAULT NULL COMMENT '含税价', + `stockCount` decimal(10,2) DEFAULT NULL COMMENT '库存数量', + `inWarehouseSid` varchar(64) DEFAULT NULL COMMENT '调入仓库sid', + `inWarehouseName` varchar(64) DEFAULT NULL COMMENT '调入货位', + `count` decimal(10,2) DEFAULT NULL COMMENT '调拨数量', + `amount` decimal(10,2) DEFAULT NULL COMMENT '调拨金额(调拨数量*含税价)', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='(调拨单-明细)'; + +-- 正在导出表 yxt_wms.wms_inventory_allocatebill_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_bill 结构 +DROP TABLE IF EXISTS `wms_inventory_bill`; +CREATE TABLE IF NOT EXISTS `wms_inventory_bill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值0正常,1作废;申请-审批中-完成-作废', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `billType` varchar(64) DEFAULT NULL COMMENT '单据类型(入库、出库)', + `createDate` varchar(64) DEFAULT NULL COMMENT '单据日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `busTypeKey` varchar(64) DEFAULT NULL COMMENT '业务类型key(采购入库、维修出入库、销售出入库等)', + `busTypeValue` varchar(64) DEFAULT NULL COMMENT '业务类型value(采购入库、维修出入库、销售出入库等)', + `warehouseManagerSid` varchar(64) DEFAULT NULL COMMENT '库管操作人sid', + `warehouseManager` varchar(64) DEFAULT NULL COMMENT '库管操作人', + `outTime` timestamp NULL DEFAULT NULL COMMENT '实际出库时间', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='出入库单据'; + +-- 正在导出表 yxt_wms.wms_inventory_bill 的数据:~0 rows (大约) +INSERT INTO `wms_inventory_bill` (`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `state`, `isEnable`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `sourceBillSid`, `billNo`, `billType`, `createDate`, `createUserSid`, `createByName`, `busTypeKey`, `busTypeValue`, `warehouseManagerSid`, `warehouseManager`, `outTime`, `useOrgSid`, `createOrgSid`) VALUES + (1, '1', 0, '2024-02-29 07:26:12', '2024-02-29 07:26:12', 1, 1, 0, NULL, '1', NULL, '1', '1', NULL, '2020', NULL, '1', '1', '1', '1', '1', '2024-02-29 07:26:00', '1', '1'); + +-- 导出 表 yxt_wms.wms_inventory_bill_detail 结构 +DROP TABLE IF EXISTS `wms_inventory_bill_detail`; +CREATE TABLE IF NOT EXISTS `wms_inventory_bill_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '商品库存sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `specification` varchar(64) DEFAULT NULL COMMENT '规格', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '型号', + `currentCount` decimal(10,2) DEFAULT NULL COMMENT '出入库后的库存量', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseArea` varchar(64) DEFAULT NULL COMMENT '货位', + `cost` decimal(10,2) DEFAULT NULL COMMENT '单位成本(进货价)', + `count` decimal(10,2) DEFAULT NULL COMMENT '数量(出库为负)', + `taxAmount` decimal(10,2) DEFAULT NULL COMMENT '税额(出库为负)', + `taxPrice` decimal(10,2) DEFAULT NULL COMMENT '含税价(出库为负)', + `amount` decimal(10,2) DEFAULT NULL COMMENT '金额(出库为负)', + `price1` decimal(10,2) DEFAULT NULL COMMENT '销售价1', + `price2` decimal(10,2) DEFAULT NULL COMMENT '销售价2', + `subjectSid` varchar(64) DEFAULT NULL COMMENT '科目sid(出库时)', + `subject` varchar(64) DEFAULT NULL COMMENT '科目(出库时)', + `operTime` timestamp NULL DEFAULT NULL COMMENT '操作时间', + `operUserSid` varchar(64) DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='单据明细'; + +-- 正在导出表 yxt_wms.wms_inventory_bill_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_checkbill 结构 +DROP TABLE IF EXISTS `wms_inventory_checkbill`; +CREATE TABLE IF NOT EXISTS `wms_inventory_checkbill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createDate` varchar(64) DEFAULT NULL COMMENT '制单日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `checkType` varchar(64) DEFAULT NULL COMMENT '盘点类型', + `checkState` decimal(10,2) DEFAULT NULL COMMENT '盘点状态(盘点中1,盘点完成2)', + `profitCount` decimal(10,2) DEFAULT NULL COMMENT '盘盈数量', + `profitAmount` decimal(10,2) DEFAULT NULL COMMENT '盘盈金额', + `lossCount` decimal(10,2) DEFAULT NULL COMMENT '盘亏数量', + `lossAmount` decimal(10,2) DEFAULT NULL COMMENT '盈亏金额', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='库存盘点'; + +-- 正在导出表 yxt_wms.wms_inventory_checkbill 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_checkbill_detail 结构 +DROP TABLE IF EXISTS `wms_inventory_checkbill_detail`; +CREATE TABLE IF NOT EXISTS `wms_inventory_checkbill_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值状态(0正常、2盘亏、1盘盈)', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '盘点单sid', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '商品库存sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '型号', + `unit` varchar(64) DEFAULT NULL COMMENT '单位', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库', + `warehouseArea` varchar(64) DEFAULT NULL COMMENT '货位', + `taxPrice` decimal(10,2) DEFAULT NULL COMMENT '含税价', + `bookCount` decimal(10,2) DEFAULT NULL COMMENT '账面数量', + `realCount` decimal(10,2) DEFAULT NULL COMMENT '实盘数量', + `profitandlossNumber` decimal(10,2) DEFAULT NULL COMMENT '盈亏数( |实盘数量-账面数量|)', + `profitandlossAmount` decimal(10,2) DEFAULT NULL COMMENT '盈亏金额(盈亏数*含税价)', + `picUrl` varchar(1000) DEFAULT NULL COMMENT '现场照片(多张中间用英文逗号分隔)', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='库存盘点-明细'; + +-- 正在导出表 yxt_wms.wms_inventory_checkbill_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_settlebill 结构 +DROP TABLE IF EXISTS `wms_inventory_settlebill`; +CREATE TABLE IF NOT EXISTS `wms_inventory_settlebill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billNo` varchar(64) DEFAULT NULL COMMENT '结算单编号', + `createDate` varchar(64) DEFAULT NULL COMMENT '制单日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `settleState` int DEFAULT NULL COMMENT '库存结算状态(1进行中 2已完成)', + `settleType` int DEFAULT NULL COMMENT '库存结算类型(1月结 2年结)', + `settle_startTime` timestamp NULL DEFAULT NULL COMMENT '开始时间', + `settle_endTime` timestamp NULL DEFAULT NULL COMMENT '结束时间', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='库存结算单'; + +-- 正在导出表 yxt_wms.wms_inventory_settlebill 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_inventory_settlebill_detail 结构 +DROP TABLE IF EXISTS `wms_inventory_settlebill_detail`; +CREATE TABLE IF NOT EXISTS `wms_inventory_settlebill_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '结算单sid', + `settleType` timestamp NULL DEFAULT NULL COMMENT '库存结算类型(1月结 2年结)', + `inventorySid` varchar(64) DEFAULT NULL COMMENT '商品库存sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseCode` varchar(64) DEFAULT NULL COMMENT '仓库编码', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseAreasid` varchar(64) DEFAULT NULL COMMENT '货位sid', + `warehouseAreaCode` varchar(64) DEFAULT NULL COMMENT '货位编码', + `warehouseAreaName` varchar(64) DEFAULT NULL COMMENT '货位名称', + `preBalance` decimal(10,2) DEFAULT NULL COMMENT '上期结存', + `currentBalance` decimal(10,2) DEFAULT NULL COMMENT '本期结存', + `currentEnter` decimal(10,2) DEFAULT NULL COMMENT '本期入库', + `currentOut` decimal(10,2) DEFAULT NULL COMMENT '本期出库', + `currentCheck` decimal(10,2) DEFAULT NULL COMMENT '本期盘点', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='库存结算明细'; + +-- 正在导出表 yxt_wms.wms_inventory_settlebill_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_manufacturer 结构 +DROP TABLE IF EXISTS `wms_manufacturer`; +CREATE TABLE IF NOT EXISTS `wms_manufacturer` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `manufacturerCode` varchar(64) DEFAULT NULL COMMENT '厂家名称', + `manufacturerName` varchar(64) DEFAULT NULL COMMENT '厂家编码', + `sortNo` int DEFAULT NULL COMMENT '排序', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='厂家'; + +-- 正在导出表 yxt_wms.wms_manufacturer 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_markuprate_unified 结构 +DROP TABLE IF EXISTS `wms_markuprate_unified`; +CREATE TABLE IF NOT EXISTS `wms_markuprate_unified` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `level` varchar(64) DEFAULT NULL COMMENT '级别名称(客户)', + `price` double(10,2) DEFAULT NULL COMMENT '对应销售价', + `markuprate` int DEFAULT NULL COMMENT '加价率', + `sortNo` int DEFAULT NULL COMMENT '排序', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='统一加价率'; + +-- 正在导出表 yxt_wms.wms_markuprate_unified 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_purchaseback_bill 结构 +DROP TABLE IF EXISTS `wms_purchaseback_bill`; +CREATE TABLE IF NOT EXISTS `wms_purchaseback_bill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '0正常,1作废', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid(采购单sid)', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单编号', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createDate` varchar(64) DEFAULT NULL COMMENT '单据日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `backErrorAmount` double(10,2) DEFAULT NULL COMMENT '退误差调整金额', + `backDiscountAmount` double(10,2) DEFAULT NULL COMMENT '退优惠金额', + `deductDebts` double(10,2) DEFAULT NULL COMMENT '抵扣欠款', + `deductBillNo` varchar(64) DEFAULT NULL COMMENT '抵扣单号', + `toPrepayment` double(10,2) DEFAULT NULL COMMENT '转入预付款', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='采购退货单据'; + +-- 正在导出表 yxt_wms.wms_purchaseback_bill 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_purchaseback_detail 结构 +DROP TABLE IF EXISTS `wms_purchaseback_detail`; +CREATE TABLE IF NOT EXISTS `wms_purchaseback_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodsStockSid` varchar(64) DEFAULT NULL COMMENT '商品库存sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `specification` varchar(64) DEFAULT NULL COMMENT '规格', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '车型', + `currentCount` double(10,2) DEFAULT NULL COMMENT '退货后的库存数量', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `position` varchar(64) DEFAULT NULL COMMENT '货位', + `returnedCount` double(10,2) DEFAULT NULL COMMENT '已退数量', + `backCount` double(10,2) DEFAULT NULL COMMENT '退货数量', + `maxAmount` double(10,2) DEFAULT NULL COMMENT '税额', + `maxPrice` double(10,2) DEFAULT NULL COMMENT '含税价', + `backAmount` double(10,2) DEFAULT NULL COMMENT '退货金额', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='采购退货单据明细'; + +-- 正在导出表 yxt_wms.wms_purchaseback_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_purchase_bill 结构 +DROP TABLE IF EXISTS `wms_purchase_bill`; +CREATE TABLE IF NOT EXISTS `wms_purchase_bill` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值 0正常,1作废', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `sourceBillSid` varchar(64) DEFAULT NULL COMMENT '来源单sid(工单sid)', + `sourceBillNo` varchar(64) DEFAULT NULL COMMENT '来源单编号', + `billNo` varchar(64) DEFAULT NULL COMMENT '单据编号', + `createDate` varchar(64) DEFAULT NULL COMMENT '单据日期', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '制单人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '制单人姓名', + `purchaseType` varchar(64) DEFAULT NULL COMMENT '采购类型(厂家采购、外采)', + `supplierSid` varchar(64) DEFAULT NULL COMMENT '供应商sid', + `supplierName` varchar(64) DEFAULT NULL COMMENT '供应商名称', + `supplierPhone` varchar(64) DEFAULT NULL COMMENT '供应商联系电话', + `billType` varchar(64) DEFAULT NULL COMMENT '票据类型(不含税、增值税、普通税、已含增值税)', + `markupType` varchar(64) DEFAULT NULL COMMENT '加价方式(统一加价率、区间加价率、仓库加价率)', + `priceStrategy` varchar(64) DEFAULT NULL COMMENT '进价不同时的价格策略(加权平均、分别计价)', + `isInvoicing` int DEFAULT NULL COMMENT '是否需要开发票(是1,否0)', + `invoiceCode` varchar(64) DEFAULT NULL COMMENT '发票号码', + `tempMarkupRate` int DEFAULT NULL COMMENT '临时加价率', + `purchaserSid` varchar(64) DEFAULT NULL COMMENT '采购员sid(单选)', + `purchaserName` varchar(64) DEFAULT NULL, + `storekeeperSid` varchar(64) DEFAULT NULL COMMENT '库管员sid(单选)', + `storekeeperName` varchar(64) DEFAULT NULL, + `errorAmount` decimal(10,2) DEFAULT NULL COMMENT '误差调整金额', + `freight` decimal(10,2) DEFAULT NULL COMMENT '运费', + `discountAmount` decimal(10,2) DEFAULT NULL COMMENT '优惠金额', + `payableAmount` decimal(10,2) DEFAULT NULL COMMENT '应付金额(=采购金额+运费-优惠金额)', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='采购单'; + +-- 正在导出表 yxt_wms.wms_purchase_bill 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_purchase_bill_detail 结构 +DROP TABLE IF EXISTS `wms_purchase_bill_detail`; +CREATE TABLE IF NOT EXISTS `wms_purchase_bill_detail` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '单据sid', + `goodsSid` varchar(64) DEFAULT NULL COMMENT '商品sid', + `goodsName` varchar(64) DEFAULT NULL COMMENT '商品名称', + `goodsCode` varchar(64) DEFAULT NULL COMMENT '商品编码(图号)', + `specification` varchar(64) DEFAULT NULL COMMENT '规格', + `goodsModel` varchar(64) DEFAULT NULL COMMENT '型号', + `currentCount` double(10,2) DEFAULT NULL COMMENT '当前库存数量', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `position` varchar(64) DEFAULT NULL COMMENT '货位', + `cost` double(10,2) DEFAULT NULL COMMENT '单位成本(进货价)', + `count` double(10,2) DEFAULT NULL COMMENT '采购数量', + `taxAmount` double(10,2) DEFAULT NULL COMMENT '税额', + `taxPrice` double(10,2) DEFAULT NULL COMMENT '含税价', + `amount` double(10,2) DEFAULT NULL COMMENT '采购金额', + `price1` double(10,2) DEFAULT NULL COMMENT '销售价1', + `price2` double(10,2) DEFAULT NULL COMMENT '销售价2', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='采购单据明细'; + +-- 正在导出表 yxt_wms.wms_purchase_bill_detail 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_purchase_bill_settle 结构 +DROP TABLE IF EXISTS `wms_purchase_bill_settle`; +CREATE TABLE IF NOT EXISTS `wms_purchase_bill_settle` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `billSid` varchar(64) DEFAULT NULL COMMENT '采购单sid', + `payableAmount` double(10,2) DEFAULT NULL COMMENT '应付金额', + `prepaymentdeductAmount` double(10,2) DEFAULT NULL COMMENT '预付款抵扣', + `settleKey` varchar(64) DEFAULT NULL COMMENT '结算方式key', + `settleValue` varchar(64) DEFAULT NULL COMMENT '结算方式value', + `settleAmount` double(10,2) DEFAULT NULL COMMENT '结算金额', + `otherSettleKey` varchar(64) DEFAULT NULL COMMENT '其他结算方式', + `otherSettleValue` varchar(64) DEFAULT NULL COMMENT '其他结算金额', + `debts` double(10,2) DEFAULT NULL COMMENT '欠款金额', + `settleTime` datetime DEFAULT NULL COMMENT '结算时间', + `createUserSid` varchar(64) DEFAULT NULL COMMENT '结算人sid', + `createByName` varchar(64) DEFAULT NULL COMMENT '结算人姓名', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='采购单-结算'; + +-- 正在导出表 yxt_wms.wms_purchase_bill_settle 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_range_markuprate 结构 +DROP TABLE IF EXISTS `wms_range_markuprate`; +CREATE TABLE IF NOT EXISTS `wms_range_markuprate` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `range_start` int DEFAULT NULL COMMENT '区间起始', + `range_end` int DEFAULT NULL COMMENT '区间截止', + `markupRate1` int DEFAULT NULL COMMENT '加价率1', + `markupRate2` int DEFAULT NULL COMMENT '加价率2', + `markupRate3` int DEFAULT NULL COMMENT '加价率3', + `markupRate4` int DEFAULT NULL COMMENT '加价率4', + `markupRate5` int DEFAULT NULL COMMENT '加价率5', + `sortNo` int DEFAULT NULL COMMENT '排序 ', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区间加价率'; + +-- 正在导出表 yxt_wms.wms_range_markuprate 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_supplier 结构 +DROP TABLE IF EXISTS `wms_supplier`; +CREATE TABLE IF NOT EXISTS `wms_supplier` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `supplierName` varchar(64) DEFAULT NULL COMMENT '供应商名称', + `supplierCode` varchar(64) DEFAULT NULL COMMENT '供应商编码(拼音缩写)', + `contacts` varchar(64) DEFAULT NULL COMMENT '联系人', + `mobile` varchar(64) DEFAULT NULL COMMENT '联系手机号码', + `contactAddress` varchar(100) DEFAULT NULL COMMENT '联系地址', + `taxpayerNo` varchar(64) DEFAULT NULL COMMENT '税号', + `bankName` varchar(64) DEFAULT NULL COMMENT '开户行', + `bankAccount` varchar(64) DEFAULT NULL COMMENT '开户行账号', + `Address` varchar(100) DEFAULT NULL COMMENT '地址、电话', + `billType` varchar(64) DEFAULT NULL COMMENT '票据类型(不含税、增值税、普通税、已含增值税)', + `sortNo` int DEFAULT NULL COMMENT '排序号', + `initDebts` decimal(10,2) DEFAULT NULL COMMENT '期初欠款', + `prepayment` decimal(10,2) DEFAULT NULL COMMENT '预付款', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='供应商'; + +-- 正在导出表 yxt_wms.wms_supplier 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_warehouse 结构 +DROP TABLE IF EXISTS `wms_warehouse`; +CREATE TABLE IF NOT EXISTS `wms_warehouse` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `warehouseName` varchar(64) DEFAULT NULL COMMENT '仓库名称', + `warehouseCode` varchar(64) DEFAULT NULL COMMENT '仓库编码', + `addr` varchar(255) DEFAULT NULL COMMENT '具体地址', + `manager` varchar(64) DEFAULT NULL COMMENT '仓库管理员', + `markupRate1` int DEFAULT NULL COMMENT '加价率1', + `markupRate2` int DEFAULT NULL COMMENT '加价率2', + `markupRate3` int DEFAULT NULL COMMENT '加价率3', + `markupRate4` int DEFAULT NULL COMMENT '加价率4', + `markupRate5` int DEFAULT NULL COMMENT '加价率5', + `warehouseType` int DEFAULT NULL COMMENT '仓库类型(0正常库、1旧件库等)', + `sortNo` int DEFAULT NULL COMMENT '排序', + `useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织sid', + `createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织sid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='仓库'; + +-- 正在导出表 yxt_wms.wms_warehouse 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_warehouse_area 结构 +DROP TABLE IF EXISTS `wms_warehouse_area`; +CREATE TABLE IF NOT EXISTS `wms_warehouse_area` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `areaName` varchar(64) DEFAULT NULL COMMENT '库位名称', + `areanCode` varchar(64) DEFAULT NULL COMMENT '库位编码', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid', + `volume` double(10,2) DEFAULT NULL COMMENT '库位容量', + `unit` varchar(64) DEFAULT NULL COMMENT '计量单位', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='库区'; + +-- 正在导出表 yxt_wms.wms_warehouse_area 的数据:~0 rows (大约) + +-- 导出 表 yxt_wms.wms_warehouse_rack 结构 +DROP TABLE IF EXISTS `wms_warehouse_rack`; +CREATE TABLE IF NOT EXISTS `wms_warehouse_rack` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号', + `sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号', + `lockVersion` int NOT NULL DEFAULT '0' COMMENT '记录版本,锁', + `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间', + `state` int NOT NULL DEFAULT '1' COMMENT '记录状态值', + `isEnable` int NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用', + `isDelete` int NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者', + `rackName` varchar(64) DEFAULT NULL COMMENT '货架名称', + `rackCode` varchar(64) DEFAULT NULL COMMENT '货架编码', + `warehouseSid` varchar(64) DEFAULT NULL COMMENT '仓库sid ', + `locationSid` varchar(64) DEFAULT NULL COMMENT '库位sid ', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='货架'; + +-- 正在导出表 yxt_wms.wms_warehouse_rack 的数据:~0 rows (大约) + +/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */; diff --git a/yxt-wms-biz/docs/databases/数据库文档/supervise_supplychain_2024-03-07_01-45-194.xls b/yxt-wms-biz/docs/databases/数据库文档/supervise_supplychain_2024-03-07_01-45-194.xls new file mode 100644 index 0000000000..05a77471e9 Binary files /dev/null and b/yxt-wms-biz/docs/databases/数据库文档/supervise_supplychain_2024-03-07_01-45-194.xls differ diff --git a/yxt-wms-biz/docs/databases/数据库文档/仓储管理(yxt_wms)1.1.xlsx b/yxt-wms-biz/docs/databases/数据库文档/仓储管理(yxt_wms)1.1.xlsx new file mode 100644 index 0000000000..692cb1d637 Binary files /dev/null and b/yxt-wms-biz/docs/databases/数据库文档/仓储管理(yxt_wms)1.1.xlsx differ diff --git a/yxt-wms-biz/docs/databases/数据库文档/基础信息(yxt_base)1.1.xlsx b/yxt-wms-biz/docs/databases/数据库文档/基础信息(yxt_base)1.1.xlsx new file mode 100644 index 0000000000..b784ad9805 Binary files /dev/null and b/yxt-wms-biz/docs/databases/数据库文档/基础信息(yxt_base)1.1.xlsx differ diff --git a/yxt-wms-biz/docs/databases/数据库文档/采购管理(yxt_pms)1.1.xlsx b/yxt-wms-biz/docs/databases/数据库文档/采购管理(yxt_pms)1.1.xlsx new file mode 100644 index 0000000000..bb508e5af0 Binary files /dev/null and b/yxt-wms-biz/docs/databases/数据库文档/采购管理(yxt_pms)1.1.xlsx differ diff --git a/yxt-wms-biz/docs/databases/数据库文档/销售管理(yxt_sms)1.1.xlsx b/yxt-wms-biz/docs/databases/数据库文档/销售管理(yxt_sms)1.1.xlsx new file mode 100644 index 0000000000..ccfd6c79b4 Binary files /dev/null and b/yxt-wms-biz/docs/databases/数据库文档/销售管理(yxt_sms)1.1.xlsx differ diff --git a/yxt-wms-biz/docs/sheji/wx20240223.txt b/yxt-wms-biz/docs/sheji/wx20240223.txt new file mode 100644 index 0000000000..14747bf8c8 --- /dev/null +++ b/yxt-wms-biz/docs/sheji/wx20240223.txt @@ -0,0 +1,16 @@ +http://39.104.100.138/warehouse/ +admin/111111 +这个是喜相随的库存管理,可以出、入库操作。 + + + +https://modao.cc/proto/CplNgUscs94yg8rssHbhjw/sharing?view_mode=read_only + + + + +功能考虑在最外层加上使用者,每个使用者都拥有自己一套独立的仓储系统。 +未来实现: +1.仓库产权方可以在平台仓库。 +2.使用者选择仓库,并可申请开通云仓系统服务。 +2.根据使用者所使用的功能设置云仓年服务费。 \ No newline at end of file diff --git a/yxt-wms-biz/docs/sheji/仓储、储运与管线.png b/yxt-wms-biz/docs/sheji/仓储、储运与管线.png new file mode 100644 index 0000000000..3981ac5e38 Binary files /dev/null and b/yxt-wms-biz/docs/sheji/仓储、储运与管线.png differ diff --git a/yxt-wms-biz/docs/sheji/仓储功能模块.jpg b/yxt-wms-biz/docs/sheji/仓储功能模块.jpg new file mode 100644 index 0000000000..01cacfd2c4 Binary files /dev/null and b/yxt-wms-biz/docs/sheji/仓储功能模块.jpg differ diff --git a/yxt-wms-biz/docs/sheji/仓储建模.png b/yxt-wms-biz/docs/sheji/仓储建模.png new file mode 100644 index 0000000000..ffeb81cb08 Binary files /dev/null and b/yxt-wms-biz/docs/sheji/仓储建模.png differ diff --git a/yxt-wms-biz/docs/sheji/仓储管理功能开发计划(2024.02-2024.03).xlsx b/yxt-wms-biz/docs/sheji/仓储管理功能开发计划(2024.02-2024.03).xlsx new file mode 100644 index 0000000000..c3cecf8e5a Binary files /dev/null and b/yxt-wms-biz/docs/sheji/仓储管理功能开发计划(2024.02-2024.03).xlsx differ diff --git a/yxt-wms-biz/docs/sheji/功能权限设计.docx b/yxt-wms-biz/docs/sheji/功能权限设计.docx new file mode 100644 index 0000000000..ebb4f10ce9 --- /dev/null +++ b/yxt-wms-biz/docs/sheji/功能权限设计.docx @@ -0,0 +1,9 @@ +1. PC端功能权限设计 + (1) 添加功能 +先选择PC端,然后选择模块,选择菜单,录入按钮ID。需要把控制权限的按钮录入,不需要控制权限的不用录入。 + (2) 功能授权 + 角色授权时,功能列表要分级显示(模块/菜单/功能),只显示当前角色已经授权菜单下的功能。 + (3)前端功能权限控制 + 前端页面功能按钮默认都为显示。前端页面中根据userSid、菜单路由调用后台接口,后台返回当前用户、当前菜单没有授权的功能列表。前端根据功能列表设置功能按钮的隐藏。 + +2. 移动端功能权限设计 diff --git a/yxt-wms-biz/docs/sheji/售后服务管理(含仓储管理功能)开发计划(2024.02-2024.03).xlsx b/yxt-wms-biz/docs/sheji/售后服务管理(含仓储管理功能)开发计划(2024.02-2024.03).xlsx new file mode 100644 index 0000000000..4d15febbbc Binary files /dev/null and b/yxt-wms-biz/docs/sheji/售后服务管理(含仓储管理功能)开发计划(2024.02-2024.03).xlsx differ diff --git a/yxt-wms-biz/docs/sheji/宇信通PC前端页面设计与开发规范v1.0.2.docx b/yxt-wms-biz/docs/sheji/宇信通PC前端页面设计与开发规范v1.0.2.docx new file mode 100644 index 0000000000..a955a58864 --- /dev/null +++ b/yxt-wms-biz/docs/sheji/宇信通PC前端页面设计与开发规范v1.0.2.docx @@ -0,0 +1,119 @@ + 宇信通前端页面开发规范 +1.样式表规范 + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; + 字号:14px。 + + 菜单:行高28px/30px,菜单前需要显示图标。 + 页面标题:左右边距 0px 上边距 5px 行高50px 字号 20px 加粗 中按钮(带图标) + 查询条件:行高42px 字号 16px 控件高32px 中按钮(带图标) + 列表: +列表标题:行高 42px 字号 16px 加粗 +列表标题行:行高40px 字号14px 加粗 +列表内容行:行高40px 字号14px 小按钮(不带图标) +列表整体左右边距:20px + 表单: + 表单标题:上下边距30px 字号28px 加粗 + 表单内容:行高42px 字号16px 控件高36px +标题右对齐,右边距8px;控件左对齐,左边距8px +必填项红*放在标题左侧2px。 + 表单整体左右边距:40px + + 分隔条:行高42px 字号16px 加粗 +列表与表单中其它功能按钮:中按钮(带图标) + +2.页面规范 +2.1页面标题 + 列表页面:若有管理功能,则命名为:XXXX管理;若只是查询功能,则命名为:XXXX。如单位信息管理或单位信息。 + 新增/编辑页面:新增XXX信息/编辑XXXX信息。 + 详情页面:XXXX详细信息。 + 其余类型页面以菜单名或功能名来命名,如XXX导出;XXX打印等。 +2.2页面操作工具条 +各页面(包括列表、添加、编辑、删除等页面)顶部应该有独立成行的"操作工具条",背景为灰色,固定不动(不随页面滚动条滚动)。 +操作工具条中放置操作按钮,如新增、编辑、删除、导出、导入、返回、关闭、下载、打印等。 +不需要勾选列表记录的放在右侧、需要勾选在左侧。(可选) +按钮规范: +名称、尺寸和颜色要统一。 + +整体效果如下: + + +3.列表布局及功能规范 +3.1列表查询条件 +列表上面都应该有一个"查询"区域。从上到下分为三部分,每部分都独立成行。 +第一部分:"隐藏/显示查询条件"的按钮,控制查询条件区域的显示和隐藏。 +第二部分:查询条件区域,分为上下两块,上面为可用的查询条件,下面为"查询"、"重置"、"更多查询"按钮。此区域默认为隐藏。 + + +3.2列表标题设置 +每个列表中需要有列表标题,如XXX列表。同时显示分页要素。 + +3.3列表列头、列宽及内容 +(1)列表列头加粗,居中。列头整体有灰色背景。 +(2)列表的列宽,根据实际显示的内容,设置列宽,该宽的宽,该窄的窄。如果内容太长可以考虑换行(如果内容换行则内容的行高要尽量小)。可考虑列宽可以自由拖动。 +(3)列表中内容对齐原则是,如果内容是固定长度的,如身份证号码、手机号码、姓名等,则居中对齐。若是不定长度的,则左对齐。列表中的内容不加粗。鼠标划过时,对应行背景要变色。 +(4)如果需要有编辑、删除等管理功能,则列表的首列应该为多选框,可以全选,也可以单条选择记录。 +3.4列表分页要素 +列表最底端要有分页要素要齐全。 + +3.5列表具备的功能 +(1)自由设置列显示隐藏(各用户配置存入数据库)。(可选) +(2)自由拖动列的位置。(可选) +(3)点击列头进行排序。 +(4)冻结列头前N列(至少包含选择列、序号列、操作列,其它可根据要求设置),列表内容滚动。 +(5)列宽可以拖动。(可选) +(6)列表如需要则应具备"导入"、"导出"功能。 +4.表单规范 + 控件的长度,根据实际内容,该长的长,该窄的窄。 +表单标题列如果带表格边框线则无冒号,如果不带边框线则有冒号 + +页面表单设计为顶部为固定的操作按钮工具条,下面为表单主要内容,表单设计参考word A4纸的展现方式。如表单内容比较多,需要展示滚动条时,只能滚动表单内容,工具条不能滚动。 + +5.控件使用规范 +选择型控件: +可选择内容数量少时(一般在6个以内),可用单选按钮和多选按钮。如性别等。 +可选内容数量较多时,需要使用下拉框,同时下拉宽应具备模糊搜索功能。根据实际需要还应具备多选功能。 +时间和日期控件: +如果为时间则带时分秒,如果为日期则不带。若为类似开始、截止等时间成对出现,则需要控制后面的时间不能早于前面的时间。日期类型为yyyy-MM-dd,时间类型为:yyyy-MM-dd hh:mm:ss。 +数字类型的控件: +需要进行数据类型的校验。 +特定格式内容的控件: +需要进行正则表达式的校验。 +列表控件: +统一使用table控件。 +新增/编辑/详情页的表单: +统一使用form控件。 +其他类型控件: +必填项需要进行非空校验。 +注:所有的控件中的内容与格式,都要经过前端和后端的双重校验。 +控件的样式规范: +待补充。 +6.前端框架规范 +Vue-element-admin +要求组件化开发,避免简单的复制粘贴。如列表部分应作为一个独立的组件开发。 +VUE的语法规范:ES6。代码格式要严格按照ES6的规范,该空格的地方空格,不需要分号的地方不要分号,各个标签一定要对齐,至少看着要一行行的代码是工整的。代码编译运行起来,不能在控制台里有错误和警告的提示,如果是连接不到接口服务这类的警告提示可以暂时不考虑,但如果是代码规范上的提示,一定要处理掉。 +样式:less和scss。 +7.功能规范 +(1)修改保存数据的提交按钮,必须要加上防止重复提交 +前端点击按钮后将按钮设置为不可用状态,等后台响应后或有异常再把这个按钮设置为可用。 +后台也有控制。 +(2)删除按钮 +删除时需要二次确认提示。 +其他待完善。 +8.页面设计规范 +1.前端项目需要使用代码生成器生成。 +2.列表页顶部工具栏为通用组件,负责动态显示操作按钮权限。 +3.列表、添加/修改、详情要分成3个vue文件。 +4.列表vue文件中import 其他2个文件。添加/修改、详情页面中各自包含操作按钮与事件,不能写在列表文件中。 +5. 添加/修改、详情页面打开时,以显示和隐藏的组件的方式展示(使用了一个viewstate属性控制组件隐藏和显示),导航栏中不能有页签。只有列表才能有页签。 +9.参数规范 +1.token参数的职责只有2个,一是作为网关有效性验证参数使用;二是单点登录首次跳转业务模块(子系统)时前端获取用户信息时使用(前端需缓存用户信息),不能代替业务接口的业务参数使用(如userSid等)。 +2.除了网关外,其他业务接口中不允许直接使用token。 + + + + + + + + + diff --git a/yxt-wms-biz/docs/sheji/客户管理思路设计.docx b/yxt-wms-biz/docs/sheji/客户管理思路设计.docx new file mode 100644 index 0000000000..2671d0b0db --- /dev/null +++ b/yxt-wms-biz/docs/sheji/客户管理思路设计.docx @@ -0,0 +1,9 @@ +1. 客户管理规则 + 潜在客户:同一部门中业务人员的客户不能重复,谁先录入手机号码是谁的客户。不同部门客户允许重复。 + 潜在客户门店销售部经理可以调配所属的业务专员。业务专员之间也可以自行调配。 + 成交客户:整个集团内唯一。 +2. 录入规则 + 客户名称、手机号码为必填项,两个条件满足才能录入到系统中。修改客户信息时,客户名称、手机号码不允许修改。不同的客户名称或手机号码视为不同的客户。 + + 具体业务逻辑看流程图: + diff --git a/yxt-wms-biz/docs/sheji/数据权限设计.docx b/yxt-wms-biz/docs/sheji/数据权限设计.docx new file mode 100644 index 0000000000..844b6cce99 --- /dev/null +++ b/yxt-wms-biz/docs/sheji/数据权限设计.docx @@ -0,0 +1,20 @@ +数据权限设计: +1.主要思路 +角色授权菜单时,需要同步授权该菜单的数据权限,设计角色与菜单关联表中增加数据权限ID的字段。数据权限主要分为5个层级:1集团、2事业部、3分公司、4部门、5个人。后续可以考虑增加数据规则,确定数据查询字段及范围。 +以用户最高层级角色对应的数据权限。 + +2.实现过程 +新创建一个接口,参数为机构管理层级,菜单sid,返回为数据权限ID。 + (1)根据用户sid获取切换的机构的管理层级,查找层级对应的角色,角色可能为列表,按照角色层级升序排序。 + (2)遍历角色列表,根据角色sid和菜单sid从角色与菜单关联表中查询数据权限ID,如数据权限ID不为空,则返回数据权限ID。 + (3)页面中根据数据权限ID和业务条件进行查询。需要注意1-4层级根据orgSidPath查询,个人5的需要根据createBySid查询。 + + + + +组织的管理层级 (集团1、事业部2、分公司3、部门4),根据层级确定数据查询的范围。 +根据用户切换的机构路径,根据数据规则ID截取管理层级的机构路径后作为查询条件进行数据查询。 + + +特殊情况说明: +1.分公司副总为部门级角色,由于有些分公司实际情况要求只能查看主管部门的数据,因此,分公司副总角色的数据规则只能设置为部门4。查询数据是只能切换机构去看。此时总经办的查不到数据。 diff --git a/yxt-wms-biz/docs/sheji/系统表.png b/yxt-wms-biz/docs/sheji/系统表.png new file mode 100644 index 0000000000..f091d4e200 Binary files /dev/null and b/yxt-wms-biz/docs/sheji/系统表.png differ diff --git a/yxt-wms-biz/pom.xml b/yxt-wms-biz/pom.xml new file mode 100644 index 0000000000..d160d96397 --- /dev/null +++ b/yxt-wms-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-wms-biz + com.yxt.wms + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/YxtWmsApplication.java b/yxt-wms-biz/src/main/java/com/yxt/wms/YxtWmsApplication.java new file mode 100644 index 0000000000..394cb71920 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/YxtWmsApplication.java @@ -0,0 +1,24 @@ +package com.yxt.wms; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @author dimengzhe + */ +@SpringBootApplication(scanBasePackages = { + "com.yxt.wms.config", + "com.yxt.common.base.config", + "com.yxt.wms" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {"com.yxt.*.*"}) +public class YxtWmsApplication { + public static void main(String[] args) { + SpringApplication.run(YxtWmsApplication.class, args); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/AdminHomeRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/AdminHomeRest.java new file mode 100644 index 0000000000..c4af8c93cd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/AdminHomeRest.java @@ -0,0 +1,16 @@ +package com.yxt.wms.apiadmin; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController("com.yxt.wms.apiadmin.AdminHomeRest") +@RequestMapping("/apiadmin/home") +public class AdminHomeRest { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaRest.java new file mode 100644 index 0000000000..370c645bd9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaRest.java @@ -0,0 +1,69 @@ +package com.yxt.wms.apiadmin.base; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehousearea.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/28 8:53 + */ +@Api(tags = "库区信息") +@RestController +@RequestMapping("/apiadmin/base/wmswarehousearea") +public class WmsWarehouseAreaRest { + + @Autowired + WmsWarehouseAreaService wmsWarehouseAreaService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return wmsWarehouseAreaService.listPage(pq); + } + @ApiOperation("查询所有的库区") + @GetMapping("/listAll") + public ResultBean listAll() { + return wmsWarehouseAreaService.getAllType(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WmsWarehouseAreaDto dto) { + return wmsWarehouseAreaService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return wmsWarehouseAreaService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return wmsWarehouseAreaService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return wmsWarehouseAreaService.updateIsEnable(sid,isEnable); + } + + @ApiOperation("根据仓库sid查询所有库位") + @GetMapping("/selectAll") + public ResultBean> selectAll(@RequestParam("ckSid") String ckSid){ + ResultBean rb = ResultBean.fireFail(); + List vo = wmsWarehouseAreaService.selectAll(ckSid); + return rb.success().setData(vo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaTypeRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaTypeRest.java new file mode 100644 index 0000000000..e4e13d4a4b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseAreaTypeRest.java @@ -0,0 +1,62 @@ +package com.yxt.wms.apiadmin.base; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouseareatype.WmsWarehouseAreaTypeDto; +import com.yxt.wms.biz.base.wmswarehouseareatype.WmsWarehouseAreaTypeQuery; +import com.yxt.wms.biz.base.wmswarehouseareatype.WmsWarehouseAreaTypeService; +import com.yxt.wms.biz.base.wmswarehouseareatype.WmsWarehouseAreaTypeVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/3/18 14:57 + */ +@Api(tags = "库区类型信息") +@RestController +@RequestMapping("/apiadmin/base/wmswarehouseareatype") +public class WmsWarehouseAreaTypeRest { + + @Autowired + WmsWarehouseAreaTypeService wmsWarehouseAreaTypeService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return wmsWarehouseAreaTypeService.listPage(pq); + } + @ApiOperation("查询所有的") + @GetMapping("/listAll") + public ResultBean listAll() { + return wmsWarehouseAreaTypeService.listAll(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WmsWarehouseAreaTypeDto dto) { + return wmsWarehouseAreaTypeService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return wmsWarehouseAreaTypeService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return wmsWarehouseAreaTypeService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return wmsWarehouseAreaTypeService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseExtendRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseExtendRest.java new file mode 100644 index 0000000000..21e1f75113 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseExtendRest.java @@ -0,0 +1,39 @@ +package com.yxt.wms.apiadmin.base; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendDto; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendQuery; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendService; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendVo; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/18 10:52 + */ +public class WmsWarehouseExtendRest { + + @Autowired + WmsWarehouseExtendService wmsWarehouseExtendService; + + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WmsWarehouseExtendDto dto) { + return wmsWarehouseExtendService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return wmsWarehouseExtendService.initialization(sid); + } + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseInfoRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseInfoRest.java new file mode 100644 index 0000000000..aacf482ecd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseInfoRest.java @@ -0,0 +1,70 @@ +package com.yxt.wms.apiadmin.base; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaAllVo; +import com.yxt.wms.biz.base.wmswarehouseinfo.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/27 16:14 + */ +@Api(tags = "仓库信息") +@RestController +@RequestMapping("/apiadmin/base/wmswarehouseinfo") +public class WmsWarehouseInfoRest { + + @Autowired + WmsWarehouseInfoService wmsWarehouseService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return wmsWarehouseService.listPage(pq); + } + @ApiOperation("查询所有的仓库") + @GetMapping("/listAll") + public ResultBean listAll() { + return wmsWarehouseService.listAll(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WmsWarehouseInfoDto dto) { + return wmsWarehouseService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return wmsWarehouseService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return wmsWarehouseService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateStatus/{sid}/{state}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("state")String state) { + return wmsWarehouseService.updateIsEnable(sid,state); + } + + @ApiOperation("查询所有仓库") + @GetMapping("/selectAll") + public ResultBean> selectAll(){ + ResultBean rb = ResultBean.fireFail(); + List wmsWarehouseAreaAllVos = wmsWarehouseService.selectAll(); + return rb.success().setData(wmsWarehouseAreaAllVos); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseRackRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseRackRest.java new file mode 100644 index 0000000000..ce59b9bdba --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/base/WmsWarehouseRackRest.java @@ -0,0 +1,62 @@ +package com.yxt.wms.apiadmin.base; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouserack.WmsWarehouseRackDto; +import com.yxt.wms.biz.base.wmswarehouserack.WmsWarehouseRackQuery; +import com.yxt.wms.biz.base.wmswarehouserack.WmsWarehouseRackService; +import com.yxt.wms.biz.base.wmswarehouserack.WmsWarehouseRackVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/2/28 8:59 + */ +@Api(tags = "货架信息") +@RestController +@RequestMapping("/apiadmin/base/wmswarehouserack") +public class WmsWarehouseRackRest { + + @Autowired + WmsWarehouseRackService wmsWarehouseRackService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return wmsWarehouseRackService.listPage(pq); + } + @ApiOperation("查询所有的库区") + @GetMapping("/getAllType") + public ResultBean getAllType() { + return wmsWarehouseRackService.getAllType(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WmsWarehouseRackDto dto) { + return wmsWarehouseRackService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return wmsWarehouseRackService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return wmsWarehouseRackService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return wmsWarehouseRackService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationDetailRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationDetailRest.java new file mode 100644 index 0000000000..8d9b13dc47 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationDetailRest.java @@ -0,0 +1,56 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationDto; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationQuery; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationService; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationVo; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailDto; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailQuery; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailService; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/27 14:38 + */ +@Api(tags = "预约入库明细表") +@RestController +@RequestMapping("/apiadmin/inventory/warereservadetail") +public class WarehousingReservationDetailRest { + @Autowired + WarehousingReservationDetailService warehousingReservationDetailService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return warehousingReservationDetailService.listPage(pq); + } + + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WarehousingReservationDetailDto dto) { + return warehousingReservationDetailService.saveOrUpdate(dto); + } + + @ApiOperation("根据预约sid查询明细") + @GetMapping("/selByReservationSid/{sid}") + public ResultBean> selByReservationSid(@PathVariable("sid") String sid) { + return warehousingReservationDetailService.selByReservationSid(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateStatus/{sid}/{state}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("state")String state) { + return warehousingReservationDetailService.updateIsEnable(sid,state); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationRest.java new file mode 100644 index 0000000000..29e1f0ec39 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WarehousingReservationRest.java @@ -0,0 +1,55 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationDto; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationQuery; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationService; +import com.yxt.wms.biz.inventory.warehousingreservation.WarehousingReservationVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/2/27 16:14 + */ +@Api(tags = "预约入库") +@RestController +@RequestMapping("/apiadmin/inventory/warereservation") +public class WarehousingReservationRest { + + @Autowired + WarehousingReservationService warehouseReservationService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return warehouseReservationService.listPage(pq); + } + + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody WarehousingReservationDto dto) { + return warehouseReservationService.saveOrUpdate(dto); + } + @ApiOperation("保存") + @PostMapping("/save") + public ResultBean save(@RequestBody WarehousingReservationDto dto) { + return warehouseReservationService.save(dto); + } + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return warehouseReservationService.initialization(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateStatus/{sid}/{state}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("state")String state) { + return warehouseReservationService.updateIsEnable(sid,state); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsAnsBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsAnsBillRest.java new file mode 100644 index 0000000000..45a3f8cfb3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsAnsBillRest.java @@ -0,0 +1,55 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsansbill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Api(tags = "预期到货通知单") +@RestController +@RequestMapping("/apiadmin/WmsAnsBill") +public class WmsAnsBillRest { + + @Autowired + private WmsAnsBillService wmsAnsBillService; + + + @PostMapping("saveOrUpdate") + @ApiOperation("新增修改保存") + ResultBean saveOrUpdate(@RequestBody WmsAnsBillDto dto) { + return wmsAnsBillService.saveOrUpdateBill(dto); + } + + /* @PostMapping("pageList") + @ApiOperation("收货单据选择") + ResultBean> pageList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsAnsBillService.listPage(pagerQuery); + return rb.success().setData(pv); + }*/ + + @PostMapping("listPage") + @ApiOperation("分页列表") + ResultBean> listPage(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsAnsBillService.listPages(pagerQuery); + return rb.success().setData(pv); + } + + @GetMapping("details") + @ApiOperation("详情") + ResultBean details(@RequestParam("sid") String sid) { + return wmsAnsBillService.details(sid); + } + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsDistributeBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsDistributeBillRest.java new file mode 100644 index 0000000000..40db9fc578 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsDistributeBillRest.java @@ -0,0 +1,56 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsdistributebill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Api(tags = "配货单据") +@RestController +@RequestMapping("/apiadmin/WmsDistributeBill") +public class WmsDistributeBillRest { + + @Autowired + private WmsDistributeBillService wmsDistributeBillService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + ResultBean> listPage(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsDistributeBillService.listPage(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("从出库新增配货单") + @GetMapping("/getInit") + ResultBean getInit(@RequestParam("sid") String sid) { + return wmsDistributeBillService.getInit(sid); + } + + @ApiOperation("详情/编辑初始化") + @GetMapping("/details") + ResultBean details(@RequestParam("sid") String sid) { + return wmsDistributeBillService.details(sid); + } + + @ApiOperation("新增修改保存") + @PostMapping("/saveOrUpdateBill") + ResultBean saveOrUpdateBill(@RequestBody WmsDistributeBillDto dto) { + return wmsDistributeBillService.saveOrUpdateBill(dto); + } + + @ApiOperation("确认") + @PostMapping("/confirm") + ResultBean confirm(@RequestBody WmsDistributeBillDto dto) { + return wmsDistributeBillService.confirm(dto); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillDetailRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillDetailRest.java new file mode 100644 index 0000000000..893a2426b9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillDetailRest.java @@ -0,0 +1,49 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailRest
+ * Description: (调拨单-明细).
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "(调拨单-明细)") +@RestController +@RequestMapping("v1/wmsinventoryallocatebilldetail") +public class WmsInventoryAllocatebillDetailRest { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java new file mode 100644 index 0000000000..13a36116b9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventoryallocatebill.WmsInventoryAllocatebillRest
+ * Description: (调拨单)-调出方操作.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "(调拨单)-调出方操作") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventoryallocatebill") +public class WmsInventoryAllocatebillRest { + + @Autowired + private WmsInventoryAllocateBillService wmsInventoryAllocateBillService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryAllocateBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryAllocateBillDtoNew dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailsVoNew vo = wmsInventoryAllocateBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("调拨") + @PostMapping("/allocation") + public ResultBean allocation(@RequestBody WmsInventoryAllocateBillDtoNew dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.allocation(dto); + return rb.success(); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBatchRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBatchRest.java new file mode 100644 index 0000000000..611f4bfc1e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBatchRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorybatch.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventorybatch.WmsInventoryBatchRest
+ * Description: 商品库存-批次属性.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "商品库存-批次属性") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorybatch") +public class WmsInventoryBatchRest { + + @Autowired + private WmsInventoryBatchService wmsInventoryBatchService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryBatchService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryBatchDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryBatchService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryBatchService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBatchDetailsVo vo = wmsInventoryBatchService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillDetailRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillDetailRest.java new file mode 100644 index 0000000000..5694c1e091 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillDetailRest.java @@ -0,0 +1,17 @@ +package com.yxt.wms.apiadmin.inventroy; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wangpengfei + * @date 2024/3/1 10:34 + */ +@Api(tags = "出入库单明细") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorybilldetail") +public class WmsInventoryBillDetailRest { + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillRest.java new file mode 100644 index 0000000000..cc7d82bafe --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryBillRest.java @@ -0,0 +1,84 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorybill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/29 11:17 + */ +@Api(tags = "出入库单据") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorybill") +public class WmsInventoryBillRest { + + @Autowired + WmsInventoryBillService wmsInventoryBillService; + @Autowired + HttpServletResponse response; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryBillService.listPage(pq); + return rb.success().setData(pv); + } + + @ApiOperation("入库单") + @PostMapping("/inStorage") + public ResultBean inStorage(@RequestBody WmsInventoryBillInDto dto) { + return wmsInventoryBillService.inStorage(dto); + } + + + @ApiOperation("出库单") + @PostMapping("/outStorage") + public ResultBean outStorage(@RequestBody WmsInventoryBillOutDto dto) { + return wmsInventoryBillService.outStorage(dto); + } + + @ApiOperation("入库单详情") + @GetMapping("/details") + ResultBean inDetails(@SpringQueryMap InStorageDetailsQuery inStorageDetailsQuery) { + return wmsInventoryBillService.inDetails(inStorageDetailsQuery); + } + +// @ApiOperation("出库单详情") +// @GetMapping("/outDetails") + ResultBean outDetails(@SpringQueryMap OutStorageDetailsQuery outStorageDetailsQuery) { + return wmsInventoryBillService.outDetails(outStorageDetailsQuery); + } + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody WmsInventoryBillQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventoryBillService.listExcel(query); + //定义导出的excel名字 + String excelName = "出入库查询"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventoryBillExcelVo.class, response); + + } + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillDetailRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillDetailRest.java new file mode 100644 index 0000000000..b67e947fe6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillDetailRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailRest
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存盘点-明细") +@RestController +@RequestMapping("wmsinventorycheckbilldetail") +public class WmsInventoryCheckbillDetailRest { + + @Autowired + private WmsInventoryCheckbillDetailService wmsInventoryCheckbillDetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryCheckbillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryCheckbillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillDetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCheckbillDetailDetailsVo vo = wmsInventoryCheckbillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java new file mode 100644 index 0000000000..49c43f565a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java @@ -0,0 +1,100 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorycheckbill.*; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillRest
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存盘点") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorycheckbill") +public class WmsInventoryCheckbillRest { + + @Autowired + private WmsInventoryCheckbillService wmsInventoryCheckbillService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryCheckbillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryCheckbillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCheckbillDetailsVo vo = wmsInventoryCheckbillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("盘点") + @PostMapping("/inven") + public ResultBean inven(@RequestBody WmsInventoryCheckbillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.inven(dto); + return rb.success(); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java new file mode 100644 index 0000000000..3a4f194007 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java @@ -0,0 +1,168 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryQuery; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVoExcelVo; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.*; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.*; +import com.yxt.wms.biz.inventory.wmsoutbill.WmsOutBillVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordFeignFallback.java
+ * Class: inventroy.biz.wmsinventoryrecord.WmsInventoryRecordRest
+ * Description: 库存出入库记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存出入库记录") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventoryrecord") +public class WmsInventoryRecordRest { + + @Autowired + private WmsInventoryRecordService wmsInventoryRecordService; + + @Autowired + HttpServletResponse response; + + @ApiOperation("收发存明细报表") + @PostMapping("/inventoryDetailsRecord") + public ResultBean> inventoryDetailsRecord(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryRecordService.inventoryDetailsRecord(pq); + return rb.success().setData(pv); + } + + @ApiOperation("库存统计报表") + @PostMapping("/inventoryStats") + public ResultBean inventoryStats(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCountReportVo vo = wmsInventoryRecordService.inventoryStats(pq); + return rb.success().setData(vo); + } + + @ApiOperation("入库统计报表详情") + @PostMapping("/inventoryInboundStats") + public ResultBean> inventoryInboundStats(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryRecordService.inventoryInboundStats(pq); + return rb.success().setData(pv); + } + + @ApiOperation("出库统计报表详情") + @PostMapping("/inventoryOutboundStats") + public ResultBean> inventoryOutboundStats(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryRecordService.inventoryOutboundStats(pq); + return rb.success().setData(pv); + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryRecordService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryRecordDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryRecordService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryRecordService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryRecordDetailsVo vo = wmsInventoryRecordService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("库存出入库记录") + @GetMapping("/getWmsInventoryRecordList") + ResultBean> getWmsInventoryRecordList(@RequestParam("sid")String sid){ + return wmsInventoryRecordService.getWmsInventoryRecordList(sid); + } + + @ApiOperation("出入库查询") + @PostMapping("/pageList") + ResultBean> pageList(@RequestBody PagerQuery pagerQuery){ + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryRecordService.listPage(pagerQuery); + return rb.success().setData(pv); + } + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody WmsInventoryRecordsQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventoryRecordService.listExcel(query); + //定义导出的excel名字 + String excelName = "出入库查询"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventoryRecordsExcelVo.class, response); + + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRest.java new file mode 100644 index 0000000000..89c55afd40 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRest.java @@ -0,0 +1,191 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.*; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryDto; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryQuery; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/28 10:51 + */ +@Api(tags = "库存信息") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventory") +public class WmsInventoryRest { + + @Autowired + WmsInventoryService wmsInventoryService; + @Autowired + HttpServletResponse response; + + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryService.listPage(pq); + return rb.success().setData(pv); + } + + @ApiOperation("删除/批量删除") + @DeleteMapping("/delBySids") + ResultBean delBySids(@RequestBody String[] sids) { + return wmsInventoryService.delAllBySids(sids); + } + + // @ApiOperation("入库") +// @GetMapping("/warehousing") + public ResultBean warehousing(WmsInventoryDto dto) { + return wmsInventoryService.warehousing(dto); + } + + /* @ApiOperation("编辑") + @PostMapping("/updateWmsInventory") + ResultBean updateWmsInventory(@RequestBody WmsInventoryUpdateDto dto) { + return wmsInventoryService.updateWmsInventory(dto); + } + + @ApiOperation("新增") + @PostMapping("/saveWmsInventory") + ResultBean saveWmsInventory(@RequestBody WmsInventorySaveDto dto) { + return wmsInventoryService.saveWmsInventory(dto); + }*/ + + + + /*@ApiOperation("初始化") + @PostMapping("/init") + ResultBean init(@RequestParam("sid") String sid) { + return wmsInventoryService.init(sid); + }*/ + + /* @ApiOperation("批量修改销售价") + @PostMapping("/updatePrice") + ResultBean updatePrice(@RequestBody WmsInventoryUpdatePrice wmsInventoryUpdatePrice) { + return wmsInventoryService.updatePrice(wmsInventoryUpdatePrice); + }*/ + + /* @ApiOperation("收发存") + @PostMapping("/getBillList") + ResultBean> getBillList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryService.getBillList(pagerQuery); + return rb.success().setData(pv); + }*/ + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody WmsInventoryQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventoryService.listExcel(query); + //定义导出的excel名字 + String excelName = "库存列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventoryVoExcelVo.class, response); + + } + + @ApiOperation("修改库存数量") + @PostMapping("/updateInventoryCount") + ResultBean updateInventoryCount(@RequestBody WmsUpdateCountQuery query) { + return wmsInventoryService.updateInventoryCount(query); + } + + @ApiOperation("销售开单选择商品分页列表") + @PostMapping("/listPageSales") + public ResultBean> listPageSales(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryService.listPageSales(pq); + return rb.success().setData(pv); + } + + @ApiOperation("查询分公司下所有的商品信息") + @PostMapping("/getPackageGoodsVo") + public ResultBean> getPackageGoodsVo(@RequestBody PagerQuery pq) { + return wmsInventoryService.getPackageGoodsVo(pq); + } + + @ApiOperation("库龄查询") + @PostMapping("/inventoryAgeList") + public ResultBean> inventoryAgeList(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryService.inventoryAgeList(pq); + return rb.success().setData(pv); + } + + @PostMapping("/ageExportExcel") + @ApiOperation(value = "库龄查询导出") + public void ageExportExcel(@RequestBody WmsInventoryAgeQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventoryService.ageExportExcel(query); + //定义导出的excel名字 + String excelName = "库领查询列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventoryAgeExportVo.class, response); + + } + + @ApiOperation("根据商品sid查询库存信息") + @PostMapping("/selectInvenBySkuSid") + public ResultBean selectInvenBySkuSid(@RequestParam("skuSid") String skuSid) { + ResultBean rb = ResultBean.fireFail(); + WmsGoodsInventoryVo wmsGoodsInventoryVo = wmsInventoryService.selectInvenBySkuSid(skuSid); + return rb.success().setData(wmsGoodsInventoryVo); + } + + @ApiOperation("盘库商品分页列表") + @PostMapping("/invenGoodsListPage") + public ResultBean> invenGoodsListPage(@RequestBody PagerQuery pq) { + return wmsInventoryService.invenGoodsListPage(pq); + } + + @ApiOperation("调拨商品分页列表") + @PostMapping("/alloGoodsListPage") + public ResultBean> alloGoodsListPage(@RequestBody PagerQuery pq) { + return wmsInventoryService.alloGoodsListPage(pq); + } + + @ApiOperation("旧件返厂商品分页列表") + @PostMapping("/returnGoodsListPage") + public ResultBean> returnGoodsListPage(@RequestBody PagerQuery pq) { + return wmsInventoryService.returnGoodsListPage(pq); + } + + @ApiOperation("旧件处理商品分页列表") + @PostMapping("/handleGoodsListPage") + public ResultBean> handleGoodsListPage(@RequestBody PagerQuery pq) { + return wmsInventoryService.handleGoodsListPage(pq); + } + + @ApiOperation("根据Sid获取库存实体") + @PostMapping("/fetchEntityBySid") + ResultBean fetchEntityBySid(@RequestParam("sid") String sid) { + return wmsInventoryService.fetchEntityBySid(sid); + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillDetailRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillDetailRest.java new file mode 100644 index 0000000000..9bc3cf23db --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillDetailRest.java @@ -0,0 +1,119 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryQuery; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVoExcelVo; +import com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailFeignFallback.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailRest
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存结算明细") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorysettlebilldetail") +public class WmsInventorySettlebillDetailRest{ + + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + @Autowired + HttpServletResponse response; + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody WmsInventorySettlebillDetailQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventorySettlebillDetailService.listExcel(query); + //定义导出的excel名字 + String excelName = "结转库存列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventorySettlebillExportVo.class, response); + + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventorySettlebillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillDetailService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventorySettlebillDetailDetailsVo vo = wmsInventorySettlebillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillRest.java new file mode 100644 index 0000000000..bae41ac0e4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventorySettlebillRest.java @@ -0,0 +1,124 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryQuery; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVoExcelVo; +import com.yxt.wms.biz.inventory.wmsinventorysettlebill.*; +import com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillFeignFallback.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillRest
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存结算单") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorysettlebill") +public class WmsInventorySettlebillRest { + + @Autowired + private WmsInventorySettlebillService wmsInventorySettlebillService; + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + + @ApiOperation("库存结转") + @PostMapping("/saveSettlebill") + public ResultBean saveSettlebill(@RequestBody WmsInventorySettlebillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.saveSettlebill(dto); + return rb.success(); + } + + @ApiOperation("结转记录查询") + @PostMapping("/carryForwardList") + public ResultBean> carryForwardList(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillService.carryForwardList(pq); + return rb.success().setData(pv); + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventorySettlebillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.delBySids(sids); + for (String sid : sids) { + wmsInventorySettlebillDetailService.delByMainSid(sid); + } + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventorySettlebillDetailsVo vo = wmsInventorySettlebillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldInventoryRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldInventoryRest.java new file mode 100644 index 0000000000..4576aa69df --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldInventoryRest.java @@ -0,0 +1,114 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsoldinventory.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Api(tags = "旧件") +@RestController +@RequestMapping("/apiadmin/WmsOldInventory") +public class WmsOldInventoryRest { + + @Autowired + private WmsOldInventoryService wmsOldInventoryService; + @Autowired + HttpServletResponse response; + + @ApiOperation("待入库旧件列表") + @PostMapping("/listPage") + ResultBean> listPage(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsOldInventoryService.listPage(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("旧件入库初始化") + @GetMapping("/getInit") + ResultBean getInit(@RequestParam("sid") String sid) { + return wmsOldInventoryService.getInit(sid); + } + + @ApiOperation("旧件入库保存") + @PostMapping("/saveInventory") + ResultBean saveInventory(@RequestBody WmsOldInventoryDto dto) { + return wmsOldInventoryService.saveInventory(dto); + } + + @ApiOperation("旧件库存查询") + @PostMapping("/oldPageList") + ResultBean> oldPageList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsOldInventoryService.oldPageList(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("删除/批量删除") + @DeleteMapping("/delBySids") + ResultBean delBySids(@RequestBody String[] sids) { + return wmsOldInventoryService.delAllBySids(sids); + } + + @ApiOperation("导出") + @PostMapping("/excelList") + public void excelList(@RequestBody WmsOldInventoryPageListQuery wmsOldInventoryPageListQuery) { + //得到所有要导出的数据 + List exportVoList = wmsOldInventoryService.listExcel(wmsOldInventoryPageListQuery); + //定义导出的excel名字 + String excelName = "旧件库存列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsOldInventoryExcelVo.class, response); + } + + @ApiOperation("库存出入库记录") + @GetMapping("/getDetailsList") + ResultBean getDetailsList(@RequestParam("sid") String sid) { + return wmsOldInventoryService.getDetailsList(sid); + } + + @ApiOperation("旧件出入库记录") + @PostMapping("/recordList") + ResultBean> recordList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsOldInventoryService.recordList(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("导出") + @PostMapping("/excelRecordList") + public void excelRecordList(@RequestBody WmsOldInventoryRecordListQuery wmsOldInventoryRecordListQuery) { + //得到所有要导出的数据 + List exportVoList = wmsOldInventoryService.excelRecordList(wmsOldInventoryRecordListQuery); + //定义导出的excel名字 + String excelName = "旧件出入库记录列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsOldInventoryRecordListExcelVo.class, response); + } + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldRegisterRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldRegisterRest.java new file mode 100644 index 0000000000..8b208b41b4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOldRegisterRest.java @@ -0,0 +1,37 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsoldregister.WmsOldRegisterDto; +import com.yxt.wms.biz.inventory.wmsoldregister.WmsOldRegisterQuery; +import com.yxt.wms.biz.inventory.wmsoldregister.WmsOldRegisterService; +import com.yxt.wms.biz.inventory.wmsoldregister.WmsOldRegisterVo; +import com.yxt.wms.biz.inventory.wmsoutbill.WmsOutBillVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Api(tags = "旧件回收登记") +@RestController +@RequestMapping("/apiadmin/WmsOldRegister") +public class WmsOldRegisterRest { + + @Autowired + private WmsOldRegisterService wmsOldRegisterService; + + @ApiOperation("新增修改保存") + @PostMapping("/saveorUpdateOldRegister") + ResultBean saveorUpdateOldRegister(@RequestBody WmsOldRegisterDto dto) { + return wmsOldRegisterService.saveorUpdateOldRegister(dto); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOutBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOutBillRest.java new file mode 100644 index 0000000000..e352d59fc1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsOutBillRest.java @@ -0,0 +1,58 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsoutbill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Api(tags = "出库单据") +@RestController +@RequestMapping("/apiadmin/WmsOutBill") +public class WmsOutBillRest { + + @Autowired + private WmsOutBillService wmsOutBillService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + ResultBean> pageList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsOutBillService.listPage(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("出库保存修改") + @PostMapping("/saveOrUpdateOutBill") + ResultBean saveOrUpdateOutBill(@RequestBody WmsOutBillDto dto) { + return wmsOutBillService.saveOrUpdateOutBill(dto); + } + + @ApiOperation("详情") + @GetMapping("/details") + ResultBean details(@RequestParam("sid") String sid) { + return wmsOutBillService.details(sid); + } + + @ApiOperation("选择商品分页列表") + @PostMapping("/getInventoryList") + ResultBean> getInventoryList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsOutBillService.getInventoryList(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("确认") + @PostMapping("/confirm") + ResultBean confirm(@RequestBody WmsOutBillDto dto) { + return wmsOutBillService.confirm(dto); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java new file mode 100644 index 0000000000..12db67ca3f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java @@ -0,0 +1,73 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorybill.WmsInventoryBillQuery; +import com.yxt.wms.biz.inventory.wmsinventorybill.WmsInventoryBillVo; +import com.yxt.wms.biz.inventory.wmsreceiptbill.*; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetail; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Api(tags = "收货单据") +@RestController +@RequestMapping("/apiadmin/inventory/WmsReceiptBill") +public class WmsReceiptBillRest { + + @Autowired + private WmsReceiptBillService wmsReceiptBillService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsReceiptBillService.listPage(pq); + return rb.success().setData(pv); + } + + /* @ApiOperation("新增修改保存") + @PostMapping("/saveOrUpdate2") + ResultBean saveOrUpdate2(@RequestBody WmsReceiptBillDto dto) { + return wmsReceiptBillService.saveOrUpdateBill(dto); + } + */ + @ApiOperation("新增修改保存") + @PostMapping("/saveOrUpdate") + ResultBean saveOrUpdate(@RequestBody WmsReceiptBillDto2 dto) { + return wmsReceiptBillService.saveOrUpdateBill2(dto); + } + + @ApiOperation("通知单收货单初始化") + @GetMapping("/getInitDetails") + ResultBean getInitDetails(@RequestParam("sourceSid") String sourceSid) { + return wmsReceiptBillService.getInitDetails(sourceSid); + } + + @ApiOperation("收货单据编辑初始化/详情") + @GetMapping("/getDetailsInit") + ResultBean getDetailsInit(@RequestParam("sid") String sid) { + return wmsReceiptBillService.getDetailsInit(sid); + } + + @ApiOperation("确认") + @PostMapping("/confirm") + ResultBean confirm(@RequestBody WmsReceiptBillDto2 dto) { + return wmsReceiptBillService.confirm(dto); + } + + @ApiOperation("删除/批量删除") + @DeleteMapping("/delBySids") + ResultBean delBySids(@RequestBody String[] sids) { + return wmsReceiptBillService.delAllBySids(sids); + } + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java new file mode 100644 index 0000000000..bf63d41f26 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java @@ -0,0 +1,73 @@ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillPageVo; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillQuery; +import com.yxt.wms.biz.inventory.wmsshelfbill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Api(tags = "上货架") +@RestController +@RequestMapping("/apiadmin/WmsShelfBill") +public class WmsShelfBillRest { + + @Autowired + private WmsShelfBillService wmsShelfBillService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = wmsShelfBillService.listPage(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增修改保存") + @PostMapping("/saveOrUpdate") + ResultBean saveOrUpdate(@RequestBody WmsShelfBillDto dto) { + return wmsShelfBillService.saveOrUpdateShelf(dto); + } + + @ApiOperation("删除/批量删除") + @DeleteMapping("/delBySids") + ResultBean delBySids(@RequestBody String[] sids) { + return wmsShelfBillService.delAllBySids(sids); + } + + @ApiOperation("详情") + @GetMapping("/details") + ResultBean details(@RequestParam("sid") String sid) { + return wmsShelfBillService.details(sid); + } + + /** + * 新增初始化 + * + * @param sid 收货单据sid + * @return + */ + @ApiOperation("新增初始化") + @GetMapping("/getInit") + ResultBean getInit(@RequestParam("sid") String sid,@RequestParam("orgPath")String orgPath,@RequestParam("userSid")String userSid) { + return wmsShelfBillService.getInit(sid,orgPath,userSid); + } + + @ApiOperation("确认") + @PostMapping("/confirm") + ResultBean confirm(@RequestBody WmsShelfBillDto dto) { + return wmsShelfBillService.confirm(dto); + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiwx/WxHomeRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiwx/WxHomeRest.java new file mode 100644 index 0000000000..70d00103de --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiwx/WxHomeRest.java @@ -0,0 +1,16 @@ +package com.yxt.wms.apiwx; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController("com.yxt.wms.apiwx.WxHomeRest") +@RequestMapping("/apiwx/home") +public class WxHomeRest { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseArea.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseArea.java new file mode 100644 index 0000000000..8518704fab --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseArea.java @@ -0,0 +1,28 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsWarehouseArea extends BaseEntity { +// private String id; +// private String sid= UUID.randomUUID().toString(); +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +// private Date createTime; +// private String remarks; +// private String isEnable; + private String areaName;//库位名称 + private String areaCode;//库位编码 + private String warehouseSid;//仓库sid + private String volume;//库位容量 + private String unit;//计量单位 + private String areaTypeSid;//货区类型 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaAllVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaAllVo.java new file mode 100644 index 0000000000..f2a58d43b9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaAllVo.java @@ -0,0 +1,56 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.base.wmswarehousearea; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(仓库)
+ * File: WmsWarehouseAreaVo.java
+ * Class: com.yxt.wms.api.wmswarehousearea.WmsWarehouseAreaVo
+ * Description: 库区 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-09 14:35:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库区 视图数据详情", description = "库区 视图数据详情") +public class WmsWarehouseAreaAllVo implements Vo { + + private String sid; + @ApiModelProperty("库位名称") + private String areaName; + @ApiModelProperty("库位编码") + private String areaCode; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaDto.java new file mode 100644 index 0000000000..21e878c5b4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaDto.java @@ -0,0 +1,28 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsWarehouseAreaDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String areaName;//库位名称 + private String areaCode;//库位编码 + private String warehouseSid;//仓库sid + private String volume;//库位容量 + private String unit;//计量单位 + private String areaTypeSid;//货区类型 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.java new file mode 100644 index 0000000000..e8837df2ec --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.java @@ -0,0 +1,24 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsWarehouseAreaMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsWarehouseAreaVo initialization (@Param("sid") String sid); + + @Select("select * from wms_warehouse_area where warehouseSid = #{ckSid}") + List selectAll(String ckSid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.xml new file mode 100644 index 0000000000..4cdd80de77 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaQuery.java new file mode 100644 index 0000000000..dc95bb8ee3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseAreaQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaService.java new file mode 100644 index 0000000000..d357cde69d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaService.java @@ -0,0 +1,93 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsWarehouseAreaService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("areaName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + public ResultBean getAllType() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(WmsWarehouseAreaDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsWarehouseArea wmsWarehouseArea = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseArea, "id", "sid"); + wmsWarehouseArea.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouseArea); + } else { + WmsWarehouseArea wmsWarehouseArea = new WmsWarehouseArea(); + sid = wmsWarehouseArea.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseArea, "id", "sid"); + wmsWarehouseArea.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseArea); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseArea wmsWarehouseArea = fetchBySid(sid); + if (null != wmsWarehouseArea) { + baseMapper.deleteById(wmsWarehouseArea.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseArea wmsWarehouseArea = fetchBySid(sid); + if (null != wmsWarehouseArea) { + wmsWarehouseArea.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseArea); + } + return rb.success().setMsg("成功"); + } + + public List selectAll(String ckSid) { + return baseMapper.selectAll(ckSid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaVo.java new file mode 100644 index 0000000000..daf2d272c4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaVo.java @@ -0,0 +1,34 @@ +package com.yxt.wms.biz.base.wmswarehousearea; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseAreaVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String areaName;//库位名称 + private String areaCode;//库位编码 + private String warehouseSid;//仓库sid + private String volume;//库位容量 + private String unit;//计量单位 + private String areaTypeSid;//货区类型 + private String warehouseName;//仓库名称 + private String areaTypeName;//货区类型名称 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaType.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaType.java new file mode 100644 index 0000000000..916b8443cf --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaType.java @@ -0,0 +1,17 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsWarehouseAreaType extends BaseEntity { + + private String warehouseAreaTypeName;//库位类型名称 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeDto.java new file mode 100644 index 0000000000..c368768fbb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeDto.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsWarehouseAreaTypeDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String warehouseAreaTypeName;//库位类型名称 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.java new file mode 100644 index 0000000000..dff49768f8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsWarehouseAreaTypeMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsWarehouseAreaTypeVo initialization (@Param("sid") String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.xml new file mode 100644 index 0000000000..c9a6c7995f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeQuery.java new file mode 100644 index 0000000000..203efd4f63 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseAreaTypeQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeService.java new file mode 100644 index 0000000000..f8f4d52bf6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeService.java @@ -0,0 +1,89 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsWarehouseAreaTypeService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaTypeQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("areaName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + public ResultBean listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(WmsWarehouseAreaTypeDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsWarehouseAreaType wmsWarehouseArea = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseArea, "id", "sid"); + wmsWarehouseArea.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouseArea); + } else { + WmsWarehouseAreaType wmsWarehouseArea = new WmsWarehouseAreaType(); + sid = wmsWarehouseArea.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseArea, "id", "sid"); + wmsWarehouseArea.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseArea); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaTypeVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaType wmsWarehouseArea = fetchBySid(sid); + if (null != wmsWarehouseArea) { + baseMapper.deleteById(wmsWarehouseArea.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseAreaType wmsWarehouseArea = fetchBySid(sid); + if (null != wmsWarehouseArea) { + wmsWarehouseArea.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseArea); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeVo.java new file mode 100644 index 0000000000..7909f2213a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseareatype/WmsWarehouseAreaTypeVo.java @@ -0,0 +1,29 @@ +package com.yxt.wms.biz.base.wmswarehouseareatype; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseAreaTypeVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String warehouseAreaTypeName;//库位类型名称 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtend.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtend.java new file mode 100644 index 0000000000..2bdcd70163 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtend.java @@ -0,0 +1,31 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class WmsWarehouseExtend extends BaseEntity { + + private String warehouseName;//仓库名称 + private String warehouseCode;//仓库编码 + private String contacts;//联系人 + private String mob;//手机 + private String telephone;//联系电话 + private String manager;//主管 + private String areaSid;//地区sid + private String address;//地址 + private String longitude;//经度 + private String latitude;//纬度 + private String warehouseTypeKey;//仓库类型Key + private String warehouseTypeValue;//仓库类型value + private String usageStatus;//使用状态,0停用 1正常 + private String squareMeter;//平方米 + private String sortNo;//创建组织sid + private String useOrgSid;//创建组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendDto.java new file mode 100644 index 0000000000..fd7d994b7d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendDto.java @@ -0,0 +1,36 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsWarehouseExtendDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String warehouseSid;//仓库sid + private String markupRate1;//加价率1 + private String markupRate2;//加价率2 + private String markupRate3;//加价率3 + private String markupRate4;//加价率4 + private String markupRate5;//加价率5 + + + + + + + + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.java new file mode 100644 index 0000000000..981963ccad --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.java @@ -0,0 +1,17 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsWarehouseExtendMapper extends BaseMapper { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.xml new file mode 100644 index 0000000000..052328d163 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendQuery.java new file mode 100644 index 0000000000..e994faefc4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseExtendQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendService.java new file mode 100644 index 0000000000..23e462d31f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendService.java @@ -0,0 +1,64 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsWarehouseExtendService extends MybatisBaseService { + + + public ResultBean saveOrUpdate(WmsWarehouseExtendDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; +// for (WmsWarehouseExtendDto dto : dtos) { + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsWarehouseExtend wmsWarehouse = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouse); + } else { + WmsWarehouseExtend wmsWarehouse = new WmsWarehouseExtend(); + sid = wmsWarehouse.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouse); + } +// } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseExtendVo vo = new WmsWarehouseExtendVo(); + WmsWarehouseExtend wmsWarehouse = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if (null != wmsWarehouse) { + BeanUtil.copyProperties(wmsWarehouse, vo); +// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) { +// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl()); +// } +// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); + } + return rb.success().setData(vo); + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendVo.java new file mode 100644 index 0000000000..6198f59691 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseextend/WmsWarehouseExtendVo.java @@ -0,0 +1,43 @@ +package com.yxt.wms.biz.base.wmswarehouseextend; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseExtendVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String warehouseName;//仓库名称 + private String warehouseCode;//仓库编码 + private String contacts;//联系人 + private String mob;//手机 + private String telephone;//联系电话 + private String manager;//主管 + private String areaSid;//地区sid + private String address;//地址 + private String longitude;//经度 + private String latitude;//纬度 + private String warehouseTypeKey;//仓库类型Key + private String warehouseTypeValue;//仓库类型value + private String usageStatus;//使用状态,0停用 1正常 + private String squareMeter;//平方米 + private String sortNo;//创建组织sid + private String useOrgSid;//创建组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfo.java new file mode 100644 index 0000000000..0f164290bf --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfo.java @@ -0,0 +1,41 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class WmsWarehouseInfo extends BaseEntity { + + private String warehouseName;//仓库名称 + private String warehouseCode;//仓库编码 + private String contacts;//联系人 + private String mob;//手机 + private String telephone;//联系电话 + private String manager;//主管 + private String areaSid;//地区sid + private String address;//地址 + private String longitude;//经度 + private String latitude;//纬度 + private String warehouseTypeKey;//仓库类型Key + private String warehouseTypeValue;//仓库类型value + private String usageStatus;//使用状态,0停用 1正常 + private String squareMeter;//平方米 + private String sortNo;//创建组织sid + private String useOrgSid;//创建组织sid + private String createOrgSid;//创建组织sid + + + + + + + + + + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoAllVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoAllVo.java new file mode 100644 index 0000000000..3dce54a932 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoAllVo.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.base.wmswarehouseinfo; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(仓库)
+ * File: WmsWarehouseInfoVo.java
+ * Class: com.yxt.wms.api.wmswarehouseinfo.WmsWarehouseInfoVo
+ * Description: 仓库 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-09 14:35:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "仓库 视图数据详情", description = "仓库 视图数据详情") +public class WmsWarehouseInfoAllVo implements Vo { + + private String sid; + @ApiModelProperty("仓库名称") + private String warehouseName; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoDto.java new file mode 100644 index 0000000000..e976cf2cb5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoDto.java @@ -0,0 +1,42 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendDto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsWarehouseInfoDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String warehouseName;//仓库名称 + private String warehouseCode;//仓库编码 + private String contacts;//联系人 + private String mob;//手机 + private String telephone;//联系电话 + private String manager;//主管 + private String areaSid;//地区sid + private String address;//地址 + private String longitude;//经度 + private String latitude;//纬度 + private String warehouseTypeKey;//仓库类型Key + private String warehouseTypeValue;//仓库类型value + private String usageStatus;//使用状态,0停用 1正常 + private String squareMeter;//平方米 + private String sortNo;//创建组织sid + private String useOrgSid;//创建组织sid + private String createOrgSid;//创建组织sid +// private List wmsWarehouseExtendDtos; + private WmsWarehouseExtendDto wmsWarehouseExtendDto; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.java new file mode 100644 index 0000000000..f702273f52 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.java @@ -0,0 +1,24 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaAllVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsWarehouseInfoMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + @Select("select * from wms_warehouse_info") + List selectAll(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.xml new file mode 100644 index 0000000000..69e01fe07d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoQuery.java new file mode 100644 index 0000000000..eb0b237654 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseInfoQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoService.java new file mode 100644 index 0000000000..f98021be00 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoService.java @@ -0,0 +1,125 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaAllVo; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtend; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendService; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsWarehouseInfoService extends MybatisBaseService { + + @Autowired + WmsWarehouseExtendService wmsWarehouseExtendService; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseInfoQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("warehouseName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + public ResultBean listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(WmsWarehouseInfoDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsWarehouseInfo wmsWarehouse = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouse); +// for (WmsWarehouseExtendDto wmsWarehouseExtendDto : dto.getWmsWarehouseExtendDtos()) { +// wmsWarehouseExtendDto.setWarehouseSid(wmsWarehouse.getSid()); +// } + dto.getWmsWarehouseExtendDto().setWarehouseSid(wmsWarehouse.getSid()); + wmsWarehouseExtendService.saveOrUpdate(dto.getWmsWarehouseExtendDto()); + } else { + WmsWarehouseInfo wmsWarehouse = new WmsWarehouseInfo(); + sid = wmsWarehouse.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouse); +// for (WmsWarehouseExtendDto wmsWarehouseExtendDto : dto.getWmsWarehouseExtendDtos()) { +// wmsWarehouseExtendDto.setWarehouseSid(wmsWarehouse.getSid()); +// } + dto.getWmsWarehouseExtendDto().setWarehouseSid(wmsWarehouse.getSid()); + wmsWarehouseExtendService.saveOrUpdate(dto.getWmsWarehouseExtendDto()); + } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseInfoVo vo = new WmsWarehouseInfoVo(); + WmsWarehouseInfo wmsWarehouse = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsWarehouse, vo); + List list=wmsWarehouseExtendService.list(new QueryWrapper().eq("warehouseSid",vo.getSid())); + List list1=new ArrayList<>(); + for (WmsWarehouseExtend wmsWarehouseExtend : list) { + WmsWarehouseExtendVo vo1= new WmsWarehouseExtendVo(); + BeanUtil.copyProperties(wmsWarehouseExtend, vo1); + list1.add(vo1); + } + vo.setWmsWarehouseExtendVos(list1); + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseInfo wmsWarehouse = fetchBySid(sid); + if (null != wmsWarehouse) { + baseMapper.deleteById(wmsWarehouse.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseInfo wmsWarehouse = fetchBySid(sid); + if (null != wmsWarehouse) { + wmsWarehouse.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouse); + } + return rb.success().setMsg("成功"); + } + + public List selectAll() { + return baseMapper.selectAll(); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoVo.java new file mode 100644 index 0000000000..21a32ef693 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouseinfo/WmsWarehouseInfoVo.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.base.wmswarehouseinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendDto; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendVo; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseInfoVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String warehouseName;//仓库名称 + private String warehouseCode;//仓库编码 + private String contacts;//联系人 + private String mob;//手机 + private String telephone;//联系电话 + private String manager;//主管 + private String areaSid;//地区sid + private String address;//地址 + private String longitude;//经度 + private String latitude;//纬度 + private String warehouseTypeKey;//仓库类型Key + private String warehouseTypeValue;//仓库类型value + private String usageStatus;//使用状态,0停用 1正常 + private String squareMeter;//平方米 + private String sortNo;//创建组织sid + private String useOrgSid;//创建组织sid + private String createOrgSid;//创建组织sid + private List wmsWarehouseExtendVos; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRack.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRack.java new file mode 100644 index 0000000000..1aca44ba12 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRack.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsWarehouseRack extends BaseEntity { +// private String id; +// private String sid= UUID.randomUUID().toString(); +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +// private Date createTime; +// private String remarks; +// private String isEnable; + private String rackName;//货架名称 + private String rackCode;//货架编码 + private String warehouseSid;//仓库sid + private String locationSid;//库位sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackDto.java new file mode 100644 index 0000000000..96edca1e29 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackDto.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsWarehouseRackDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String rackName;//货架名称 + private String rackCode;//货架编码 + private String warehouseSid;//仓库sid + private String locationSid;//库位sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.java new file mode 100644 index 0000000000..2755312d82 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.java @@ -0,0 +1,19 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsWarehouseRackMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsWarehouseRackVo initialization (@Param("sid") String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.xml new file mode 100644 index 0000000000..13f5fbdd00 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackQuery.java new file mode 100644 index 0000000000..4ee91bcea1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseRackQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackService.java new file mode 100644 index 0000000000..608cdd68cd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackService.java @@ -0,0 +1,90 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsWarehouseRackService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseRackQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("rackName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + public ResultBean getAllType() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(WmsWarehouseRackDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsWarehouseRack wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsWarehouseRack wmsWarehouseRack = new WmsWarehouseRack(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseRackVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseRack wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsWarehouseRack wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackVo.java new file mode 100644 index 0000000000..e23416e0e3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehouserack/WmsWarehouseRackVo.java @@ -0,0 +1,33 @@ +package com.yxt.wms.biz.base.wmswarehouserack; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsWarehouseRackVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String rackName;//货架名称 + private String rackCode;//货架编码 + private String warehouseSid;//仓库sid + private String locationSid;//库位sid + private String warehouseName;//仓库名称 + private String locationName;//库位名称 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservation.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservation.java new file mode 100644 index 0000000000..111702c457 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservation.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservation extends BaseEntity { + + private String applyDate;//申请时间 + private String externalCode;//外部编码 + private String documentCode;//单据编码 + private String documentType;//单据类型 + private String handoverStatus;//交接状态 + private String handoverTime;//交接时间 + private String warehouseSid;//仓库sid + private String warehouseAreaSid;//货位sid + private String supplierSid;//供应商sid + private String supplierName;//供应商名称 + private String waybillNumber;//运单号 + private String applicant;//申请人 + private String reservationDate;//预约时间 + + + + + + + + + + + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationDto.java new file mode 100644 index 0000000000..a16b5144ff --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationDto.java @@ -0,0 +1,36 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailDto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String applyDate;//申请时间 + private String externalCode;//外部编码 + private String documentCode;//单据编码 + private String documentType;//单据类型 + private String handoverStatus;//交接状态 + private String handoverTime;//交接时间 + private String warehouseSid;//仓库sid + private String warehouseAreaSid;//货位sid + private String supplierSid;//供应商sid + private String waybillNumber;//运单号 + private String applicant;//申请人 + private String reservationDate;//预约时间 + private List warehousingReservationDetails;//明细 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.java new file mode 100644 index 0000000000..a8344fee1d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.java @@ -0,0 +1,17 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Mapper +public interface WarehousingReservationMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.xml new file mode 100644 index 0000000000..9734ef1679 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationQuery.java new file mode 100644 index 0000000000..00603f4e74 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationQuery.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationQuery implements Query { + private String goodsName; + private String documentType;//入库类型 1 采购入库 2调拨入库 3其他入库 + private String handoverStatus;//入库状态 1在途 2部分收货 3收货完成 4关闭 + private String supplierName;//供应商名称 + private String externalCode;//外部编码 + private String documentCode;//单据编码 + private String waybillNumber;//运单号 + private String areaName;//库位 + private String interval; //单据时间间隔 0 今天 1近7天 2 近30天 3 三个月前 + private String type;//类型 + private String startDate;//开始时间 + private String endDate;//结束时间 +// private String +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationService.java new file mode 100644 index 0000000000..9858ec4f60 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationService.java @@ -0,0 +1,175 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtend; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendService; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendVo; +import com.yxt.wms.biz.inventory.warehousingreservationdetail.WarehousingReservationDetailService; +import com.yxt.wms.feign.base.basesupplierinfo.BaseSupplierInfoDetailsVo; +import com.yxt.wms.feign.base.basesupplierinfo.BaseSupplierInfoFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Service +public class WarehousingReservationService extends MybatisBaseService { + + @Autowired + WmsWarehouseExtendService wmsWarehouseExtendService; + @Resource + BaseSupplierInfoFeign baseSupplierInfoFeign; + @Autowired + WarehousingReservationDetailService warehousingReservationDetailService; + private QueryWrapper createQueryWrapper(WarehousingReservationQuery query) { + + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getDocumentType())){ + qw.like("a.documentType",query.getDocumentType()); + } + if(StringUtils.isNotBlank(query.getHandoverStatus())){ + qw.eq("a.handoverStatus",query.getHandoverStatus()); + } + if(StringUtils.isNotBlank(query.getExternalCode())){ + qw.like("a.externalCode",query.getExternalCode()); + } + if(StringUtils.isNotBlank(query.getSupplierName())){ + qw.like("a.supplierName",query.getSupplierName()); + } + if(StringUtils.isNotBlank(query.getDocumentCode())){ + qw.like("a.documentCode",query.getDocumentCode()); + } + if(StringUtils.isNotBlank(query.getWaybillNumber())){ + qw.like("a.waybillNumber",query.getWaybillNumber()); + } + if(StringUtils.isNotBlank(query.getGoodsName())){ + qw.like("goodsName",query.getGoodsName()); + } + if(StringUtils.isNotBlank(query.getAreaName())){ + qw.like("a.areaName",query.getAreaName()); + } + if(StringUtils.isNotBlank(query.getStartDate())|| StringUtils.isNotBlank(query.getEndDate())){ + if(StringUtils.isNotBlank(query.getStartDate())){ + qw.apply( "date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"); + } + if(StringUtils.isNotBlank(query.getEndDate())){ + qw.apply("date_format (r.applyDate,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')"); + } + }else{ + if(StringUtils.isNotBlank(query.getInterval())){ + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + if(query.getInterval().equals("0")){ + qw.apply("date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + sdf.format(new Date()) + "','%Y-%m-%d')"); + }else if(query.getInterval().equals("1")){ + Date ac =DateUtil.offsetDay(new Date(),-7); + qw.apply("date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + sdf.format(ac) + "','%Y-%m-%d')"); + }else if(query.getInterval().equals("2")){ + Date ac=DateUtil.offsetMonth(new Date(),-1); + qw.apply("date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + sdf.format(ac) + "','%Y-%m-%d')"); + }else if(query.getInterval().equals("3")){ + Date ac =DateUtil.offsetMonth(new Date(),-3); + qw.apply("date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + sdf.format(ac) + "','%Y-%m-%d')"); + } + } + } + return qw; + } + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservationQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + public ResultBean saveOrUpdate(WarehousingReservationDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WarehousingReservation wmsWarehouse = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouse); + } else { + WarehousingReservation wmsWarehouse = new WarehousingReservation(); + sid = wmsWarehouse.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouse); + } + + return rb.success().setMsg("成功"); + } + public ResultBean save(WarehousingReservationDto dto) { + ResultBean rb = ResultBean.fireFail(); + SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd"); + WarehousingReservation wmsWarehouse = new WarehousingReservation(); + String code="YYRK"+sdf.format(new Date()); + WarehousingReservation warehousingReservation= baseMapper.selectOne(new QueryWrapper() + .like("documentCode",code).orderByDesc("documentCode").apply("limit 1")); + if(warehousingReservation!=null){ + wmsWarehouse.setDocumentCode(code+getNext(warehousingReservation.getDocumentCode())); + }else{ + wmsWarehouse.setDocumentCode(code+"0001"); + } + BaseSupplierInfoDetailsVo supplierInfoDetailsVo= baseSupplierInfoFeign.fetchDetailsBySid(dto.getSupplierSid()).getData(); + wmsWarehouse.setSupplierName(supplierInfoDetailsVo.getSupplierName()); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouse); + warehousingReservationDetailService.save(dto.getWarehousingReservationDetails()); + return rb.success().setMsg("成功"); + } + + + public static String getNext(String code) { + String newC=code.substring(code.length()-4); + int startValue=Integer.parseInt(newC); + AtomicInteger val = new AtomicInteger(startValue); + int nextVal = val.incrementAndGet(); + return String.format("%04d", nextVal); + } + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservationVo vo = new WarehousingReservationVo(); + WarehousingReservation wmsWarehouse = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsWarehouse, vo); +// vo.setWmsWarehoseExtendVos(list1); + return rb.success().setData(vo); + } + + + + + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservation wmsWarehouse = fetchBySid(sid); + if (null != wmsWarehouse) { + wmsWarehouse.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouse); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationVo.java new file mode 100644 index 0000000000..1bc50f8731 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservation/WarehousingReservationVo.java @@ -0,0 +1,43 @@ +package com.yxt.wms.biz.inventory.warehousingreservation; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String applyDate;//申请时间 + private String externalCode;//外部编码 + private String documentCode;//单据编码 + private String documentType;//单据类型 + private String documentValue;//单据类型vaule + private String handoverStatus;//交接状态 + private String handoverValue;//交接状态value + private String handoverTime;//交接时间 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名 + private String warehouseAreaSid;//货位sid + private String warehouseAreaName;//货位sid + private String supplierSid;//供应商sid + private String supplierName;//供应商名 + private String waybillNumber;//运单号 + private String applicant;//申请人 + private String reservationDate;//预约时间 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetail.java new file mode 100644 index 0000000000..418e480158 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetail.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationDetail extends BaseEntity { + + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品code + private String unit;//单位 + private String barCode;//条码 + private String skuCode;//商品规格code + private String appointmentQuantity;//预约数量 + private String actualQuantity;//实际数量 + private String price;//单价 + private String appointmentAmount;//v预约金额 + private String actualAmount;//实际金额 + private String freight;//运费 + private String orderSid;//预约sid + + + + + + + + + + + + + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailDto.java new file mode 100644 index 0000000000..eafbc16261 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailDto.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationDetailDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品code + private String unit;//单位 + private String barCode;//条码 + private String skuCode;//商品规格code + private String skuSid;//规格sid + private String appointmentQuantity;//预约数量 + private String actualQuantity;//实际数量 + private String price;//单价 + private String appointmentAmount;//v预约金额 + private String actualAmount;//实际金额 + private String freight;//运费 + private String orderSid;//预约sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.java new file mode 100644 index 0000000000..92cb4b050b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.java @@ -0,0 +1,17 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Mapper +public interface WarehousingReservationDetailMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.xml new file mode 100644 index 0000000000..4fe5506217 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailQuery.java new file mode 100644 index 0000000000..11fff45f48 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailQuery.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationDetailQuery implements Query { + private String goodsName; + private String documentType;//入库类型 1 采购入库 2调拨入库 3其他入库 + private String handoverStatus;//入库状态 1在途 2部分收货 3收货完成 4关闭 + private String supplierName;//供应商名称 + private String externalCode;//外部编码 + private String documentCode;//单据编码 + private String waybillNumber;//运单号 + private String areaName;//库位 + private String interval; //单据时间间隔 0 今天 1近7天 2 近30天 3 三个月前 + private String type; + private String startDate; + private String endDate; +// private String +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailService.java new file mode 100644 index 0000000000..d2b6568906 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailService.java @@ -0,0 +1,107 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouseextend.WmsWarehouseExtendService; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; +import com.yxt.wms.feign.base.basesupplierinfo.BaseSupplierInfoDetailsVo; +import com.yxt.wms.feign.base.basesupplierinfo.BaseSupplierInfoFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Service +public class WarehousingReservationDetailService extends MybatisBaseService { + + @Autowired + WmsWarehouseExtendService wmsWarehouseExtendService; + @Resource + private BaseGoodsSkuFeign baseGoodsSkuFeign; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservationDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + public ResultBean saveOrUpdate(WarehousingReservationDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WarehousingReservationDetail wmsWarehouse = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setModifyTime(new Date()); + baseMapper.updateById(wmsWarehouse); + } else { + WarehousingReservationDetail wmsWarehouse = new WarehousingReservationDetail(); + sid = wmsWarehouse.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouse); + } + + return rb.success().setMsg("成功"); + } + public ResultBean save(List dtos) { + ResultBean rb = ResultBean.fireFail(); + for (WarehousingReservationDetailDto dto : dtos) { + WarehousingReservationDetail wmsWarehouse = new WarehousingReservationDetail(); + BeanUtil.copyProperties(dto, wmsWarehouse, "id", "sid"); + wmsWarehouse.setCreateTime(new DateTime()); + BaseGoodsSkuDetailsVo vo=baseGoodsSkuFeign.getDetails(dto.getSkuSid()).getData(); + wmsWarehouse.setGoodsName(vo.getGoodsName()); + wmsWarehouse.setUnit(vo.getGoodsUnitName()); + wmsWarehouse.setGoodsCode(vo.getGoodsCode()); + wmsWarehouse.setBarCode(vo.getBarCode()); + wmsWarehouse.setSkuCode(vo.getGoodsSkuCode()); + baseMapper.insert(wmsWarehouse); + } + return rb.success().setMsg("成功"); + } + + + + public ResultBean> selByReservationSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservationDetailVo vo = new WarehousingReservationDetailVo(); + WarehousingReservationDetail wmsWarehouse = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsWarehouse, vo); + return rb.success().setData(vo); + } + + + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WarehousingReservationDetail wmsWarehouse = fetchBySid(sid); + if (null != wmsWarehouse) { + wmsWarehouse.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouse); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailVo.java new file mode 100644 index 0000000000..7f77bca6bd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/warehousingreservationdetail/WarehousingReservationDetailVo.java @@ -0,0 +1,39 @@ +package com.yxt.wms.biz.inventory.warehousingreservationdetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/3/26 16:36 + */ +@Data +public class WarehousingReservationDetailVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品code + private String unit;//单位 + private String barCode;//条码 + private String skuCode;//商品规格code + private String appointmentQuantity;//预约数量 + private String actualQuantity;//实际数量 + private String price;//单价 + private String appointmentAmount;//v预约金额 + private String actualAmount;//实际金额 + private String freight;//运费 + private String orderSid;//预约sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBill.java new file mode 100644 index 0000000000..eb472b459e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBill.java @@ -0,0 +1,51 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: 预期到货通知单 + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Data +public class WmsAnsBill extends BaseEntity { + + @ApiModelProperty("外部单号(业务单据编号)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)") + private String busTypeValue; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)") + private Integer billState; + @ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)") + private String reviewStatus; + @ApiModelProperty("拒绝原因") + private String refuseReason; + @ApiModelProperty("联系人") + private String contact; + @ApiModelProperty("联系人手机") + private String mobile; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner; + @ApiModelProperty("预计到货日期") + private Date deliveryDate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillDto.java new file mode 100644 index 0000000000..5a01e90fd6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillDto.java @@ -0,0 +1,55 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Data +public class WmsAnsBillDto { + + private String sid; + + @ApiModelProperty("外部单号(业务单据编号)") + private String sourceBillNo; + @ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)") + private String busTypeValue; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)") + private Integer billState; + @ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)") + private String reviewStatus; + @ApiModelProperty("拒绝原因") + private String refuseReason; + @ApiModelProperty("联系人") + private String contact; + @ApiModelProperty("联系人手机") + private String mobile; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner; + @ApiModelProperty("预计到货日期") + private Date deliveryDate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + + private List wmsAnsBillDetailList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.java new file mode 100644 index 0000000000..0454caa6d1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.java @@ -0,0 +1,24 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetail; +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetailVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Mapper +public interface WmsAnsBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage listPages(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + WmsAnsDetailsVo details(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.xml new file mode 100644 index 0000000000..851085adb9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillQuery.java new file mode 100644 index 0000000000..c825aa5557 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillQuery.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Data +public class WmsAnsBillQuery implements Query { + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("开始时间") + private String createTimeStart; + @ApiModelProperty("结束时间") + private String createTimeEnd; + @ApiModelProperty("业务类型") + private String busTypeKey; + @ApiModelProperty("供应商") + private String supplierName; + @ApiModelProperty("预期到货日期开始时间") + private String deliveryDateStart; + @ApiModelProperty("预期到货日期结束时间") + private String deliveryDateEnd; + //单据状态 + private String billState; + + @ApiModelProperty("审核状态") + private String reviewStatus; + + @ApiModelProperty("外部单号(业务单据编号)") + private String sourceBillNo; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillService.java new file mode 100644 index 0000000000..e224813e93 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillService.java @@ -0,0 +1,139 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsansbilldetail.*; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBill; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillQuery; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Collections; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Service +public class WmsAnsBillService extends MybatisBaseService { + + @Autowired + private WmsAnsBillDetailService wmsAnsBillDetailService; + + public ResultBean saveOrUpdateBill(WmsAnsBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsAnsBill wmsAnsBill = new WmsAnsBill(); + BeanUtil.copyProperties(dto, wmsAnsBill, "sid"); + sid = wmsAnsBill.getSid(); + List wmsAnsBillDetailList = dto.getWmsAnsBillDetailList(); + wmsAnsBillDetailList.removeAll(Collections.singleton(null)); + if (!wmsAnsBillDetailList.isEmpty()) { + wmsAnsBillDetailService.saveOrUpdateDetailsList(sid, wmsAnsBillDetailList); + } else { + return rb.setMsg("单据明细不能为空"); + } + baseMapper.insert(wmsAnsBill); + + } else { + WmsAnsBill wmsAnsBill = fetchBySid(sid); + if (wmsAnsBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsAnsBill, "sid"); + List wmsAnsBillDetailList = dto.getWmsAnsBillDetailList(); + wmsAnsBillDetailList.removeAll(Collections.singleton(null)); + if (!wmsAnsBillDetailList.isEmpty()) { + wmsAnsBillDetailService.saveOrUpdateDetailsList(sid, wmsAnsBillDetailList); + } else { + return rb.setMsg("单据明细不能为空"); + } + baseMapper.updateById(wmsAnsBill); + + } + return rb.success().setData(sid); + } + + public PagerVo listPage(PagerQuery pagerQuery) { + WmsAnsBillDetailQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo listPages(PagerQuery pagerQuery) { + WmsAnsBillQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (query != null) { + //单据编号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wab.billNo", query.getBillNo()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wab.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wab.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + //业务类型 + if (StringUtils.isNotBlank(query.getBusTypeKey())) { + qw.eq("wab.busTypeKey", query.getBusTypeKey()); + } + //供应商 + if (StringUtils.isNotBlank(query.getSupplierName())) { + qw.like("wab.supplierName", query.getSupplierName()); + } + //预期到货日期开始时间-预期到货日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getDeliveryDateStart()), "date_format (wab.deliveryDate,'%Y-%m-%d') >= date_format('" + query.getDeliveryDateStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getDeliveryDateEnd()), "date_format (wab.deliveryDate,'%Y-%m-%d') <= date_format('" + query.getDeliveryDateEnd() + "','%Y-%m-%d')" + ); + //单据状态 + if (StringUtils.isNotBlank(query.getBillState())) { + qw.like("wab.billState", query.getBillState()); + } + + //审核状态 + if (StringUtils.isNotBlank(query.getReviewStatus())) { + qw.like("wab.reviewStatus", query.getReviewStatus()); + } + //外部编号 + if (StringUtils.isNotBlank(query.getSourceBillNo())) { + qw.like("wab.sourceBillNo", query.getSourceBillNo()); + } + } + + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.listPages(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean details(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsAnsDetailsVo wmsAnsDetailsVo = baseMapper.details(sid); + if (wmsAnsDetailsVo != null) { + List list = wmsAnsBillDetailService.selectByBillSid(sid); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + wmsAnsDetailsVo.setList(list); + } + } else { + return rb.setMsg("该单据不存在"); + } + return rb.success().setData(wmsAnsDetailsVo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillVo.java new file mode 100644 index 0000000000..0448ba00cf --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsBillVo.java @@ -0,0 +1,53 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Data +public class WmsAnsBillVo { + + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("外部单号(业务单据编号)") + private String sourceBillNo; + @ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)") + private String busTypeValue; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("联系人") + private String contact; + @ApiModelProperty("联系人手机") + private String mobile; + @ApiModelProperty("预计到货日期") + private String deliveryDate; + + //单据状态 + private String billState; + + @ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)") + private String reviewStatus; + @ApiModelProperty("拒绝原因") + private String refuseReason; + +/* @ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)") + private String billStateValue; + @ApiModelProperty("货主") + private String goodsOwner;*/ + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsDetailsVo.java new file mode 100644 index 0000000000..5908055cec --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbill/WmsAnsDetailsVo.java @@ -0,0 +1,59 @@ +package com.yxt.wms.biz.inventory.wmsansbill; + +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsListDetailsVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Data +public class WmsAnsDetailsVo { + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("外部单号(业务单据编号)") + private String sourceBillNo; + @ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("预计到货日期") + private String deliveryDate; + + //单据状态 + private String billState; + + @ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)") + private String reviewStatus; + + /* @ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)") + private Integer billState;*/ + + @ApiModelProperty("拒绝原因") + private String refuseReason; + /* @ApiModelProperty("联系人") + private String contact; + @ApiModelProperty("联系人手机") + private String mobile; + + @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner;*/ + + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetail.java new file mode 100644 index 0000000000..9941897dc3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetail.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Data +public class WmsAnsBillDetail extends BaseEntity { + + @ApiModelProperty("单据sid") + private String billSid; + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("预约数量(采购订单数量)") + private String orderCount; + @ApiModelProperty("待入库数量-根据收货单计算") + private Integer waitInCount; + @ApiModelProperty("实际入库数量-根据收货单计算") + private Integer actualInCount; + @ApiModelProperty("税额") + private BigDecimal taxAmount; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("金额") + private BigDecimal amount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailDto.java new file mode 100644 index 0000000000..1c9b56870f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailDto.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Data +public class WmsAnsBillDetailDto { + + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("预约数量(采购订单数量)") + private String orderCount; + @ApiModelProperty("税额") + private String taxAmount; + @ApiModelProperty("含税价") + private String taxPrice; + @ApiModelProperty("金额") + private String amount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.java new file mode 100644 index 0000000000..fc76c4804d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Mapper +public interface WmsAnsBillDetailMapper extends BaseMapper { + int deleteDetails(String sid); + + List selectByBillSid(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.xml new file mode 100644 index 0000000000..30609e67d5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailMapper.xml @@ -0,0 +1,25 @@ + + + + + delete + from wms_ans_bill_detail + where billSid = #{sid} + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailQuery.java new file mode 100644 index 0000000000..ca39b64a99 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsAnsBillDetailQuery implements Query { +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailService.java new file mode 100644 index 0000000000..47c79de71d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailService.java @@ -0,0 +1,29 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.service.MybatisBaseService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/9 + **/ +@Service +public class WmsAnsBillDetailService extends MybatisBaseService { + public void saveOrUpdateDetailsList(String sid, List wmsAnsBillDetailList) { + baseMapper.deleteDetails(sid); + wmsAnsBillDetailList.forEach(v->{ + WmsAnsBillDetail wmsAnsBillDetail = new WmsAnsBillDetail(); + BeanUtil.copyProperties(v,wmsAnsBillDetail,"sid"); + wmsAnsBillDetail.setBillSid(sid); + baseMapper.insert(wmsAnsBillDetail); + }); + } + + public List selectByBillSid(String sid) { + return baseMapper.selectByBillSid(sid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailVo.java new file mode 100644 index 0000000000..e82d86abd0 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsBillDetailVo.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsAnsBillDetailVo { + + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsListDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsListDetailsVo.java new file mode 100644 index 0000000000..2476e8aa09 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsansbilldetail/WmsAnsListDetailsVo.java @@ -0,0 +1,58 @@ +package com.yxt.wms.biz.inventory.wmsansbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Data +public class WmsAnsListDetailsVo { + @ApiModelProperty("商品名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + + //仓库 + private String warehouseName; + //库位 + private String warehouseRack; + + //预约数量 + @ApiModelProperty("预约数量(采购订单数量)") + private String orderCount; + //待收货数量 + @ApiModelProperty("待入库数量-根据收货单计算") + private Integer waitInCount; + //已收货数量 + @ApiModelProperty("实际入库数量-根据收货单计算") + private Integer actualInCount; + //入库价 + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("税额") + private String taxAmount; + @ApiModelProperty("含税价") + private String taxPrice; + //采购金额 + @ApiModelProperty("金额") + private String amount; + + + /* @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid;*/ + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBill.java new file mode 100644 index 0000000000..6585d24f06 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBill.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBill extends BaseEntity { + + @ApiModelProperty("出库单sid") + private String sourceBillSid; + @ApiModelProperty("来源单号(出库单)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据状态") + private Integer billState; + @ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") + private Integer isHandUp; + @ApiModelProperty("优先级") + private Integer priority; + @ApiModelProperty("实际发货时间") + private Date actualDeliveTime; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillDto.java new file mode 100644 index 0000000000..4d2b7fd658 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillDto.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.yxt.wms.biz.inventory.wmsdistributebilldetail.WmsDistributeBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillDto { + + @ApiModelProperty("出库单sid") + private String sourceBillSid; + @ApiModelProperty("来源单号(出库单)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("制单人sid") + private String createBySid; + private String createTime; + @ApiModelProperty("单据状态") + private String billState; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + + private List detailList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillInitVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillInitVo.java new file mode 100644 index 0000000000..a051d7b62f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillInitVo.java @@ -0,0 +1,42 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.yxt.wms.biz.inventory.wmsdistributebilldetail.WmsDistributeBillDetailVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillInitVo { + + //单据编号 + private String billNo; + + //制单人 + @ApiModelProperty("制单人姓名") + private String createByName; + + //单据日期 + @ApiModelProperty("单据日期") + private String createTime; + + //来源单号 + @ApiModelProperty("来源单号(出库单)") + private String sourceBillNo; + + //单据状态 + @ApiModelProperty("单据状态") + private String billState; + + //备注 + private String remarks; + + private List detailsList = new ArrayList<>(); + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.java new file mode 100644 index 0000000000..a86bce51d3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Mapper +public interface WmsDistributeBillMapper extends BaseMapper { +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.xml new file mode 100644 index 0000000000..a58327a508 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillMapper.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillQuery.java new file mode 100644 index 0000000000..66674950bc --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillQuery.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillQuery implements Query { + + //单据编号 + @ApiModelProperty("单据编号") + private String billNo; + + //单据日期开始时间 + private String createTimeStart; + + //单据日期结束时间 + private String createTimeEnd; + + //业务类型 + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + + //单据状态 + @ApiModelProperty("单据状态") + private String billState; + + @ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") + private String isHandUp; + @ApiModelProperty("优先级") + private String priority; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillService.java new file mode 100644 index 0000000000..532adf4747 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillService.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Service +public class WmsDistributeBillService extends MybatisBaseService { + public PagerVo listPage(PagerQuery pagerQuery) { + return null; + } + + public ResultBean getInit(String sid) { + return null; + } + + public ResultBean details(String sid) { + return null; + } + + public ResultBean saveOrUpdateBill(WmsDistributeBillDto dto) { + return null; + } + + public ResultBean confirm(WmsDistributeBillDto dto) { + return null; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillVo.java new file mode 100644 index 0000000000..e27593eb44 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebill/WmsDistributeBillVo.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.wmsdistributebill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillVo { + + private String sid; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("来源单号(出库单)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + + @ApiModelProperty("单据状态") + private String billState; + @ApiModelProperty("优先级") + private String priority; + @ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") + private String isHandUp; + + @ApiModelProperty("实际发货时间") + private String actualDeliveTime; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetail.java new file mode 100644 index 0000000000..f6cb4c9281 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetail.java @@ -0,0 +1,50 @@ +package com.yxt.wms.biz.inventory.wmsdistributebilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillDetail extends BaseEntity { + @ApiModelProperty("出库单明细sid") + private String outBillDetailSid; + @ApiModelProperty("单据sid") + private String billSid; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("配货数量") + private BigDecimal distributeCount; + @ApiModelProperty("发货数量") + private BigDecimal deliveryCount; + @ApiModelProperty("状态(配货中/已完成)") + private Integer billState; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailDto.java new file mode 100644 index 0000000000..10fc9423a4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailDto.java @@ -0,0 +1,44 @@ +package com.yxt.wms.biz.inventory.wmsdistributebilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillDetailDto { + + @ApiModelProperty("出库单明细sid") + private String outBillDetailSid; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("配货数量") + private String distributeCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailVo.java new file mode 100644 index 0000000000..fd9c7bc717 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsdistributebilldetail/WmsDistributeBillDetailVo.java @@ -0,0 +1,44 @@ +package com.yxt.wms.biz.inventory.wmsdistributebilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsDistributeBillDetailVo { + + @ApiModelProperty("出库单明细sid") + private String outBillDetailSid; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("配货数量") + private String distributeCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsGoodsInventoryVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsGoodsInventoryVo.java new file mode 100644 index 0000000000..8e57a679a1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsGoodsInventoryVo.java @@ -0,0 +1,20 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/25 16:54 + */ +@Data +public class WmsGoodsInventoryVo implements Vo { + + private String goodsSkuOwnSpec;//型号 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackName; //货位 + private String count;//库存数量 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java new file mode 100644 index 0000000000..522fc03084 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java @@ -0,0 +1,60 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventory extends BaseEntity { + + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)") + private String goodsID; + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("现有量") + private BigDecimal count; + @ApiModelProperty("分配量(锁定数量,出库申请通过,但未实际出库)") + private BigDecimal allocateCount; + @ApiModelProperty("拣货量") + private BigDecimal pickCount; + @ApiModelProperty("冻结量") + private BigDecimal freezeCount; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("首次入库日期-计算库龄的依据") + private Date firstInDate; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeExportVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeExportVo.java new file mode 100644 index 0000000000..d91750d98a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeExportVo.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 14:04 + */ +@Data +public class WmsInventoryAgeExportVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName;//商品名称 + @ExportEntityMap(CnName = "商品Sku名称", EnName = "goodsSkuTitle") + private String goodsSkuTitle;//商品Sku名称 + @ExportEntityMap(CnName = "零件号", EnName = "goodsSkuCode") + private String goodsSkuCode;//零件号 + @ExportEntityMap(CnName = "规格型号", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; //规格型号 + @ExportEntityMap(CnName = "计量单位", EnName = "unit") + private String unit;//计量单位 + @ExportEntityMap(CnName = "仓库名称", EnName = "warehouseName") + private String warehouseName;//仓库名称 + @ExportEntityMap(CnName = "库区名称", EnName = "warehouseArea") + private String warehouseArea;//库区名称 + @ExportEntityMap(CnName = "货架名称", EnName = "warehouseRackName") + private String warehouseRackName;//货架名称 + @ExportEntityMap(CnName = "库存数量", EnName = "count") + private String count;//库存数量 + @ExportEntityMap(CnName = "库龄", EnName = "age") + private String age;//库龄 + @ExportEntityMap(CnName = "入库日期", EnName = "firstInDate") + private String firstInDate; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeQuery.java new file mode 100644 index 0000000000..53731c24db --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeQuery.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/25 16:54 + */ +@Data +public class WmsInventoryAgeQuery implements Query { + private String startDate; + private String endDate; + private String warehouseName;//仓库名称 +// @ApiModelProperty("商品类别名称") +// private String goodsTypeName; +// private String busTypeValue;//业务类型value(采购入库、维修出入库、销售出入库等) + private String goodsSpuName;//商品名称 + private String goodsSkuCode;//零件号 + private String ageStart;//库龄开始 + private String ageEnd;//库龄开始 + // private String queryName; //单号,来源单号,供应商 + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeVo.java new file mode 100644 index 0000000000..a69aee0d53 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAgeVo.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/25 16:54 + */ +@Data +public class WmsInventoryAgeVo implements Vo { + + private String sid; + private String goodsSpuName;//商品名称 + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//零件号 + private String goodsSkuOwnSpec; //规格型号 + private String unit;//计量单位 + private String warehouseName;//仓库名称 + private String warehouseArea;//库区名称 + private String warehouseRackName;//货架名称 + private String count;//库存数量 + private String age;//库龄 + //来源单号 + @ApiModelProperty("首次入库日期-计算库龄的依据") + private String firstInDate; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java new file mode 100644 index 0000000000..92e3835cdd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java @@ -0,0 +1,39 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryAlloSelectList { + + //sid + private String sid; + //商品名称 + private String goodsSpuName; + //零件号 + private String goodsSkuCode; + //规格 + private String goodsSkuOwnSpec; + //车型 + private String carModel; + //商品单位 + private String unit; + //仓库sid + private String warehouseSid; + //仓库名称 + private String warehouseName; + //库位sid + private String warehouseRackSid; + //库位编码 + private String warehouseRackCode; + //库位名称 + private String areaName; + //含税价 + private String taxPrice; + //库存数量 + private String count; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java new file mode 100644 index 0000000000..74306e8e56 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryAlloSelectQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsName; + //商品类别sid + private String goodsTypeSid; + //商品拼音 + private String goodsPY; + //品牌sid + private String brandSid; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //其他查询条件 + private String otherQuery; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListQuery.java new file mode 100644 index 0000000000..2c47fecf4b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListQuery.java @@ -0,0 +1,21 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/19 + **/ +@Data +public class WmsInventoryBillListQuery implements Query { + //创建时间开始 + private String createTimeStart; + //创建时间结束 + private String createTimeEnd; + //业务类型 + private String busTypeKey; + + private String sid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListVo.java new file mode 100644 index 0000000000..bb2f5ecc16 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillListVo.java @@ -0,0 +1,53 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/19 + **/ +@Data +public class WmsInventoryBillListVo { + + //商品名称 + private String goodsSpuName; + //商品标题 + private String goodsSkuTitle; + //商品编码 + private String goodsSkuCode; + //规格型号 + private String goodsSkuOwnSpec; + //计量单位 + private String unit; + //仓库名称 + private String warehouseName; + + //库区名称 + private String warehouseArea; + //货架名称 + private String warehouseRackName; + //业务类型 + private String busTypeValue; + //单位成本 + private String cost; + //销售价1 + private String price1; + //销售价2: + private String price2; + //科目 + private String subject; + //制单人 + private String createByName; + //创建时间 + private String createTime; + + //单号 + private String billNo; + //来源单号 + private String sourceBillNo; + //供应商 + private String billObjName; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryDto.java new file mode 100644 index 0000000000..d8acfbf81f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryDto.java @@ -0,0 +1,48 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + + private String goodSpuSid; + private String goodsSkuSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectList.java new file mode 100644 index 0000000000..fe2e17e2af --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectList.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryHandleSelectList { + + //商品ID + private String goodsID; + //商品名称 + private String goodsSpuName; + //图号 + private String goodsSkuCode; + //供应商 + private String supplierName; + //规格 + private String goodsSkuOwnSpec; + //商品单位 + private String unit; + //仓库sid + private String warehouseSid; + //仓库名称 + private String warehouseName; + //库位sid + private String warehouseRackSid; + //库位编码 + private String warehouseRackCode; + //库位名称 + private String areaName; + //库存数量 + private String count; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectQuery.java new file mode 100644 index 0000000000..1e77f89674 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryHandleSelectQuery.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryHandleSelectQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsName; + //图号 + private String goodsSkuCode; + //仓库 + private String warehouseName; + //库位 + private String areaName; + //供应商 + private String supplierName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInitVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInitVo.java new file mode 100644 index 0000000000..f0b2895baa --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInitVo.java @@ -0,0 +1,49 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/18 + **/ +@Data +public class WmsInventoryInitVo { + + private String sid; + + //仓库 + private String warehouseName; + //供应商 + private String billObjName; + //最近采购时间 + //最近销售时间 + //数量 + private String count; + //进价 + //税额 + //含税价 + //销售价格1 + private String price1; + //销售价格2 + private String price2; + //销售价格3 + private String price3; + //销售价格4 + private String price4; + //销售价格5 + private String price5; + //销售底价 + private String minimumPrice; + //货位 + private String warehouseArea; + //折扣标志 + private int isShowDiscount; + //三包价格 + private String freePrice; + //首保价格 + private String firstMaintainPrice; + //排序 + private int sortNo; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectList.java new file mode 100644 index 0000000000..7550255082 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectList.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryInvenSelectList { + + //sid + private String sid; + //商品名称 + private String goodsSpuName; + //商品编码 + private String goodsSkuCode; + //型号 + private String goodsSkuOwnSpec; + //商品单位 + private String unit; + //仓库sid + private String warehouseSid; + //仓库名称 + private String warehouseName; + //库位sid + private String warehouseRackSid; + //库位编码 + private String warehouseRackCode; + //库位名称 + private String areaName; + //账面数量 + private String count; + //销售单价 + private String salesPrice; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectQuery.java new file mode 100644 index 0000000000..973c77b21e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryInvenSelectQuery.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryInvenSelectQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsName; + //商品类别sid + private String goodsTypeSid; + //商品拼音 + private String goodsPY; + //品牌sid + private String brandSid; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //其他查询条件 + private String otherQuery; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.java new file mode 100644 index 0000000000..5a852dc6c7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.java @@ -0,0 +1,53 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + WmsInventoryVo initialization(@Param("sid") String sid); + + int updatePrice1(@Param("price") String price, @Param("list") List stringList); + + int updatePrice2(@Param("price") String price, @Param("list") List stringList); + + int updatePrice3(@Param("price") String price, @Param("list") List stringList); + + int updatePrice4(@Param("price") String price, @Param("list") List stringList); + + int updatePrice5(@Param("price") String price, @Param("list") List stringList); + + IPage getBillList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw, @Param("sid") String sid); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); + + IPage listPageSales(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage getPackageGoodsVo(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); + + IPage inventoryAgeList(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); + + List ageExportExcel(@Param(Constants.WRAPPER) QueryWrapper qw); + + WmsGoodsInventoryVo selectInvenBySkuSid(String skuSid); + + IPage invenGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage alloGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage returnGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage handleGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml new file mode 100644 index 0000000000..1ad780b69f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + update wms_inventory + set price1 = #{price} where sid in + + #{item} + + + + + update wms_inventory + set price2 = #{price} where sid in + + #{item} + + + + + update wms_inventory + set price3 = #{price} where sid in + + #{item} + + + + + update wms_inventory + set price4 = #{price} where sid in + + #{item} + + + + + update wms_inventory + set price5 = #{price} where sid in + + #{item} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageQuery.java new file mode 100644 index 0000000000..e8d724c2cb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageQuery.java @@ -0,0 +1,28 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/12 15:33 + */ +@Data +public class WmsInventoryPackageQuery implements Query { + private String useOrgSid; + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("零件号") + private String goodsCode; // 商品编码(图号) + @ApiModelProperty("库存") + private String kuCun; + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("货位") + private String warehouseArea; + @ApiModelProperty("商品分类") + private String goodsTypeName; + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageVo.java new file mode 100644 index 0000000000..9ad3fc2ca5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryPackageVo.java @@ -0,0 +1,44 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/12 10:00 + */ +@Data +public class WmsInventoryPackageVo { + + @ApiModelProperty("商品sid") + private String goodsSid; // 商品sid + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("商品编码(图号)") + private String goodsCode; // 商品编码(图号) + @ApiModelProperty("车型sid") + private String goodsModelSid; // 车型sid + @ApiModelProperty("车型") + private String goodsModel; // 车型 + @ApiModelProperty("单位") + private String unit; // 单位 + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("销售价") + private String price; // 销售价 + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("货位") + private String warehouseArea; + @ApiModelProperty("备注") + private String remarks; // 备注 + @ApiModelProperty("三包价") + private String freePrice; // 三包价 + @ApiModelProperty("商品分类") + private String goodsTypeName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryQuery.java new file mode 100644 index 0000000000..d52e5b5702 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryQuery.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryQuery implements Query { + @ApiModelProperty("goodsID") + private String goodsID; + + @ApiModelProperty("商品名称") + private String goodsSpuName; + + @ApiModelProperty("商品编码") + private String goodsSkuCode; + + @ApiModelProperty("仓库") + private String warehouseName; + + @ApiModelProperty("库位编码") + private String warehouseRackCode; + + @ApiModelProperty("批次号") + private String batchNumber; + + //供应商 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectList.java new file mode 100644 index 0000000000..759fee25ab --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectList.java @@ -0,0 +1,21 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryReturnSelectList { + + //商品名称 + private String goodsName; + //零件号 + private String goodsSkuCode; + //规格 + private String goodsSkuOwnSpec; + //单位 + private String unit; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectQuery.java new file mode 100644 index 0000000000..aac1a6277f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryReturnSelectQuery.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class WmsInventoryReturnSelectQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsName; + //商品类别sid + private String goodsTypeSid; + //商品拼音 + private String goodsPY; + //品牌sid + private String brandSid; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //其他查询条件 + private String otherQuery; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesQuery.java new file mode 100644 index 0000000000..1216c1334e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesQuery.java @@ -0,0 +1,16 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class WmsInventorySalesQuery implements Query { + + private String queryName; //名称 + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesVo.java new file mode 100644 index 0000000000..b30d60630c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySalesVo.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class WmsInventorySalesVo implements Vo { + + private String inventorySid; + private String goodsID; + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String unit;//计量单位 + private String currentCount;//库存数量 + private String warehouseSid;//仓库sid + private String warehouse;//仓库名称 + private String price;//销售价 + +} + + diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySaveDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySaveDto.java new file mode 100644 index 0000000000..eb3123cb10 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventorySaveDto.java @@ -0,0 +1,57 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/19 + **/ +@Data +public class WmsInventorySaveDto { + + private String sid; + @ApiModelProperty("创建者sid") + private String createBySid; + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; + @ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)") + private String goodsID; + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("现有量") + private String count; + @ApiModelProperty("分配量") + private String allocateCount; + @ApiModelProperty("拣货量") + private String pickCount; + @ApiModelProperty("冻结量") + private String freezeCount; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("首次入库日期") + private String firstInDate; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java new file mode 100644 index 0000000000..a2083b5a31 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java @@ -0,0 +1,472 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventorybill.WmsInventoryBill; +import com.yxt.wms.biz.inventory.wmsinventorybill.WmsInventoryBillService; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.*; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryService extends MybatisBaseService { + + @Autowired + private WmsInventoryBillService wmsInventoryBillService; + @Resource + private BaseGoodsSkuFeign baseGoodsSkuFeign; + + public PagerVo listPage(PagerQuery pq) { + WmsInventoryQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("a.goodsID", query.getGoodsID()); + } + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("a.warehouseName", query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("a.goodsSkuCode", query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("a.goodsSpuName", query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getBatchNumber())) { + qw.like("a.batchNumber", query.getBatchNumber()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + /** + * 入库 + * + * @param dto + * @return + */ + public ResultBean warehousing(WmsInventoryDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + if (null == wmsInventory) { + WmsInventory wms = new WmsInventory(); + BeanUtil.copyProperties(dto, wms, "sid", "id"); + wms.setFirstInDate(new Date()); + baseMapper.insert(wms); + return rb.success().setData(wms); + } else { + wmsInventory.setCount(new BigDecimal(Double.valueOf(dto.getCount()) + Double.valueOf(wmsInventory.getCount().toString()))); + baseMapper.updateById(wmsInventory); + } + return rb.success().setData(wmsInventory); + } + + /** + * 出库 + * + * @param dto + * @return + */ + public ResultBean outWarehousing(WmsInventoryDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + double exisInventory = Double.valueOf(wmsInventory.getCount().toString()); + double out = Double.valueOf(dto.getCount()); + if (null == wmsInventory) { + return rb.setMsg("此仓库没有相应的商品库存"); + } + if (exisInventory < -out) { + return rb.setMsg("库存不足"); + } + wmsInventory.setCount(new BigDecimal(exisInventory + out)); + baseMapper.updateById(wmsInventory); + return rb.success().setData(wmsInventory); + } + + public ResultBean saveOrUpdate(WmsInventoryDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventory wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventory wmsWarehouseRack = new WmsInventory(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean updateWmsInventory(WmsInventoryUpdateDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + WmsInventory wmsInventory = fetchBySid(sid); + if (wmsInventory == null) { + return rb.setMsg("该库存信息不存在"); + } + BeanUtil.copyProperties(dto, wmsInventory, "sid"); + baseMapper.updateById(wmsInventory); + return rb.success(); + } + + public ResultBean delAllBySids(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + List sidss = Arrays.asList(sids); + delBySids(sids); + return rb.success().setMsg("删除成功"); + } + + /* public ResultBean init(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory wmsInventory = fetchBySid(sid); + if (wmsInventory == null) { + return rb.setData(new WmsInventoryInitVo()).setMsg("该库存信息不存在"); + } + WmsInventoryInitVo wmsInventoryInitVo = new WmsInventoryInitVo(); + BeanUtil.copyProperties(wmsInventory, wmsInventoryInitVo); + WmsInventoryBill wmsInventoryBill = wmsInventoryBillService.fetchBySid(wmsInventory.getBillSid()); + if (wmsInventoryBill != null) { + wmsInventoryInitVo.setBillObjName(wmsInventoryBill.getBillObjName()); + } + return rb.success().setData(wmsInventoryInitVo); + }*/ + + /* public ResultBean updatePrice(WmsInventoryUpdatePrice wmsInventoryUpdatePrice) { + ResultBean rb = ResultBean.fireFail(); + List stringList = wmsInventoryUpdatePrice.getSidsList(); + stringList.removeAll(Collections.singleton(null)); + String price = wmsInventoryUpdatePrice.getPrice(); + if (!stringList.isEmpty()) { + int type = wmsInventoryUpdatePrice.getType(); + switch (type) { + case 1: + baseMapper.updatePrice1(price, stringList); + break; + case 2: + baseMapper.updatePrice2(price, stringList); + break; + case 3: + baseMapper.updatePrice3(price, stringList); + break; + case 4: + baseMapper.updatePrice4(price, stringList); + break; + case 5: + baseMapper.updatePrice5(price, stringList); + break; + default: + break; + } + } + return rb.success(); + } +*/ + /* public PagerVo getBillList(PagerQuery pagerQuery) { + WmsInventoryBillListQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (b.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (b.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + if (StringUtils.isNotBlank(query.getBusTypeKey())) { + qw.eq("b.busTypeKey", query.getBusTypeKey()); + } + } + + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.getBillList(page, qw, query.getSid()); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +*/ + public List listExcel(WmsInventoryQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("goodsSpuName", query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("warehouseName", query.getWarehouseName()); + } + } + List list = baseMapper.listExcel(qw); + list.removeAll(Collections.singleton(null)); + return list; + } + + public ResultBean updateInventoryCount(WmsUpdateCountQuery query) { + ResultBean rb = ResultBean.fireFail(); + String sid = query.getSid(); + WmsInventory inventory = fetchBySid(sid); + if (null != inventory) { + if (null != inventory.getCount()) { + BigDecimal inventoryCount = inventory.getCount(); + BigDecimal count = query.getCount(); + if (query.getAddOrReduce() == 0) { + //增加库存 + inventory.setCount(inventoryCount.add(count)); + } else if (query.getAddOrReduce() == 1) { + //减少库存 + inventory.setCount(inventoryCount.subtract(count)); + } + baseMapper.updateById(inventory); + } + } + return rb.success(); + } + + public PagerVo listPageSales(PagerQuery pq) { + WmsInventorySalesQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getQueryName())) { + qw.like("i.goodsSpuName", query.getQueryName()); + } + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.like("i.useOrgSid", query.getUseOrgSid()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPageSales(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean> getPackageGoodsVo(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryPackageQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.and(wrapper -> wrapper.like("v.goodsSpuName", query.getName()) + .or().like("v.goodsSkuCode", query.getName()) + ); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsName())) { + qw.like("v.goodsSpuName", query.getGoodsName()); + } + //零件号 + if (StringUtils.isNotBlank(query.getGoodsCode())) { + qw.like("v.goodsSkuCode", query.getGoodsCode()); + } + //库存 + if (StringUtils.isNotBlank(query.getKuCun())) { + if (query.getKuCun().equals("有库存")) { + qw.apply("v.count > 0"); + } else if (query.getKuCun().equals("无库存")) { + qw.apply("v.count <= 0"); + } + } + //仓库名称 + if (StringUtils.isNotBlank(query.getWarehouse())) { + qw.like("v.warehouseName", query.getWarehouse()); + } + //货位 + if (StringUtils.isNotBlank(query.getWarehouseArea())) { + qw.like("v.warehouseArea", query.getWarehouseArea()); + } + qw.eq("1", "1"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.getPackageGoodsVo(page, qw); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); + if (!records.isEmpty()) { + for (WmsInventoryPackageVo record : records) { + BaseGoodsSkuDetailsVo skuDetailsVo = baseGoodsSkuFeign.getDetails(record.getGoodsSid()).getData(); + if (null != skuDetailsVo) { + if (StringUtils.isNotBlank(skuDetailsVo.getGoodsTypeName())) { + record.setGoodsTypeName(skuDetailsVo.getGoodsTypeName()); + } + } + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public PagerVo inventoryAgeList(PagerQuery pq) { + WmsInventoryAgeQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("w.useOrgSid", query.getUseOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("w.goodsSpuName", query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("w.warehouseName", query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("w.goodsSkuCode", query.getGoodsSkuCode()); + } + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "date_format (w.firstInDate,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getEndDate()), "date_format (w.firstInDate,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.apply(StringUtils.isNotBlank(query.getAgeStart()), "w.age >=" + query.getAgeStart()). + apply(StringUtils.isNotBlank(query.getAgeEnd()), "w.age <=" + query.getAgeStart() + ); + qw.eq("1", "1"); + qw.orderByDesc("w.firstInDate"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.inventoryAgeList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public List ageExportExcel(WmsInventoryAgeQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("w.useOrgSid", query.getUseOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("w.goodsSpuName", query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("w.warehouseName", query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("w.goodsSkuCode", query.getGoodsSkuCode()); + } + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "date_format (w.firstInDate,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getEndDate()), "date_format (w.firstInDate,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.apply(StringUtils.isNotBlank(query.getAgeStart()), "w.age >=" + query.getAgeStart()). + apply(StringUtils.isNotBlank(query.getAgeEnd()), "w.age <=" + query.getAgeStart() + ); + qw.eq("1", "1"); + qw.orderByDesc("w.firstInDate"); + List list = baseMapper.ageExportExcel(qw); + return list; + } + + public WmsGoodsInventoryVo selectInvenBySkuSid(String skuSid) { + return baseMapper.selectInvenBySkuSid(skuSid); + } + + public ResultBean> invenGoodsListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryInvenSelectQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.invenGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public ResultBean> alloGoodsListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAlloSelectQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.alloGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public ResultBean fetchEntityBySid(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventory inventory = fetchBySid(sid); + return rb.success().setData(inventory); + } + + public ResultBean saveWmsInventory(WmsInventorySaveDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsInventory wmsInventory = new WmsInventory(); + BeanUtil.copyProperties(dto, wmsInventory, "sid"); + sid = wmsInventory.getSid(); + baseMapper.insert(wmsInventory); + } else { + WmsInventory wmsInventory = fetchBySid(sid); + if (wmsInventory == null) { + return rb.setMsg("该商品库存不存在"); + } + BeanUtil.copyProperties(dto, wmsInventory, "sid"); + baseMapper.updateById(wmsInventory); + } + return rb.success().setData(sid); + } + + public ResultBean> returnGoodsListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryReturnSelectQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.returnGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public ResultBean> handleGoodsListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryHandleSelectQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getGoodsName())) { + qw.like("wi.goodsSpuName", query.getGoodsName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wi.goodsSkuCode", query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wi.warehouseName", query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getAreaName())) { + qw.like("wwa.areaName", query.getAreaName()); + } + if (StringUtils.isNotBlank(query.getSupplierName())) { + qw.like("wb.supplierName", query.getSupplierName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.handleGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdateDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdateDto.java new file mode 100644 index 0000000000..e371ed42e8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdateDto.java @@ -0,0 +1,29 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/18 + **/ +@Data +public class WmsInventoryUpdateDto { + private String sid; + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + + private String minimumPrice;//销售底价 + private String warehouseAreaSid;//库区sid + private String warehouseArea;//库区名称 + + private int isShowDiscount;//是否显示折扣标志,1是。0否 + + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + + private int sortNo;//排序 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdatePrice.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdatePrice.java new file mode 100644 index 0000000000..20bcc2f5b1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryUpdatePrice.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/19 + **/ +@Data +public class WmsInventoryUpdatePrice { + + @ApiModelProperty("销售价1/2/3/4/5") + private int type; + + private List sidsList = new ArrayList<>(); + + private String price; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVo.java new file mode 100644 index 0000000000..8dda47d28d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVo.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryVo implements Vo { + + private String sid; + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位名称") + private String warehouseRackCode; + @ApiModelProperty("现有库存") + private String count; + @ApiModelProperty("分配库存") + private String allocateCount; + @ApiModelProperty("可用库存") + private String useCount; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("首次入库日期") + private String firstInDate; + @ApiModelProperty("库龄") + private String dateAge; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVoExcelVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVoExcelVo.java new file mode 100644 index 0000000000..5d651ac601 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryVoExcelVo.java @@ -0,0 +1,54 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import com.yxt.common.core.utils.ExportEntityMap; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/19 + **/ +@Data +public class WmsInventoryVoExcelVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName; + @ExportEntityMap(CnName = "商品编码(图号)", EnName = "goodsSkuCode") + private String goodsSkuCode; + @ExportEntityMap(CnName = "规格型号", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec;//规格型号 + @ExportEntityMap(CnName = "销售价格1", EnName = "price1") + private String price1;//销售价格1 + @ExportEntityMap(CnName = "销售价格2", EnName = "price2") + private String price2;//销售价格2 + @ExportEntityMap(CnName = "销售价格3", EnName = "price3") + private String price3;//销售价格3 + @ExportEntityMap(CnName = "销售价格4", EnName = "price4") + private String price4;//销售价格4 + @ExportEntityMap(CnName = "销售价格5", EnName = "price5") + private String price5;//销售价格5 + @ExportEntityMap(CnName = "计量单位", EnName = "unit") + private String unit;//计量单位 + @ExportEntityMap(CnName = "库存数量", EnName = "count") + private String count;//库存数量 + @ExportEntityMap(CnName = "销售底价", EnName = "minimumPrice") + private String minimumPrice;//销售底价 + @ExportEntityMap(CnName = "三包价格", EnName = "freePrice") + private String freePrice;//三包价格 + @ExportEntityMap(CnName = "首保价格", EnName = "firstMaintainPrice") + private String firstMaintainPrice;//首保价格 + @ExportEntityMap(CnName = "仓库名称", EnName = "warehouseName") + private String warehouseName;//仓库名称 + @ExportEntityMap(CnName = "库区名称", EnName = "warehouseArea") + private String warehouseArea;//库区名称 + @ExportEntityMap(CnName = "货架名称", EnName = "warehouseRackName") + private String warehouseRackName;//warehouseRackName + @ExportEntityMap(CnName = "首次入库日期", EnName = "firstInDate") + private String firstInDate;//首次入库日期-计算库龄的依据 + @ExportEntityMap(CnName = "锁定数量", EnName = "lockCount") + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + @ExportEntityMap(CnName = "排序", EnName = "sortNo") + private String sortNo; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsUpdateCountQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsUpdateCountQuery.java new file mode 100644 index 0000000000..847929c2d8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsUpdateCountQuery.java @@ -0,0 +1,17 @@ +package com.yxt.wms.biz.inventory.wmsinventory; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/20 9:14 + */ +@Data +public class WmsUpdateCountQuery { + private String sid; + private BigDecimal count; + private Integer addOrReduce; // 0增加 1减少 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBill.java new file mode 100644 index 0000000000..9a8f9df01c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBill.java @@ -0,0 +1,31 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryAllocateBill extends BaseEntity { + + private String billNo;//单据编号 + private String createDate;//制单日期 + private String createUserSid;//制单人sid + private String createByName;//制单人姓名 + private String outOrgSid;//调出分公司sid + private String inOrgSid;//调入分公司sid + private String count;//调拨数量 + private String amount;//调拨金额 + private String confirmSid;//确认人sid + private String confirmName;//确认人姓名 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date finishTime;//完成时间 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java new file mode 100644 index 0000000000..79e81f0694 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据详情", description = "(调拨单)-调出方操作 视图数据详情") +public class WmsInventoryAllocateBillDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("调出分公司sid") + private String outOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; + + /* + * 页面展示 + * */ + @ApiModelProperty("调出分公司名称") + private String outOrgName; + @ApiModelProperty("调入分公司名称") + private String inOrgName; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java new file mode 100644 index 0000000000..40caa49fcf --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java new file mode 100644 index 0000000000..cdf396b410 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java @@ -0,0 +1,59 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDtoNew implements Dto { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("调出分公司sid") + private String outOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; + + /* + * 页面展示 + * */ + @ApiModelProperty("调出分公司名称") + private String outOrgName; + @ApiModelProperty("调入分公司名称") + private String inOrgName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java new file mode 100644 index 0000000000..4fe6bdc32e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java @@ -0,0 +1,20 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryAllocateBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryAllocateBillVo initialization (@Param("sid") String sid); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml new file mode 100644 index 0000000000..19517a608d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java new file mode 100644 index 0000000000..c9e620dcf8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java new file mode 100644 index 0000000000..bf2af60ec3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillQueryNew implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("门店") + private String createOrgSid; + @ApiModelProperty("状态") + private String state; + @ApiModelProperty("单据范围") + private String billFW; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java new file mode 100644 index 0000000000..609e0a00b5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java @@ -0,0 +1,196 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailService; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryAllocateBillService extends MybatisBaseService { + + @Autowired + private WmsInventoryAllocateBillDetailService wmsInventoryAllocateBillDetailService; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryAllocateBillQueryNew query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + /** + * 入库 + * @param dto + * @return + */ +// public ResultBean warehousing(WmsInventoryAllocateBillDto dto) { +// ResultBean rb = ResultBean.fireFail(); +// WmsInventoryAllocateBill wmsInventory=baseMapper.selectOne(new QueryWrapper().eq("goodsSid",dto.getGoodsSid()).eq("warehouseSid",dto.getWarehouseSid())); +// if(null==wmsInventory){ +// WmsInventoryAllocateBill wms=new WmsInventoryAllocateBill(); +// BeanUtil.copyProperties(dto,wms,"sid","id"); +// wms.setFirstInDate(new Date()); +// baseMapper.insert(wms); +// return rb.success().setData(wms); +// }else{ +// wmsInventory.setCount(String.valueOf(Double.valueOf(dto.getCount())+Double.valueOf(wmsInventory.getCount()))); +// baseMapper.updateById(wmsInventory); +// } +// return rb.success().setData(wmsInventory); +// } + + /** + * 出库 + * + * @param dto + * @return + */ + public ResultBean outWarehousing(WmsInventoryAllocateBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + double exisInventory = Double.valueOf(wmsInventory.getCount()); + double out = Double.valueOf(dto.getCount()); + if (null == wmsInventory) { + return rb.setMsg("此仓库没有相应的商品库存"); + } + if (exisInventory < -out) { + return rb.setMsg("库存不足"); + } + wmsInventory.setCount(String.valueOf(exisInventory + out)); + baseMapper.updateById(wmsInventory); + return rb.success().setData(wmsInventory); + } + + public ResultBean saveOrUpdate(WmsInventoryAllocateBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryAllocateBill wmsWarehouseRack = new WmsInventoryAllocateBill(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public WmsInventoryAllocateBillDetailsVoNew fetchDetailsVoBySid(String sid) { + WmsInventoryAllocateBill entity = fetchBySid(sid); + WmsInventoryAllocateBillDetailsVoNew vo = new WmsInventoryAllocateBillDetailsVoNew(); + BeanUtil.copyProperties(entity, vo); + List wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(sid); + vo.setWmsInventoryAllocateBillDetailNewList(wmsInventoryAllocatebillDetailDetailsVoNews); + return vo; + } + + public void delAll(String[] sids) { + delBySids(sids); + for (String sid : sids) { + wmsInventoryAllocateBillDetailService.delByMainSid(sid); + } + } + + public void saveOrUpdateDto(WmsInventoryAllocateBillDtoNew dto) { + String dtoSid = dto.getSid(); + List wmsInventoryAllocateBillDetailNewList = dto.getWmsInventoryAllocateBillDetailNewList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) { + wmsInventoryAllocateBillDetailDtoNew.setBillSid(sid); + wmsInventoryAllocateBillDetailService.saveOrUpdateDto(wmsInventoryAllocateBillDetailDtoNew); + } + return; + } + this.updateByDto(dto); + wmsInventoryAllocateBillDetailService.delByMainSid(dtoSid); + for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) { + wmsInventoryAllocateBillDetailDtoNew.setBillSid(dtoSid); + wmsInventoryAllocateBillDetailService.saveOrUpdateDto(wmsInventoryAllocateBillDetailDtoNew); + } + } + + public String insertByDto(WmsInventoryAllocateBillDtoNew dto) { + WmsInventoryAllocateBill entity = new WmsInventoryAllocateBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(WmsInventoryAllocateBillDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + } + + public void allocation(WmsInventoryAllocateBillDtoNew dto) { + + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java new file mode 100644 index 0000000000..cd190d6ee5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java @@ -0,0 +1,52 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String goodsName; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java new file mode 100644 index 0000000000..e27f3da957 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java @@ -0,0 +1,56 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据对象", description = "(调拨单)-调出方操作 视图数据对象") +public class WmsInventoryAllocateBillVoNew implements Vo { + + private String sid; + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("制单日期") + private String createDate; + @ApiModelProperty("完成标志") + private String state; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("调出门店") + private String outOrg; + @ApiModelProperty("调入门店") + private String inOrg; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String createOrgName; + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java new file mode 100644 index 0000000000..08cf194b52 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java @@ -0,0 +1,41 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryAllocateBillDetail extends BaseEntity { +// private String id; +// private String sid= UUID.randomUUID().toString(); +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +// private Date createTime; +// private String remarks; +// private String isEnable; + private String billSid;//商品ID(唯一编码,入库时生成) + private String inventorySid;//商品sid + private String goodsSid;//入库单sid + private String goodsName;//入库单明细sid + private String goodsCode;//销售价格1 + private String specification;//销售价格2 + private String goodsModel;//销售价格3 + private String unit;//销售价格4 + private String outWarehouseSid;//销售价格5 + private String outWarehouseName;//计量单位 + private String warehouseAreasid;//库存数量 + private String warehouseArea;//销售底价 + private String taxPrice;//三包价格 + private String stockCount;//首保价格 + private String inWarehouseSid;//仓库sid + private String inWarehouseName;//仓库名称 + private String count;//货位 + private String amount;//是否显示折扣标志 + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java new file mode 100644 index 0000000000..35f19d0160 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDetailDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java new file mode 100644 index 0000000000..b5918d5de1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java @@ -0,0 +1,62 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDetailDtoNew implements Dto { + + private String sid; + + @ApiModelProperty("盘点单sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("调入仓库sid") + private String inWarehouseSid; + @ApiModelProperty("调入仓库名称") + private String inWarehouseName; + @ApiModelProperty("调入库位sid") + private String inWarehouseRackSid; + @ApiModelProperty("调入库位编码") + private String inWarehouseRackCode; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; + + /* + * 页面展示 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java new file mode 100644 index 0000000000..b180edf53c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java @@ -0,0 +1,27 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryAllocateBillDetailMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryAllocateBillDetailVo initialization (@Param("sid") String sid); + + @Delete("delete from wms_inventory_allocatebill_detail where billSid = #{billSid}") + void delByMainSid(String billSid); + + List selByMainSid(String billSid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml new file mode 100644 index 0000000000..17f4650950 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java new file mode 100644 index 0000000000..f308001c54 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillDetailQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java new file mode 100644 index 0000000000..0ffb6f792b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java @@ -0,0 +1,157 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryAllocateBillDetailService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + + /** + * 入库 + * @param dto + * @return + */ +// public ResultBean warehousing(WmsInventoryAllocateBillDetailDto dto) { +// ResultBean rb = ResultBean.fireFail(); +// WmsInventoryAllocateBillDetail wmsInventory=baseMapper.selectOne(new QueryWrapper().eq("goodsSid",dto.getGoodsSid()).eq("warehouseSid",dto.getWarehouseSid())); +// if(null==wmsInventory){ +// WmsInventoryAllocateBillDetail wms=new WmsInventoryAllocateBillDetail(); +// BeanUtil.copyProperties(dto,wms,"sid","id"); +// wms.setFirstInDate(new Date()); +// baseMapper.insert(wms); +// return rb.success().setData(wms); +// }else{ +// wmsInventory.setCount(String.valueOf(Double.valueOf(dto.getCount())+Double.valueOf(wmsInventory.getCount()))); +// baseMapper.updateById(wmsInventory); +// } +// return rb.success().setData(wmsInventory); +// } + + /** + * 出库 + * + * @param dto + * @return + */ + public ResultBean outWarehousing(WmsInventoryAllocateBillDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + double exisInventory = Double.valueOf(wmsInventory.getCount()); + double out = Double.valueOf(dto.getCount()); + if (null == wmsInventory) { + return rb.setMsg("此仓库没有相应的商品库存"); + } + if (exisInventory < -out) { + return rb.setMsg("库存不足"); + } + wmsInventory.setCount(String.valueOf(exisInventory + out)); + baseMapper.updateById(wmsInventory); + return rb.success().setData(wmsInventory); + } + + public ResultBean saveOrUpdate(WmsInventoryAllocateBillDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryAllocateBillDetail wmsWarehouseRack = new WmsInventoryAllocateBillDetail(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public void delByMainSid(String billSid) { + baseMapper.delByMainSid(billSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } + + public void saveOrUpdateDto(WmsInventoryAllocateBillDetailDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventoryAllocateBillDetailDtoNew dto) { + WmsInventoryAllocateBillDetail entity = new WmsInventoryAllocateBillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventoryAllocateBillDetailDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java new file mode 100644 index 0000000000..d306c1e7cd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java @@ -0,0 +1,52 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillDetailVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String goodsName; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java new file mode 100644 index 0000000000..77c605f0f9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailVo
+ * Description: (调拨单-明细) 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-明细) 视图数据详情", description = "(调拨单-明细) 视图数据详情") +public class WmsInventoryAllocatebillDetailDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("盘点单sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("调入仓库sid") + private String inWarehouseSid; + @ApiModelProperty("调入仓库名称") + private String inWarehouseName; + @ApiModelProperty("调入库位sid") + private String inWarehouseRackSid; + @ApiModelProperty("调入库位编码") + private String inWarehouseRackCode; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; + + /* + * 页面展示 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatch.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatch.java new file mode 100644 index 0000000000..942452093e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatch.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatch.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatch
+ * Description: 商品库存-批次属性.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性", description = "商品库存-批次属性") +@TableName("wms_inventory_batch") +public class WmsInventoryBatch extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDate; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDate; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDate; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDetailsVo.java new file mode 100644 index 0000000000..1b182bb655 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDetailsVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchVo.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchVo
+ * Description: 商品库存-批次属性 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 视图数据详情", description = "商品库存-批次属性 视图数据详情") +public class WmsInventoryBatchDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDto.java new file mode 100644 index 0000000000..0fc88a9ba3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchDto.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchDto.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchDto
+ * Description: 商品库存-批次属性 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 数据传输对象", description = "商品库存-批次属性 数据传输对象") +public class WmsInventoryBatchDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.java new file mode 100644 index 0000000000..0d220a9c4b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorybatch.WmsInventoryBatchMapper
+ * Description: 商品库存-批次属性.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryBatchMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_batch") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.xml new file mode 100644 index 0000000000..33190ce7a9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchQuery.java new file mode 100644 index 0000000000..4aa5da5722 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchQuery.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchQuery.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchQuery
+ * Description: 商品库存-批次属性 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 查询条件", description = "商品库存-批次属性 查询条件") +public class WmsInventoryBatchQuery implements Query { + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchService.java new file mode 100644 index 0000000000..cec6e7f522 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchService.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchService.java
+ * Class: com.yxt.wms.biz.wmsinventorybatch.WmsInventoryBatchService
+ * Description: 商品库存-批次属性 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventoryBatchService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryBatchQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventoryBatchDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventoryBatchDto dto){ + WmsInventoryBatch entity = new WmsInventoryBatch(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventoryBatchDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventoryBatch entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventoryBatchDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventoryBatch entity = fetchBySid(sid); + WmsInventoryBatchDetailsVo vo = new WmsInventoryBatchDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchVo.java new file mode 100644 index 0000000000..3d2a40fc91 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybatch/WmsInventoryBatchVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorybatch; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchVo.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchVo
+ * Description: 商品库存-批次属性 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 视图数据对象", description = "商品库存-批次属性 视图数据对象") +public class WmsInventoryBatchVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsQuery.java new file mode 100644 index 0000000000..bbd61b8ad4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsQuery.java @@ -0,0 +1,14 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class InStorageDetailsQuery { + + private String sid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsVo.java new file mode 100644 index 0000000000..ee5ba0ac88 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/InStorageDetailsVo.java @@ -0,0 +1,42 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailInDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class InStorageDetailsVo { + + private String sid; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType;//(入库、出库) + @ApiModelProperty("单据日期") + private String createDate; + @ApiModelProperty("用户sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value") + private String busTypeValue;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + private List wmsInventoryBillDetailDtos = new ArrayList<>(); + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsQuery.java new file mode 100644 index 0000000000..72dcb5279a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsQuery.java @@ -0,0 +1,14 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/22 + **/ +@Data +public class OutStorageDetailsQuery { + + private String sid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsVo.java new file mode 100644 index 0000000000..992a1783c3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/OutStorageDetailsVo.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailOutDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/22 + **/ +@Data +public class OutStorageDetailsVo { + + private String sid; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType;//(入库、出库) + @ApiModelProperty("单据日期") + private String createDate; + @ApiModelProperty("用户sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value") + private String busTypeValue;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + private List wmsInventoryBillDetailDtos = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBill.java new file mode 100644 index 0000000000..f4f3dab883 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBill.java @@ -0,0 +1,34 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryBill extends BaseEntity { + private String sourceBillSid;//来源单sid + private String billNo;//单据编号 + private String billType;//单据类型(入库、出库) + private String createByName;//制单人姓名 + private String busTypeKey;//业务类型key(采购入库、维修出入库、销售出入库等) + private String busTypeValue;//业务类型value(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("客户/供应商sid") + private String billObjSid; + @ApiModelProperty("客户/供应商名称") + private String billObjName; + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + private Date outTime;//实际出/入库时间 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillDto.java new file mode 100644 index 0000000000..4698e13a44 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillDto.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailDto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryBillDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private Integer state;//0正常,1作废;申请-审批中-完成-作废 + private String sourceBillSid;//来源单sid + private String billNo;//单据编号 + private String billType;//单据类型(入库、出库) + private String createDate;//单据日期 + private String createBySid;//制单人 + private String createByName;//制单人姓名 + private String busTypeKey;//业务类型key(采购入库、维修出入库、销售出入库等) + private String busTypeValue;//业务类型value(采购入库、维修出入库、销售出入库等) + private String warehouseManagerSid;//库管操作人sid + private String warehouseManager;//库管操作人 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String outTime;//实际出库时间 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private List wmsInventoryBillDetailDtos; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillExcelVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillExcelVo.java new file mode 100644 index 0000000000..8e37d2a733 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillExcelVo.java @@ -0,0 +1,36 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/25 + **/ +@Data +public class WmsInventoryBillExcelVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "单据编号", EnName = "billNo") + private String billNo; + @ExportEntityMap(CnName = "制单人姓名", EnName = "createByName") + private String createByName; + @ExportEntityMap(CnName = "单据日期", EnName = "createDate") + private String createDate; + @ExportEntityMap(CnName = "单据类型", EnName = "billType") + private String billType; + @ExportEntityMap(CnName = "业务类型", EnName = "busTypeValue") + private String busTypeValue; + @ExportEntityMap(CnName = "客户/供应商名称", EnName = "billObjName") + private String billObjName; + @ExportEntityMap(CnName = "库管操作人", EnName = "warehouseManager") + private String warehouseManager; + @ExportEntityMap(CnName = "备注", EnName = "remarks") + private String remarks; + @ExportEntityMap(CnName = "来源单", EnName = "sourceBillSid") + private String sourceBillSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillInDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillInDto.java new file mode 100644 index 0000000000..9dcb92dee1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillInDto.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailDto; +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailInDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/14 + **/ +@Data +public class WmsInventoryBillInDto { + + + private String sid; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType;//(入库、出库) + @ApiModelProperty("单据日期") + private String createDate; + @ApiModelProperty("用户sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value") + private String busTypeValue;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + private String orgPath; + private List wmsInventoryBillDetailDtos = new ArrayList<>(); + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.java new file mode 100644 index 0000000000..54dfca5232 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryBillVo initialization (@Param("sid") String sid); + + InStorageDetailsVo inDetails(String sid); + + OutStorageDetailsVo outDetails(String sid); + + List listExcel(@Param(Constants.WRAPPER)QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.xml new file mode 100644 index 0000000000..5896533b10 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillOutDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillOutDto.java new file mode 100644 index 0000000000..28936b86c1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillOutDto.java @@ -0,0 +1,42 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailInDto; +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.WmsInventoryBillDetailOutDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/14 + **/ +@Data +public class WmsInventoryBillOutDto { + + private String sid; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType;//(入库、出库) + @ApiModelProperty("单据日期") + private String createDate; + @ApiModelProperty("用户sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value") + private String busTypeValue;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + private String orgPath; + private List wmsInventoryBillDetailDtos = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillQuery.java new file mode 100644 index 0000000000..8fd764de52 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillQuery.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryBillQuery implements Query { + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("库管操作人") + private String warehouseManager; + @ApiModelProperty("单据日期开始时间") + private String createDateStart; + @ApiModelProperty("单据日期结束时间") + private String createDateEnd; + @ApiModelProperty("用户sid") + private String createBySid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillService.java new file mode 100644 index 0000000000..a16f8f4ebf --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillService.java @@ -0,0 +1,311 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.base.wmswarehouseinfo.WmsWarehouseInfo; +import com.yxt.wms.biz.base.wmswarehouseinfo.WmsWarehouseInfoService; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseArea; +import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaService; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVoExcelVo; +import com.yxt.wms.biz.inventory.wmsinventorybilldetail.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryBillService extends MybatisBaseService { + @Autowired + WmsInventoryBillDetailService wmsInventoryBillDetailService; + @Autowired + WmsInventoryService wmsInventoryService; + @Autowired + WmsWarehouseInfoService wmsWarehouseService; + @Autowired + WmsWarehouseAreaService wmsWarehouseAreaService; + + public PagerVo listPage(PagerQuery pq) { + WmsInventoryBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + /*if(StringUtils.isNotBlank(query.getName())){ + qw.like("rackName",query.getName()); + }*/ + //单据编号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wib.billNo", query.getBillNo()); + } + //制单人 + if (StringUtils.isNotBlank(query.getCreateByName())) { + qw.like("wib.createByName", query.getBillNo()); + } + //库管操作人 + if (StringUtils.isNotBlank(query.getWarehouseManager())) { + qw.like("wib.warehouseManager", query.getWarehouseManager()); + } + //单据开始时间-单据结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateDateStart()), "date_format (wib.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateDateStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateDateEnd()), "date_format (wib.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateDateEnd() + "','%Y-%m-%d')" + ); + if (StringUtils.isNotBlank(query.getCreateBySid())) { + qw.eq("wib.createBySid", query.getCreateBySid()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + @Transactional + public ResultBean inStorage2(WmsInventoryBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBill wmsInventoryBill = new WmsInventoryBill(); + BeanUtil.copyProperties(dto, wmsInventoryBill, "ids", "id"); + //入库单 + baseMapper.insert(wmsInventoryBill); + for (WmsInventoryBillDetailDto wmsInventoryBillDetailDto : dto.getWmsInventoryBillDetailDtos()) { + WmsInventoryBillDetail detail = new WmsInventoryBillDetail(); +// WmsGoods wmsGoods = wmsGoodsService.getOne(new QueryWrapper().eq("sid", wmsInventoryBillDetailDto.getGoodsSid())); + WmsWarehouseInfo wmsWarehouse = wmsWarehouseService.getOne(new QueryWrapper().eq("sid", wmsInventoryBillDetailDto.getWarehouseSid())); + WmsWarehouseArea wmsWarehouseArea = wmsWarehouseAreaService.getOne(new QueryWrapper().eq("warehouseSid", wmsWarehouse.getSid())); + //加库存 + wmsInventoryBillDetailDto.getWmsInventoryDtos().setBillSid(wmsInventoryBill.getSid()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setGoodsSid(wmsInventoryBillDetailDto.getGoodsSid()); +// wmsInventoryBillDetailDto.getWmsInventoryDtos().setUnit(wmsGoods.getUnit()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setWarehouseSid(wmsInventoryBillDetailDto.getWarehouseSid()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setWarehouseName(wmsWarehouse.getWarehouseName()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setCount(wmsInventoryBillDetailDto.getCount()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setWarehouseArea(wmsWarehouseArea.getAreaName()); + WmsInventory wmsInventory = wmsInventoryService.warehousing(wmsInventoryBillDetailDto.getWmsInventoryDtos()).getData(); + + //入库单明细 + BeanUtil.copyProperties(wmsInventoryBillDetailDto, detail, "sid", "id"); +// detail.setGoodsName(wmsGoods.getGoodsName()); +// detail.setGoodsCode(wmsGoods.getGoodsCode()); +// detail.setUnit(wmsGoods.getUnit()); + detail.setWarehouseName(wmsWarehouse.getWarehouseName()); + detail.setWarehouseArea(wmsWarehouseArea.getAreaName()); + detail.setInventorySid(wmsInventory.getSid()); + detail.setBillSid(wmsInventoryBill.getSid()); + detail.setCurrentCount(wmsInventory.getCount().toString());// + wmsInventoryBillDetailService.save(detail); + } + return rb.success(); + } + + @Transactional + public ResultBean outStorage2(WmsInventoryBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBill wmsInventoryBill = new WmsInventoryBill(); + BeanUtil.copyProperties(dto, wmsInventoryBill, "sid", "id"); + baseMapper.insert(wmsInventoryBill); + for (WmsInventoryBillDetailDto wmsInventoryBillDetailDto : dto.getWmsInventoryBillDetailDtos()) { + wmsInventoryBillDetailDto.setCount("-" + wmsInventoryBillDetailDto.getCount()); + wmsInventoryBillDetailDto.setTaxAmount("-" + wmsInventoryBillDetailDto.getTaxAmount()); + wmsInventoryBillDetailDto.setTaxPrice("-" + wmsInventoryBillDetailDto.getTaxPrice()); + wmsInventoryBillDetailDto.setAmount("-" + wmsInventoryBillDetailDto.getAmount()); + WmsInventoryBillDetail detail = new WmsInventoryBillDetail(); +// WmsGoods wmsGoods = wmsGoodsService.getOne(new QueryWrapper().eq("sid", wmsInventoryBillDetailDto.getGoodsSid())); + WmsWarehouseInfo wmsWarehouse = wmsWarehouseService.getOne(new QueryWrapper().eq("sid", wmsInventoryBillDetailDto.getWarehouseSid())); + WmsWarehouseArea wmsWarehouseArea = wmsWarehouseAreaService.getOne(new QueryWrapper().eq("warehouseSid", wmsWarehouse.getSid())); + //减库存 + wmsInventoryBillDetailDto.getWmsInventoryDtos().setGoodsSid(wmsInventoryBillDetailDto.getGoodsSid()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setWarehouseSid(wmsInventoryBillDetailDto.getWarehouseSid()); + wmsInventoryBillDetailDto.getWmsInventoryDtos().setCount(wmsInventoryBillDetailDto.getCount()); + ResultBean rb1 = wmsInventoryService.outWarehousing(wmsInventoryBillDetailDto.getWmsInventoryDtos()); + if (!rb1.getCode().equals("200")) { + return rb1; + } + WmsInventory wmsInventory = rb1.getData(); + //出库单明细 + BeanUtil.copyProperties(wmsInventoryBillDetailDto, detail, "sid", "id"); +// detail.setGoodsName(wmsGoods.getGoodsName()); +// detail.setGoodsCode(wmsGoods.getGoodsCode()); +// detail.setUnit(wmsGoods.getUnit()); + detail.setWarehouseName(wmsWarehouse.getWarehouseName()); + detail.setWarehouseArea(wmsWarehouseArea.getAreaName()); + detail.setInventorySid(wmsInventory.getSid()); + detail.setBillSid(wmsInventoryBill.getSid()); + detail.setCurrentCount(wmsInventory.getCount().toString());// + wmsInventoryBillDetailService.save(detail); + } + return rb.success(); + } + + public ResultBean saveOrUpdate(WmsInventoryBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryBill wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryBill wmsWarehouseRack = new WmsInventoryBill(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBillVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + @Transactional + public ResultBean inStorage(WmsInventoryBillInDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsInventoryBill wmsInventoryBill = new WmsInventoryBill(); + String orgPath = dto.getOrgPath(); + BeanUtil.copyProperties(dto, wmsInventoryBill, "sid"); + baseMapper.insert(wmsInventoryBill); + sid = wmsInventoryBill.getSid(); + List wmsInventoryBillDetailDtos = dto.getWmsInventoryBillDetailDtos(); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + if (!wmsInventoryBillDetailDtos.isEmpty()) { + wmsInventoryBillDetailService.saveOrUpdateIn(wmsInventoryBillDetailDtos, sid); + } + } else { + WmsInventoryBill wmsInventoryBill = fetchBySid(sid); + if (wmsInventoryBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsInventoryBill); + baseMapper.updateById(wmsInventoryBill); + List wmsInventoryBillDetailDtos = dto.getWmsInventoryBillDetailDtos(); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + if (!wmsInventoryBillDetailDtos.isEmpty()) { + wmsInventoryBillDetailService.saveOrUpdateIn(wmsInventoryBillDetailDtos, sid); + } + } + return rb.success().setData(sid); + } + + @Transactional + public ResultBean outStorage(WmsInventoryBillOutDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsInventoryBill wmsInventoryBill = new WmsInventoryBill(); + BeanUtil.copyProperties(dto, wmsInventoryBill, "sid"); + sid = wmsInventoryBill.getSid(); + List wmsInventoryBillDetailDtos = dto.getWmsInventoryBillDetailDtos(); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + if (!wmsInventoryBillDetailDtos.isEmpty()) { + wmsInventoryBillDetailService.saveOrUpdateOut(wmsInventoryBillDetailDtos, sid); + } + baseMapper.insert(wmsInventoryBill); + } else { + WmsInventoryBill wmsInventoryBill = fetchBySid(sid); + if (wmsInventoryBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsInventoryBill); + List wmsInventoryBillDetailDtos = dto.getWmsInventoryBillDetailDtos(); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + if (!wmsInventoryBillDetailDtos.isEmpty()) { + wmsInventoryBillDetailService.saveOrUpdateOut(wmsInventoryBillDetailDtos, sid); + } + baseMapper.updateById(wmsInventoryBill); + } + return rb.success().setData(sid); + } + + + public ResultBean inDetails(InStorageDetailsQuery inStorageDetailsQuery) { + ResultBean rb = ResultBean.fireFail(); + InStorageDetailsVo inStorageDetailsVo = baseMapper.inDetails(inStorageDetailsQuery.getSid()); + if (inStorageDetailsVo != null) { + List wmsInventoryBillDetailDtos = wmsInventoryBillDetailService.selectByBillSid(inStorageDetailsQuery.getSid()); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + inStorageDetailsVo.setWmsInventoryBillDetailDtos(wmsInventoryBillDetailDtos); + } else { + return rb.setData(new InStorageDetailsVo()).setMsg("该单据不存在"); + } + return rb.success().setData(inStorageDetailsVo); + } + + public ResultBean outDetails(OutStorageDetailsQuery outStorageDetailsQuery) { + ResultBean rb = ResultBean.fireFail(); + OutStorageDetailsVo outStorageDetailsVo = baseMapper.outDetails(outStorageDetailsQuery.getSid()); + if (outStorageDetailsVo != null) { + List wmsInventoryBillDetailDtos = wmsInventoryBillDetailService.selectByBillSidOut(outStorageDetailsQuery.getSid()); + wmsInventoryBillDetailDtos.removeAll(Collections.singleton(null)); + outStorageDetailsVo.setWmsInventoryBillDetailDtos(wmsInventoryBillDetailDtos); + } else { + return rb.setMsg("该单据不存在"); + } + return rb.success().setData(outStorageDetailsVo); + } + + public List listExcel(WmsInventoryBillQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + //单据编号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wib.billNo", query.getBillNo()); + } + //制单人 + if (StringUtils.isNotBlank(query.getCreateByName())) { + qw.like("wib.createByName", query.getBillNo()); + } + //库管操作人 + if (StringUtils.isNotBlank(query.getWarehouseManager())) { + qw.like("wib.warehouseManager", query.getWarehouseManager()); + } + //单据开始时间-单据结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateDateStart()), "date_format (wib.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateDateStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateDateEnd()), "date_format (wib.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateDateEnd() + "','%Y-%m-%d')" + ); + if (StringUtils.isNotBlank(query.getCreateBySid())) { + qw.eq("wib.createBySid", query.getCreateBySid()); + } + } + List list = baseMapper.listExcel(qw); + list.removeAll(Collections.singleton(null)); + return list; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillVo.java new file mode 100644 index 0000000000..86e39b1f33 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybill/WmsInventoryBillVo.java @@ -0,0 +1,69 @@ +package com.yxt.wms.biz.inventory.wmsinventorybill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryBillVo implements Vo { + /*private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String isDelete; + private String state;//0正常,1作废;申请-审批中-完成-作废 + private String sourceBillSid;//来源单sid + private String billNo;//单据编号 + private String billType;//单据类型(入库、出库) + private String createDate;//单据日期 + private String createBySid;//制单人 + private String createByName;//制单人姓名 + private String busTypeKey;//业务类型key(采购入库、维修出入库、销售出入库等) + private String busTypeValue;//业务类型value(采购入库、维修出入库、销售出入库等) + private String warehouseManagerSid;//库管操作人sid + private String warehouseManager;//库管操作人 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String outTime;//实际出库时间 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid*/ + + private String sid; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType;//(入库、出库) + @ApiModelProperty("单据日期") + private String createDate; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value") + private String busTypeValue;//(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("客户/供应商名称") + private String billObjName; + @ApiModelProperty("库管操作人sid") + private String warehouseManagerSid; + @ApiModelProperty("库管操作人") + private String warehouseManager; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("实际出库时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String outTime; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetail.java new file mode 100644 index 0000000000..7e43b28911 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetail.java @@ -0,0 +1,91 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryBillDetail extends BaseEntity { + /* private String billSid;//单据sid + private String inventorySid;//商品库存sid + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品编码(图号) + private String specification;//规格 + private String goodsModel;//型号 + private String currentCount;//出入库后的库存量 + private String unit;//计量单位 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String cost;//单位成本(进货价) + private String count;//数量(出库为负) + private String taxAmount;//税额(出库为负) + private String taxPrice;//含税价(出库为负) + private String amount;//金额(出库为负) + private String price1;//销售价1 + private String price2;//销售价2 + private String subjectSid;//科目sid(出库时) + private String subject;//科目(出库时) + private String operTime;//操作时间 + private String operUserSid;//操作人*/ + private String billSid;//单据sid + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("出入库后的库存量") + private String currentCount; + @ApiModelProperty("计量单位") + private String unit; + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + @ApiModelProperty("库区sid") + private String warehouseAreaSid; + @ApiModelProperty("库区名称") + private String warehouseArea; + @ApiModelProperty("货架sid") + private String warehouseRackSid; + @ApiModelProperty("货架名称") + private String warehouseRackName; + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; + @ApiModelProperty("数量(出库为负)") + private BigDecimal count; + @ApiModelProperty("税额(出库为负)") + private BigDecimal taxAmount; + @ApiModelProperty("含税价(出库为负)") + private BigDecimal taxPrice; + @ApiModelProperty("金额(出库为负)") + private BigDecimal amount; + @ApiModelProperty("销售价1") + private BigDecimal price1; + @ApiModelProperty("销售价2") + private BigDecimal price2; + @ApiModelProperty("科目sid(出库时)") + private String subjectSid; + @ApiModelProperty("科目(出库时)") + private String subject; + @ApiModelProperty("操作时间") + private String operTime; + @ApiModelProperty("操作人") + private String operUserSid; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailDto.java new file mode 100644 index 0000000000..735379c6a6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailDto.java @@ -0,0 +1,51 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryDto; +import com.yxt.wms.biz.inventory.wmsinventorybill.WmsInventoryBillDto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryBillDetailDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private Integer state; + private String billSid;//单据sid + private String inventorySid;//商品库存sid + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品编码(图号) + private String specification;//规格 + private String goodsModel;//型号 + private String currentCount;//出入库后的库存量 + private String unit;//计量单位 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String cost;//单位成本(进货价) + private String count;//数量(出库为负) + private String taxAmount;//税额(出库为负) + private String taxPrice;//含税价(出库为负) + private String amount;//金额(出库为负) + private String price1;//销售价1 + private String price2;//销售价2 + private String subjectSid;//科目sid(出库时) + private String subject;//科目(出库时) + private String operTime;//操作时间 + private String operUserSid;//操作人 + private WmsInventoryDto wmsInventoryDtos; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailInDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailInDto.java new file mode 100644 index 0000000000..730eedc372 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailInDto.java @@ -0,0 +1,52 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/14 + **/ +@Data +public class WmsInventoryBillDetailInDto { + + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("出入库后的库存量") + private String currentCount; + @ApiModelProperty("计量单位") + private String unit; + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + @ApiModelProperty("库区sid") + private String warehouseAreaSid; + @ApiModelProperty("库区名称") + private String warehouseArea; + private String warehouseRackSid;//货架sid + private String warehouseRackName;//货架名称 + private String cost;//单位成本(进货价) + private String count;//数量(出库为负) + private String taxAmount;//税额(出库为负) + private String taxPrice;//含税价(出库为负) + private String amount;//金额(出库为负) + private String price1;//销售价1 + private String price2;//销售价2 + private String subjectSid;//科目sid(出库时) + private String subject;//科目(出库时) + private String operTime;//操作时间 + private String operUserSid;//操作人 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.java new file mode 100644 index 0000000000..0182b86b32 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.java @@ -0,0 +1,28 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryBillDetailMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryBillDetailVo initialization (@Param("sid") String sid); + + int deleteByBillSid(String billSid); + + String selectNum(String goodsId); + + List selectByBillSid(String sid); + + List selectByBillSidOut(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.xml new file mode 100644 index 0000000000..ac50d47d36 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + DELETE + FROM wms_inventory_bill_detail + where billSid = #{billSid} + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailOutDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailOutDto.java new file mode 100644 index 0000000000..e75ee0f62d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailOutDto.java @@ -0,0 +1,64 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/14 + **/ +@Data +public class WmsInventoryBillDetailOutDto { + + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("出入库后的库存量") + private String currentCount; + @ApiModelProperty("计量单位") + private String unit; + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + @ApiModelProperty("库区sid") + private String warehouseAreaSid; + @ApiModelProperty("库区名称") + private String warehouseArea; + @ApiModelProperty("货架sid") + private String warehouseRackSid; + @ApiModelProperty("货架名称") + private String warehouseRackName; + @ApiModelProperty("单位成本(进货价)") + private String cost; + @ApiModelProperty("数量(出库为负)") + private String count; + @ApiModelProperty("税额(出库为负)") + private String taxAmount; + @ApiModelProperty("含税价(出库为负)") + private String taxPrice; + @ApiModelProperty("金额(出库为负)") + private String amount; + @ApiModelProperty("销售价1") + private String price1; + @ApiModelProperty("销售价2") + private String price2; + @ApiModelProperty("科目sid(出库时)") + private String subjectSid; + @ApiModelProperty("科目(出库时)") + private String subject; + @ApiModelProperty("操作时间") + private String operTime; + @ApiModelProperty("操作人") + private String operUserSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailQuery.java new file mode 100644 index 0000000000..ff6fe69f0d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailQuery.java @@ -0,0 +1,13 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryBillDetailQuery implements Query { + private String name; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailService.java new file mode 100644 index 0000000000..944a364e28 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailService.java @@ -0,0 +1,186 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryDto; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; +import com.yxt.wms.utils.Rule; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryBillDetailService extends MybatisBaseService { + @Autowired + WmsInventoryBillDetailService wmsInventoryBillService; + @Resource + BaseGoodsSkuFeign baseGoodsSkuFeign; + @Autowired + private WmsInventoryService wmsInventoryService; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } +// public ResultBean InOrOutStorage(WmsInventoryBillDetailDto dto) { +// ResultBean rb = ResultBean.fireFail(); +// WmsInventoryBillDetail wmsInventoryBill=new WmsInventoryBillDetail(); +// BeanUtil.copyProperties(dto,wmsInventoryBill,"ids","id"); +// baseMapper.insert(wmsInventoryBill); +// for (WmsInventoryBillDetailDto wmsInventoryBillDto : dto.getWmsInventoryBillDtoList()) { +//// WmsInventoryBill wmsInventoryBill1=new +//// wmsInventoryBillService.save(); +// } +// return rb.success(); +// } + + public ResultBean saveOrUpdate(WmsInventoryBillDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryBillDetail wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryBillDetail wmsWarehouseRack = new WmsInventoryBillDetail(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBillDetailVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public void saveOrUpdateIn(List wmsInventoryBillDetailDtos, String billSid) { + baseMapper.deleteByBillSid(billSid); + wmsInventoryBillDetailDtos.forEach(v -> { + //入库单的明细 + WmsInventoryBillDetail wmsInventoryBillDetail = new WmsInventoryBillDetail(); + //添加库存商品-台账 + String goodsId = getGoodsId(v.getGoodsSkuSid()); + ResultBean resultBean = baseGoodsSkuFeign.getDetails(v.getGoodsSkuSid()); + if (resultBean.getSuccess()) { + BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = resultBean.getData(); + //注:入库操作时,需要根据商品oodsSkusid对应的商品类别取是否一品一码, + // 若为是,则一物生成一条库存,若为否,则每个goodsskusid生成一条库存。 + if (baseGoodsSkuDetailsVo.getIsGoodsID() == 0) { + WmsInventoryDto wmsInventoryDto = new WmsInventoryDto(); + wmsInventoryDto.setBillDetailSid(wmsInventoryBillDetail.getSid()); + wmsInventoryDto.setBillSid(billSid); + wmsInventoryDto.setGoodsID(goodsId); + wmsInventoryDto.setGoodsSkuSid(v.getGoodsSkuSid()); + wmsInventoryDto.setGoodSpuSid(v.getGoodSpuSid()); + wmsInventoryService.saveOrUpdate(wmsInventoryDto); + + } else { + + + } + } + + BeanUtil.copyProperties(v, wmsInventoryBillDetail); + wmsInventoryBillDetail.setBillSid(billSid); + baseMapper.insert(wmsInventoryBillDetail); + + }); + + } + + /** + * 商品ID《唯一编码,入库时生成,生成规则为商品编码+YYodd+4位流水》 + * + * @param goodsSkuSid + * @return + */ + private String getGoodsId(String goodsSkuSid) { + String goodsId = ""; + ResultBean resultBean = baseGoodsSkuFeign.getDetails(goodsSkuSid); + if (resultBean.getSuccess()) { + BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = resultBean.getData(); + goodsId = baseGoodsSkuDetailsVo.getGoodsCode(); + String date = DateUtil.format(DateUtil.date(), "yyyyMM"); + goodsId = goodsId + date; + String i = baseMapper.selectNum(goodsId); + if (StringUtils.isNotBlank(i)) { + goodsId = Rule.getBillNo(goodsId, Integer.valueOf(i).intValue()); + } else { + goodsId = Rule.getBillNo(goodsId, 0); + } + } + return goodsId; + } + + public void saveOrUpdateOut(List wmsInventoryBillDetailDtos, String billSid) { + baseMapper.deleteByBillSid(billSid); + wmsInventoryBillDetailDtos.forEach(v -> { + WmsInventoryBillDetail wmsInventoryBillDetail = new WmsInventoryBillDetail(); + BeanUtil.copyProperties(v, wmsInventoryBillDetail); + wmsInventoryBillDetail.setBillSid(billSid); + baseMapper.insert(wmsInventoryBillDetail); + }); + + } + + public List selectByBillSid(String sid) { + return baseMapper.selectByBillSid(sid); + } + + public List selectByBillSidOut(String sid) { + return baseMapper.selectByBillSidOut(sid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailVo.java new file mode 100644 index 0000000000..b6572cf789 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorybilldetail/WmsInventoryBillDetailVo.java @@ -0,0 +1,50 @@ +package com.yxt.wms.biz.inventory.wmsinventorybilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryBillDetailVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String isDelete; + private String state; + private String billSid;//单据sid + private String inventorySid;//商品库存sid + private String goodsSid;//商品sid + private String goodsName;//商品名称 + private String goodsCode;//商品编码(图号) + private String specification;//规格 + private String goodsModel;//型号 + private String currentCount;//出入库后的库存量 + private String unit;//计量单位 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String cost;//单位成本(进货价) + private String count;//数量(出库为负) + private String taxAmount;//税额(出库为负) + private String taxPrice;//含税价(出库为负) + private String amount;//金额(出库为负) + private String price1;//销售价1 + private String price2;//销售价2 + private String subjectSid;//科目sid(出库时) + private String subject;//科目(出库时) + private String operTime;//操作时间 + private String operUserSid;//操作人 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbill.java new file mode 100644 index 0000000000..3c80ebab22 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbill.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbill.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbill
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点", description = "库存盘点") +@TableName("wms_inventory_checkbill") +public class WmsInventoryCheckbill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("盘点类型") + private String checkType; // 盘点类型 + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; // 盘点状态(盘点中1,盘点完成2) + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; // 盘盈数量 + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; // 盘盈金额 + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; // 盘亏数量 + @ApiModelProperty("盈亏金额") + private BigDecimal lossAmount; // 盈亏金额 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java new file mode 100644 index 0000000000..a81ed25cf5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + + +import com.yxt.common.core.vo.Vo; + +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDetailsVo; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillVo
+ * Description: 库存盘点 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 视图数据详情", description = "库存盘点 视图数据详情") +public class WmsInventoryCheckbillDetailsVo implements Vo { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("盘点类型") + private String checkType; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盘亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("盘库明细") + private List wmsInventoryCheckbillDetailList; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDto.java new file mode 100644 index 0000000000..907e19d9ac --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillDto.java @@ -0,0 +1,84 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + + +import com.yxt.common.core.dto.Dto; + +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDto.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillDto
+ * Description: 库存盘点 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 数据传输对象", description = "库存盘点 数据传输对象") +public class WmsInventoryCheckbillDto implements Dto { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("盘点类型") + private String checkType; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盘亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("盘库明细") + private List wmsInventoryCheckbillDetailList; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java new file mode 100644 index 0000000000..b721bf1c43 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillMapper
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryCheckbillMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_checkbill") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml new file mode 100644 index 0000000000..f0ea6ba867 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java new file mode 100644 index 0000000000..bd46dc8226 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillQuery.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillQuery
+ * Description: 库存盘点 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 查询条件", description = "库存盘点 查询条件") +public class WmsInventoryCheckbillQuery implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java new file mode 100644 index 0000000000..52dbab7ee6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java @@ -0,0 +1,142 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDetailsVo; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailService; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillService.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillService
+ * Description: 库存盘点 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventoryCheckbillService extends MybatisBaseService { + + @Autowired + private WmsInventoryCheckbillDetailService wmsInventoryCheckbillDetailService; + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryCheckbillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("pb.billNo", query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + for (WmsInventoryCheckbillVo record : pagging.getRecords()) { + Integer checkState = record.getCheckState(); + if (checkState == 1){ + record.setCheckStateName("盘点中"); + }else if (checkState == 2){ + record.setCheckStateName("盘点完成"); + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventoryCheckbillDto dto){ + String dtoSid = dto.getSid(); + List wmsInventoryCheckbillDetailList = dto.getWmsInventoryCheckbillDetailList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + wmsInventoryCheckbillDetailDto.setBillSid(sid); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(wmsInventoryCheckbillDetailDto); + } + return; + } + this.updateByDto(dto); + wmsInventoryCheckbillDetailService.delByMainSid(dtoSid); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + wmsInventoryCheckbillDetailDto.setBillSid(dtoSid); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(wmsInventoryCheckbillDetailDto); + } + } + + public String insertByDto(WmsInventoryCheckbillDto dto){ + WmsInventoryCheckbill entity = new WmsInventoryCheckbill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(WmsInventoryCheckbillDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventoryCheckbill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventoryCheckbillDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventoryCheckbill entity = fetchBySid(sid); + WmsInventoryCheckbillDetailsVo vo = new WmsInventoryCheckbillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List wmsInventoryCheckbillDetailDetailsVos = wmsInventoryCheckbillDetailService.selByMainSid(sid); + vo.setWmsInventoryCheckbillDetailList(wmsInventoryCheckbillDetailDetailsVos); + return vo; + } + + public void inven(WmsInventoryCheckbillDto dto) { + saveOrUpdateDto(dto); + List wmsInventoryCheckbillDetailList = dto.getWmsInventoryCheckbillDetailList(); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + + } + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillVo.java new file mode 100644 index 0000000000..9abaec0708 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillVo.java @@ -0,0 +1,82 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbill; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillVo
+ * Description: 库存盘点 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 视图数据对象", description = "库存盘点 视图数据对象") +public class WmsInventoryCheckbillVo implements Vo { + + private String sid; + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("制单日期") + private String createDate; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private String checkStateName; + @ApiModelProperty("完成时间") + private String completeDate; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盈亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String createOrgName; + @ApiModelProperty("id") + private String id; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java new file mode 100644 index 0000000000..16855d8d01 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetail.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetail
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细", description = "库存盘点-明细") +@TableName("wms_inventory_checkbill_detail") +public class WmsInventoryCheckbillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("盘点单sid") + private String billSid; // 盘点单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库") + private String warehouseName; // 仓库 + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("账面数量") + private BigDecimal bookCount; // 账面数量 + @ApiModelProperty("实盘数量") + private BigDecimal realCount; // 实盘数量 + @ApiModelProperty("现场照片(多张中间用英文逗号分隔)") + private String picUrl; // 现场照片(多张中间用英文逗号分隔) + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java new file mode 100644 index 0000000000..2ec6ded503 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailVo
+ * Description: 库存盘点-明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 视图数据详情", description = "库存盘点-明细 视图数据详情") +public class WmsInventoryCheckbillDetailDetailsVo implements Vo { + + private String sid; + + /* + * 数据库字段 + * */ + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("盘点状态(0正常、2盘亏、1盘盈)") + private String state; + @ApiModelProperty("盘点单sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("账面数量") + private BigDecimal bookCount; + @ApiModelProperty("实盘数量") + private BigDecimal realCount; + @ApiModelProperty("现场照片") + private List picUrls = new ArrayList<>(); + + /* + * 页面展示字段 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; + + /* + * 盘点接口需要字段 + * */ + @ApiModelProperty("盈亏数") + private BigDecimal proAndLossCount; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java new file mode 100644 index 0000000000..254457b5a1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailDto.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto
+ * Description: 库存盘点-明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 数据传输对象", description = "库存盘点-明细 数据传输对象") +public class WmsInventoryCheckbillDetailDto implements Dto { + + private String sid; + + /* + * 数据库字段 + * */ + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("盘点状态(0正常、2盘亏、1盘盈)") + private String state; + @ApiModelProperty("盘点单sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("账面数量") + private BigDecimal bookCount; + @ApiModelProperty("实盘数量") + private BigDecimal realCount; + @ApiModelProperty("现场照片") + private List picUrls = new ArrayList<>(); + + /* + * 页面展示字段 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; + + /* + * 盘点接口需要字段 + * */ + @ApiModelProperty("盈亏数") + private BigDecimal proAndLossCount; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java new file mode 100644 index 0000000000..58e698310b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailMapper
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryCheckbillDetailMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_checkbill_detail") + List selectListVo(); + + @Delete("delete from wms_inventory_checkbill_detail where billSid = #{dtoSid}") + void delByMainSid(String dtoSid); + + List selByMainSid(String billSid); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml new file mode 100644 index 0000000000..c6e96f52ce --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailQuery.java new file mode 100644 index 0000000000..b7bacc84dd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailQuery.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailQuery.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailQuery
+ * Description: 库存盘点-明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 查询条件", description = "库存盘点-明细 查询条件") +public class WmsInventoryCheckbillDetailQuery implements Query { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java new file mode 100644 index 0000000000..c981ef26bd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java @@ -0,0 +1,105 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailService.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailService
+ * Description: 库存盘点-明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventoryCheckbillDetailService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryCheckbillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventoryCheckbillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventoryCheckbillDetailDto dto){ + WmsInventoryCheckbillDetail entity = new WmsInventoryCheckbillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventoryCheckbillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventoryCheckbillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventoryCheckbillDetailDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventoryCheckbillDetail entity = fetchBySid(sid); + WmsInventoryCheckbillDetailDetailsVo vo = new WmsInventoryCheckbillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String dtoSid) { + baseMapper.delByMainSid(dtoSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java new file mode 100644 index 0000000000..7a0a3cc024 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailVo
+ * Description: 库存盘点-明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 视图数据对象", description = "库存盘点-明细 视图数据对象") +public class WmsInventoryCheckbillDetailVo implements Vo { + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java new file mode 100644 index 0000000000..e14ac6a75f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java @@ -0,0 +1,102 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecord.java
+ * Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecord
+ * Description: 库存出入库记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存出入库记录", description = "库存出入库记录") +@TableName("wms_inventory_record") +public class WmsInventoryRecord extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("来源单sid(业务单sid)") + private String sourceBillSid; // 来源单sid(业务单sid) + @ApiModelProperty("来源单据编号") + private String billNo; // 来源单据编号 + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; // 单据类型(1入库、0出库) + @ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)") + private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商") + private String billObjSid; // 客户/供应商sid,出库是为客户,入库时为供应商 + @ApiModelProperty("客户/供应商名称") + private String billObjName; // 客户/供应商名称 + @ApiModelProperty("批次号") + private String batchNumber; // 批次号 + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("出入库后的库存量") + private BigDecimal currentCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位sid") + private String warehouseRackSid; // 库位sid + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDetailsVo.java new file mode 100644 index 0000000000..c5cfb952f4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDetailsVo.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordVo.java
+ * Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecordVo
+ * Description: 库存出入库记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存出入库记录 视图数据详情", description = "库存出入库记录 视图数据详情") +public class WmsInventoryRecordDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("来源单sid(业务单sid)") + private String sourceBillSid; // 来源单sid(业务单sid) + @ApiModelProperty("来源单据编号") + private String billNo; // 来源单据编号 + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; // 单据类型(1入库、0出库) + @ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)") + private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商") + private String billObjSid; // 客户/供应商sid,出库是为客户,入库时为供应商 + @ApiModelProperty("客户/供应商名称") + private String billObjName; // 客户/供应商名称 + @ApiModelProperty("批次号") + private String batchNumber; // 批次号 + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("出入库后的库存量") + private BigDecimal currentCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位sid") + private String warehouseRackSid; // 库位sid + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java new file mode 100644 index 0000000000..73ec98db71 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordDto.java
+ * Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecordDto
+ * Description: 库存出入库记录 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存出入库记录 数据传输对象", description = "库存出入库记录 数据传输对象") +public class WmsInventoryRecordDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("来源单sid(业务单sid)") + private String sourceBillSid; // 来源单sid(业务单sid) + @ApiModelProperty("来源单据编号") + private String billNo; // 来源单据编号 + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; // 单据类型(1入库、0出库) + @ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)") + private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商") + private String billObjSid; // 客户/供应商sid,出库是为客户,入库时为供应商 + @ApiModelProperty("客户/供应商名称") + private String billObjName; // 客户/供应商名称 + @ApiModelProperty("批次号") + private String batchNumber; // 批次号 + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("出入库后的库存量") + private BigDecimal currentCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位sid") + private String warehouseRackSid; // 库位sid + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordListVo.java new file mode 100644 index 0000000000..fd563f7dd6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordListVo.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 库存出入库记录 + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsInventoryRecordListVo { + + @ApiModelProperty("来源单编号") + private String billNo; + @ApiModelProperty("单据类型") + private String billType; + @ApiModelProperty("发生时间") + private String createTime; + @ApiModelProperty("业务类型") + private String busTypeValue; + @ApiModelProperty("客户/供应商") + private String billObjName; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("数量") + private String count; + @ApiModelProperty("出入库后的库存量") + private String currentCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java new file mode 100644 index 0000000000..9ea6fbccb3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.WmsInAndOutboundVo; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.WmsInventoryCountDetailsVo; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.WmsInventoryCountReportVo; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.WmsInventoryDetailsRecordVo; +import com.yxt.wms.biz.inventory.wmsoldinventory.WmsOldInventoryDetailsListVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordMapper.java
+ * Class: inventroy.biz.wmsinventoryrecord.WmsInventoryRecordMapper
+ * Description: 库存出入库记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryRecordMapper extends BaseMapper { + + //@Update("update wms_inventory_record set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_record") + List selectListVo(); + + String selInItCountBySettleTime(@Param("settleTime") String settleTime); + + List selInboundAndOutboundCount(@Param(Constants.WRAPPER) QueryWrapper qw); + + IPage inventoryInboundAndOutboundStats(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage inventoryDetailsRecord(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List getWmsInventoryRecordList(String sid); + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); + + List getDetailsList(String sid); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml new file mode 100644 index 0000000000..0e9370f28a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordQuery.java new file mode 100644 index 0000000000..3c775921d0 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordQuery.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordQuery.java
+ * Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecordQuery
+ * Description: 库存出入库记录 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存出入库记录 查询条件", description = "库存出入库记录 查询条件") +public class WmsInventoryRecordQuery implements Query { + + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("来源单sid(业务单sid)") + private String sourceBillSid; // 来源单sid(业务单sid) + @ApiModelProperty("来源单据编号") + private String billNo; // 来源单据编号 + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; // 单据类型(1入库、0出库) + @ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)") + private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商") + private String billObjSid; // 客户/供应商sid,出库是为客户,入库时为供应商 + @ApiModelProperty("客户/供应商名称") + private String billObjName; // 客户/供应商名称 + @ApiModelProperty("批次号") + private String batchNumber; // 批次号 + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("出入库后的库存量") + private BigDecimal currentCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位sid") + private String warehouseRackSid; // 库位sid + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java new file mode 100644 index 0000000000..e799d81697 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java @@ -0,0 +1,318 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.*; +import com.yxt.wms.biz.inventory.wmsoldinventory.WmsOldInventoryDetailsListVo; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordService.java
+ * Class: inventroy.biz.wmsinventoryrecord.WmsInventoryRecordService
+ * Description: 库存出入库记录 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventoryRecordService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(WmsInventoryRecordQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryRecordQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventoryRecordDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventoryRecordDto dto) { + WmsInventoryRecord entity = new WmsInventoryRecord(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventoryRecordDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventoryRecord entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventoryRecordDetailsVo fetchDetailsVoBySid(String sid) { + WmsInventoryRecord entity = fetchBySid(sid); + WmsInventoryRecordDetailsVo vo = new WmsInventoryRecordDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public WmsInventoryCountReportVo inventoryStats(PagerQuery pq) { + WmsInventoryCountReportVo vo = new WmsInventoryCountReportVo(); + WmsInventoryCountReportQuery query = pq.getParams(); + if (StringUtils.isBlank(query.getStartDate()) || StringUtils.isBlank(query.getEndDate()) || StringUtils.isBlank(query.getSettleTime())) { + return vo; + } + String inItCount = "";//期初数量 + String inboundCount = "";//入库数量 + String outboundCount = "";//出库数量 + String changeCount = "";//变化数量 + String settleCount = "";//结存数量 + if (StringUtils.isNotBlank(query.getSettleTime())) { + inItCount = baseMapper.selInItCountBySettleTime(query.getSettleTime()); + } + QueryWrapper qw = new QueryWrapper<>(); + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "r.createTime >= '" + query.getStartDate() + "'"). + apply(StringUtils.isNotBlank(query.getEndDate()), "r.createTime <= '" + query.getEndDate() + "'" + ); + qw.eq("1", 1); + qw.groupBy("r.billType"); + List reportVo = baseMapper.selInboundAndOutboundCount(qw); + if (!reportVo.isEmpty()) { + for (WmsInAndOutboundVo wmsInAndOutboundVo : reportVo) { + if (StringUtils.isNotBlank(wmsInAndOutboundVo.getBillType())) { + if (wmsInAndOutboundVo.getBillType().equals("1")) { + inboundCount = wmsInAndOutboundVo.getCount(); + } else if (wmsInAndOutboundVo.getBillType().equals("0")) { + outboundCount = wmsInAndOutboundVo.getCount(); + } + } + } + } + changeCount = (new BigDecimal(inboundCount).subtract(new BigDecimal(outboundCount))).toString(); + settleCount = (new BigDecimal(inItCount).add(new BigDecimal(changeCount))).toString(); + vo.setInItAmount(inItCount); + vo.setInboundAmount(inboundCount); + vo.setOutboundAmount(outboundCount); + vo.setChangeCount(changeCount); + vo.setSettleAmount(settleCount); + return vo; + } + + public PagerVo inventoryInboundStats(PagerQuery pq) { + WmsInventoryCountReportQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "r.createTime >= '" + query.getStartDate() + "'"). + apply(StringUtils.isNotBlank(query.getEndDate()), "r.createTime <= '" + query.getEndDate() + "'" + ); + qw.eq("r.billType", "1"); + qw.groupBy("r.busTypeKey"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.inventoryInboundAndOutboundStats(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo inventoryOutboundStats(PagerQuery pq) { + WmsInventoryCountReportQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "r.createTime >= '" + query.getStartDate() + "'"). + apply(StringUtils.isNotBlank(query.getEndDate()), "r.createTime <= '" + query.getEndDate() + "'" + ); + qw.eq("r.billType", "0"); + qw.groupBy("r.busTypeKey"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.inventoryInboundAndOutboundStats(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo inventoryDetailsRecord(PagerQuery pq) { + WmsInventoryDetailsRecordQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + qw.apply(StringUtils.isNotBlank(query.getStartDate()), "r.createTime >= '" + query.getStartDate() + "'"). + apply(StringUtils.isNotBlank(query.getEndDate()), "r.createTime <= '" + query.getEndDate() + "'" + ); + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getBusTypeValue())) { + qw.like("r.busTypeValue", query.getBusTypeValue()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("r.goodsSpuName", query.getGoodsSpuName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("r.warehouseName", query.getWarehouseName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("r.goodsSkuCode", query.getGoodsSkuCode()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.inventoryDetailsRecord(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean> getWmsInventoryRecordList(String sid) { + ResultBean> rb = ResultBean.fireFail(); + List list = baseMapper.getWmsInventoryRecordList(sid); + list.removeAll(Collections.singleton(null)); + return rb.success().setData(list); + } + + public PagerVo listPage(PagerQuery pagerQuery) { + WmsInventoryRecordsQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wir.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wir.goodsSpuName", query.getGoodsSpuName()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wir.goodsSkuCode", query.getGoodsSkuCode()); + } + //仓库名称 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wir.warehouseName", query.getWarehouseName()); + } + //库位编号 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wir.warehouseRackCode", query.getWarehouseRackCode()); + } + //客户/供应商名称 + if (StringUtils.isNotBlank(query.getBillObjName())) { + qw.like("wir.billObjName", query.getBillObjName()); + } + //批次号 + if (StringUtils.isNotBlank(query.getBatchNumber())) { + qw.like("wir.batchNumber", query.getBatchNumber()); + } + //来源单据编号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wir.billNo", query.getBillNo()); + } + //单据类型 + if (StringUtils.isNotBlank(query.getBillType())) { + qw.like("wir.billType", query.getBillType()); + } + //业务类型 + if (StringUtils.isNotBlank(query.getBusTypeValue())) { + qw.like("wir.busTypeValue", query.getBusTypeValue()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wir.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wir.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public List listExcel(WmsInventoryRecordsQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wir.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wir.goodsSpuName", query.getGoodsSpuName()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wir.goodsSkuCode", query.getGoodsSkuCode()); + } + //仓库名称 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wir.warehouseName", query.getWarehouseName()); + } + //库位编号 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wir.warehouseRackCode", query.getWarehouseRackCode()); + } + //客户/供应商名称 + if (StringUtils.isNotBlank(query.getBillObjName())) { + qw.like("wir.billObjName", query.getBillObjName()); + } + //批次号 + if (StringUtils.isNotBlank(query.getBatchNumber())) { + qw.like("wir.batchNumber", query.getBatchNumber()); + } + //来源单据编号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wir.billNo", query.getBillNo()); + } + //单据类型 + if (StringUtils.isNotBlank(query.getBillType())) { + qw.like("wir.billType", query.getBillType()); + } + //业务类型 + if (StringUtils.isNotBlank(query.getBusTypeValue())) { + qw.like("wir.busTypeValue", query.getBusTypeValue()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wir.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wir.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + List list = baseMapper.listExcel(qw); + list.removeAll(Collections.singleton(null)); + return list; + } + + public List getDetailsList(String sid) { + return baseMapper.getDetailsList(sid); + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordVo.java new file mode 100644 index 0000000000..4e8111cd15 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordVo.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: wms(yxt)
+ * File: WmsInventoryRecordVo.java
+ * Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecordVo
+ * Description: 库存出入库记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-08 17:27:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存出入库记录 视图数据对象", description = "库存出入库记录 视图数据对象") +public class WmsInventoryRecordVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("来源单sid(业务单sid)") + private String sourceBillSid; // 来源单sid(业务单sid) + @ApiModelProperty("来源单据编号") + private String billNo; // 来源单据编号 + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; // 单据类型(1入库、0出库) + @ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)") + private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等) + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商") + private String billObjSid; // 客户/供应商sid,出库是为客户,入库时为供应商 + @ApiModelProperty("客户/供应商名称") + private String billObjName; // 客户/供应商名称 + @ApiModelProperty("批次号") + private String batchNumber; // 批次号 + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("出入库后的库存量") + private BigDecimal currentCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位sid") + private String warehouseRackSid; // 库位sid + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsExcelVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsExcelVo.java new file mode 100644 index 0000000000..4b67ca4957 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsExcelVo.java @@ -0,0 +1,66 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsInventoryRecordsExcelVo { + + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ApiModelProperty("商品ID") + @ExportEntityMap(CnName = "商品ID", EnName = "goodsID") + private String goodsID; + @ApiModelProperty("商品名称") + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName; + @ApiModelProperty("商品编码") + @ExportEntityMap(CnName = "商品编码", EnName = "goodsSkuCode") + private String goodsSkuCode; + @ApiModelProperty("规格") + @ExportEntityMap(CnName = "规格", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; + @ApiModelProperty("单位") + @ExportEntityMap(CnName = "单位", EnName = "unit") + private String unit; + @ApiModelProperty("仓库") + @ExportEntityMap(CnName = "仓库", EnName = "warehouseName") + private String warehouseName; + @ApiModelProperty("库位") + @ExportEntityMap(CnName = "库位", EnName = "warehouseRackCode") + private String warehouseRackCode; + @ApiModelProperty("来源单号") + @ExportEntityMap(CnName = "来源单号", EnName = "billNo") + private String billNo; + + + @ApiModelProperty("单据类型(1入库、0出库)") + @ExportEntityMap(CnName = "单据类型", EnName = "billType") + private String billType; + @ExportEntityMap(CnName = "发生时间", EnName = "createTime") + private String createTime; + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + @ExportEntityMap(CnName = "业务类型", EnName = "busTypeValue") + private String busTypeValue; + @ApiModelProperty("客户/供应商名称") + @ExportEntityMap(CnName = "客户/供应商名称", EnName = "billObjName") + private String billObjName; + @ApiModelProperty("批次号") + @ExportEntityMap(CnName = "批次号", EnName = "batchNumber") + private String batchNumber; + @ApiModelProperty("数量") + @ExportEntityMap(CnName = "数量", EnName = "count") + private String count; + @ApiModelProperty("出入库后的库存量") + @ExportEntityMap(CnName = "出入库后的库存量", EnName = "currentCount") + private String currentCount; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsQuery.java new file mode 100644 index 0000000000..dbe71e0216 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsQuery.java @@ -0,0 +1,39 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsInventoryRecordsQuery implements Query { + + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("客户/供应商名称") + private String billObjName; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("来源单据编号") + private String billNo; + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; + @ApiModelProperty("发生开始时间") + private String createTimeStart; + @ApiModelProperty("发生结束时间") + private String createTimeEnd; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsVo.java new file mode 100644 index 0000000000..640b872590 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordsVo.java @@ -0,0 +1,46 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsInventoryRecordsVo { + + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("来源单据编号") + private String billNo; + @ApiModelProperty("单据类型(1入库、0出库)") + private String billType; + private String createTime; + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; + @ApiModelProperty("客户/供应商名称") + private String billObjName; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("出入库后的库存量") + private String currentCount; + @ApiModelProperty("数量") + private String count; + @ApiModelProperty("计量单位") + private String unit; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInAndOutboundVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInAndOutboundVo.java new file mode 100644 index 0000000000..5ed95ed88d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInAndOutboundVo.java @@ -0,0 +1,14 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/9 15:44 + */ +@Data +public class WmsInAndOutboundVo { + private String count; + private String billType; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountDetailsVo.java new file mode 100644 index 0000000000..81630909d1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountDetailsVo.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/8 17:49 + */ +@Data +public class WmsInventoryCountDetailsVo implements Vo { + + private String busTypeValue;//业务类型 + private String amountTax;//金额(含税) + private String amount;//金额 + private String count;//数量 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportQuery.java new file mode 100644 index 0000000000..2c2621ae22 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportQuery.java @@ -0,0 +1,19 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/8 17:48 + */ +@Data +public class WmsInventoryCountReportQuery implements Query { + + private String settleTime; + private String startDate; + private String endDate; + private String useOrgSid; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportVo.java new file mode 100644 index 0000000000..8f48525985 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryCountReportVo.java @@ -0,0 +1,29 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + + +/** + * @author Fan + * @description + * @date 2024/4/8 17:48 + */ +@Data +public class WmsInventoryCountReportVo implements Vo { + private String inItCount;//期初数量 + private String inItAmountTax;//期初金额(含税) + private String inItAmount;//期初金额 + private String inboundCount;//入库数量 + private String inboundAmountTax;//入库金额(含税) + private String inboundAmount;//入库金额 + private String outboundCount;//出库数量 + private String outboundAmountTax;//出库金额(含税) + private String outboundAmount;//出库金额 + private String changeCount;//变化数量 + private String changeAmountTax;//变化金额(含税) + private String changeAmount;//变化金额 + private String settleCount;//结存数量 + private String settleAmountTax;//结存金额(含税) + private String settleAmount;//结存金额 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordQuery.java new file mode 100644 index 0000000000..26cf4db24a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordQuery.java @@ -0,0 +1,24 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/9 8:56 + */ +@Data +public class WmsInventoryDetailsRecordQuery implements Query { + private String startDate; + private String endDate; + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordVo.java new file mode 100644 index 0000000000..35ed0e3efa --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/report/WmsInventoryDetailsRecordVo.java @@ -0,0 +1,43 @@ +package com.yxt.wms.biz.inventory.wmsinventoryrecord.report; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/4/9 8:56 + */ +@Data +public class WmsInventoryDetailsRecordVo implements Vo { + + + @ApiModelProperty("出入库时间") + private String createTime; // 出入库时间 + @ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)") + private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等) + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("出入库后的库存量") + private String currentCount; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("期初数量") + private String initCount; // 出入库后的库存量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库位编号") + private String warehouseRackCode; // 库位编号 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java new file mode 100644 index 0000000000..99125b2706 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:20 + */ +@Data +public class WmsInventorySettleRecordQuery implements Query { + + private String startDate; + private String endDate; + private String useOrgName; + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordVo.java new file mode 100644 index 0000000000..e6a2fff9c7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettleRecordVo.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:19 + */ +@Data +public class WmsInventorySettleRecordVo implements Vo { + + private String sid; + private String createByName; + private String createTime; + private String useOrgName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebill.java new file mode 100644 index 0000000000..563b994501 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebill.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebill.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebill
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单", description = "库存结算单") +@TableName("wms_inventory_settlebill") +public class WmsInventorySettlebill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settleStartTime; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settleEndTime; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java new file mode 100644 index 0000000000..8801afc9d7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillVo.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillVo
+ * Description: 库存结算单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 视图数据详情", description = "库存结算单 视图数据详情") +public class WmsInventorySettlebillDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDto.java new file mode 100644 index 0000000000..6dbe135290 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillDto.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDto.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillDto
+ * Description: 库存结算单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 数据传输对象", description = "库存结算单 数据传输对象") +public class WmsInventorySettlebillDto implements Dto { + + private String sid; + @ApiModelProperty("制单日期") + private String createTime; // 制单日期 + @ApiModelProperty("制单人sid") + private String createBySid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private String settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private String settleType; // 库存结算类型(1月结 2年结) + @ApiModelProperty("开始时间") + private String settleStartTime; // 开始时间 + @ApiModelProperty("结束时间") + private String settleEndTime; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.java new file mode 100644 index 0000000000..f82f21e343 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillMapper.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillMapper
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventorySettlebillMapper extends BaseMapper { + + //@Update("update wms_inventory_settlebill set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_settlebill") + List selectListVo(); + + List selInventoryForStettleBill(@Param("useOrgSid") String useOrgSid); + + String selLastNum(@Param("inventorySid") String inventorySid); + + IPage carryForwardList(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml new file mode 100644 index 0000000000..93c98a5847 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillQuery.java new file mode 100644 index 0000000000..1b716f637e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillQuery.java @@ -0,0 +1,79 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillQuery.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillQuery
+ * Description: 库存结算单 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 查询条件", description = "库存结算单 查询条件") +public class WmsInventorySettlebillQuery implements Query { + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillService.java new file mode 100644 index 0000000000..7367a53f44 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillService.java @@ -0,0 +1,157 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail.WmsInventorySettlebillDetail; +import com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillService.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillService
+ * Description: 库存结算单 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventorySettlebillService extends MybatisBaseService { + + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + + private QueryWrapper createQueryWrapper(WmsInventorySettlebillQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventorySettlebillQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventorySettlebillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventorySettlebillDto dto) { + WmsInventorySettlebill entity = new WmsInventorySettlebill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventorySettlebillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventorySettlebill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventorySettlebillDetailsVo fetchDetailsVoBySid(String sid) { + WmsInventorySettlebill entity = fetchBySid(sid); + WmsInventorySettlebillDetailsVo vo = new WmsInventorySettlebillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void saveSettlebill(WmsInventorySettlebillDto dto) { + WmsInventorySettlebill entity = new WmsInventorySettlebill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + String mainSid = entity.getSid(); + List wmsInventories = baseMapper.selInventoryForStettleBill(dto.getUseOrgSid()); + if (!wmsInventories.isEmpty()) { + for (WmsInventory w : wmsInventories) { + WmsInventorySettlebillDetail d = new WmsInventorySettlebillDetail(); + BeanUtil.copyProperties(w, d, "id", "sid"); + d.setBillSid(mainSid); + if (StringUtils.isNotBlank(dto.getSettleState())) { + d.setSettleType(Integer.parseInt(dto.getSettleType())); + } + d.setInventorySid(w.getSid()); + //查询上期库存 + String lastNum = baseMapper.selLastNum(w.getSid()); + if (StringUtils.isNotBlank(lastNum)) { + d.setPreBalance(new BigDecimal(lastNum)); + } + if (null != w.getCount()) { + d.setCurrentBalance(w.getCount()); + } + wmsInventorySettlebillDetailService.insert(d); + } + } + } + + public PagerVo carryForwardList(PagerQuery pq) { + WmsInventorySettleRecordQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("useOrgSid",query.getUseOrgSid()); + } + qw.apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getStartDate()), "date_format (createTime,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getEndDate()), "date_format (createTime,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.eq("1","1"); + qw.orderByDesc("createTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.carryForwardList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillVo.java new file mode 100644 index 0000000000..c8b7397f6c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebill/WmsInventorySettlebillVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebill; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillVo.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillVo
+ * Description: 库存结算单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 视图数据对象", description = "库存结算单 视图数据对象") +public class WmsInventorySettlebillVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java new file mode 100644 index 0000000000..aa483ab1d9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetail.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetail
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细", description = "库存结算明细") +@TableName("wms_inventory_settlebill_detail") +public class WmsInventorySettlebillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseAreaSid;//库区sid + private String warehouseArea;//库区名称 + private String warehouseRackSid;//货架sid + private String warehouseRackName;//货架名称 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java new file mode 100644 index 0000000000..7c2ba63bf1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailVo.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailVo
+ * Description: 库存结算明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 视图数据详情", description = "库存结算明细 视图数据详情") +public class WmsInventorySettlebillDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Date settleTypeStart; // 库存结算类型(1月结 2年结) + private Date settleTypeEnd; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品sid") + private String goodsSid; // 商品sid + @ApiModelProperty("商品编码") + private String goodsCode; // 商品编码 + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库编码") + private String warehouseCode; // 仓库编码 + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("货位sid") + private String warehouseAreasid; // 货位sid + @ApiModelProperty("货位编码") + private String warehouseAreaCode; // 货位编码 + @ApiModelProperty("货位名称") + private String warehouseAreaName; // 货位名称 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java new file mode 100644 index 0000000000..ad769d031e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailDto.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailDto
+ * Description: 库存结算明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 数据传输对象", description = "库存结算明细 数据传输对象") +public class WmsInventorySettlebillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Date settleTypeStart; // 库存结算类型(1月结 2年结) + private Date settleTypeEnd; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品sid") + private String goodsSid; // 商品sid + @ApiModelProperty("商品编码") + private String goodsCode; // 商品编码 + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库编码") + private String warehouseCode; // 仓库编码 + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("货位sid") + private String warehouseAreasid; // 货位sid + @ApiModelProperty("货位编码") + private String warehouseAreaCode; // 货位编码 + @ApiModelProperty("货位名称") + private String warehouseAreaName; // 货位名称 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java new file mode 100644 index 0000000000..a8acabbff4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailMapper.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailMapper
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventorySettlebillDetailMapper extends BaseMapper { + + //@Update("update wms_inventory_settlebill_detail set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_settlebill_detail") + List selectListVo(); + + @Delete("delete from wms_inventory_settlebill_detail where billSid = #{sid}") + void delByMainSid(String sid); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml new file mode 100644 index 0000000000..ad01893b3c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml @@ -0,0 +1,60 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java new file mode 100644 index 0000000000..4a8f5f6246 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailQuery.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailQuery
+ * Description: 库存结算明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 查询条件", description = "库存结算明细 查询条件") +public class WmsInventorySettlebillDetailQuery implements Query { + + private String goodsSpuName;//商品名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseName;//仓库名称 + private String warehouseArea;//库区名称 + private String warehouseRackName;//货架名称 + private String useOrgSid; + private String startDate; + private String endDate; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java new file mode 100644 index 0000000000..8b2ea95924 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java @@ -0,0 +1,130 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailService.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService
+ * Description: 库存结算明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventorySettlebillDetailService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(WmsInventorySettlebillDetailQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("s.useOrgSid", query.getUseOrgSid()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("d.goodsSpuName", query.getGoodsSpuName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("d.warehouseName", query.getWarehouseName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("d.goodsSkuCode", query.getGoodsSkuCode()); + } + qw.apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getStartDate()), "date_format (s.createTime,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getEndDate()), "date_format (s.createTime,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.eq("1", "1"); + qw.orderByDesc("s.createTime"); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventorySettlebillDetailQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventorySettlebillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventorySettlebillDetailDto dto){ + WmsInventorySettlebillDetail entity = new WmsInventorySettlebillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventorySettlebillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventorySettlebillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventorySettlebillDetailDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventorySettlebillDetail entity = fetchBySid(sid); + WmsInventorySettlebillDetailDetailsVo vo = new WmsInventorySettlebillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String sid) { + baseMapper.delByMainSid(sid); + } + + public List listExcel(WmsInventorySettlebillDetailQuery query) { + QueryWrapper qw = createQueryWrapper(query); + List list = baseMapper.listExcel(qw); + return list; + } +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java new file mode 100644 index 0000000000..469c66b5b4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailVo.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailVo
+ * Description: 库存结算明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 视图数据对象", description = "库存结算明细 视图数据对象") +public class WmsInventorySettlebillDetailVo implements Vo { + + private String sid; // sid + private String createTime; //结转日期 + @ApiModelProperty("库存结算类型(1月结 2年结)") + private String settleType; // 库存结算类型(1月结 2年结) + private String goodsSpuName;//商品名称 + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseName;//仓库名称 + private String warehouseArea;//库区名称 + private String warehouseRackName;//货架名称 + @ApiModelProperty("上期结存") + private String preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private String currentBalance; // 本期结存 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java new file mode 100644 index 0000000000..42e1d154f9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsinventorysettlebilldetail; + +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:42 + */ +@Data +public class WmsInventorySettlebillExportVo { + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "结转日期", EnName = "createTime") + private String createTime; //结转日期 + @ExportEntityMap(CnName = "库存结算类型", EnName = "settleType") + private String settleType; // 库存结算类型(1月结 2年结) + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName;//商品名称 + @ExportEntityMap(CnName = "商品Sku名称", EnName = "goodsSkuTitle") + private String goodsSkuTitle;//商品Sku名称 + @ExportEntityMap(CnName = "零件号", EnName = "goodsSkuCode") + private String goodsSkuCode;//零件号 + @ExportEntityMap(CnName = "规格型号", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; //规格型号 + @ExportEntityMap(CnName = "仓库名称", EnName = "warehouseName") + private String warehouseName;//仓库名称 + @ExportEntityMap(CnName = "库区名称", EnName = "warehouseArea") + private String warehouseArea;//库区名称 + @ExportEntityMap(CnName = "货架名称", EnName = "warehouseRackName") + private String warehouseRackName;//货架名称 + @ExportEntityMap(CnName = "上期结存", EnName = "preBalance") + private String preBalance; // 上期结存 + @ExportEntityMap(CnName = "本期结存", EnName = "currentBalance") + private String currentBalance; // 本期结存 +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventory.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventory.java new file mode 100644 index 0000000000..780f8558b0 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventory.java @@ -0,0 +1,58 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventory extends BaseEntity { + + //商品ID + private String goodsID; + + //商品名称 + private String goodsSkuTitle; + + //商品编码 + private String goodsSkuCode; + + //厂家 + private String manufacturerName; + + //规格 + private String goodsSkuOwnSpec; + + //单位 + private String unit; + + //数量 + private String count; + + //已入库数量 + private String inCount; + + //维修工单编号 + private String billNo; + + //客户名称 + private String customerName; + + //车牌号 + private String vehMark; + + //车架号 + private String vinNo; + + //旧件回收说明 + private String shortss; + + //旧件照片 + private String photos; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsListVo.java new file mode 100644 index 0000000000..6ca84672cb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsListVo.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryDetailsListVo { + + //来源单号 + private String billNo; + + //单据类型 + private String billType; + + //发生时间 + private String createTime; + + //业务类型 + private String busTypeValue; + + //数量 + private String count; + + //出入库后的库存 + private String currentCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsVo.java new file mode 100644 index 0000000000..f9c74be695 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDetailsVo.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryDetailsVo { + + //车架号 + private String vinNo; + + //商品名称 + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //厂家 + private String manufacturerName; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDto.java new file mode 100644 index 0000000000..6a291b4a0b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryDto.java @@ -0,0 +1,41 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryDto { + private String sid; + //商品基础信息sid + private String goodSpuSid; + //商品名称 + private String goodsSpuName; + //商品Skusid + private String goodsSkuSid; + //商品Sku名称 + private String goodsSkuTitle; + //商品编码(图号) + private String goodsSkuCode; + //规格型号 + private String goodsSkuOwnSpec; + //计量单位 + private String unit; + //未入库数量 + private String notInCount; + //仓库 + private String warehouseSid; + private String warehouseName; + //库位 + private String warehouseRackSid; + private String warehouseRackCode; + //入库数量(现有量) + private String count; + + private String createBySid; + private String orgPath; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryExcelVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryExcelVo.java new file mode 100644 index 0000000000..6ecff78045 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryExcelVo.java @@ -0,0 +1,60 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.utils.ExportEntityMap; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryExcelVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + + //车架号 + @ExportEntityMap(CnName = "车架号", EnName = "vinNo") + private String vinNo; + + //车牌号 + @ExportEntityMap(CnName = "车牌号", EnName = "vehMark") + private String vehMark; + + //商品ID + @ExportEntityMap(CnName = "商品ID", EnName = "goodsID") + private String goodsID; + + //商品名称 + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName; + + //商品编码 + @ExportEntityMap(CnName = "商品编码", EnName = "goodsSkuCode") + private String goodsSkuCode; + + //厂家 + @ExportEntityMap(CnName = "厂家", EnName = "manufacturerName") + private String manufacturerName; + + //规格 + @ExportEntityMap(CnName = "规格", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; + + //单位 + @ExportEntityMap(CnName = "单位", EnName = "unit") + private String unit; + + //仓库 + @ExportEntityMap(CnName = "仓库", EnName = "warehouseName") + private String warehouseName; + + //库位 + @ExportEntityMap(CnName = "库位", EnName = "warehouseRackCode") + private String warehouseRackCode; + + //库存数量 + @ExportEntityMap(CnName = "库存数量", EnName = "inventoryCount") + private String inventoryCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryInitVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryInitVo.java new file mode 100644 index 0000000000..fc43bc4682 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryInitVo.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryInitVo { + + //维修工单编号 + private String sourceBillNo; + //车架号 + private String vinNo; + private String goodSpuSid; + //商品名称 + private String goodsSpuName; + private String goodsSkuSid; + private String goodsSkuTitle; + //商品编码 + private String goodsSkuCode; + //厂家 + private String manufacturerName; + //规格 + private String goodsSkuOwnSpec; + + //单位 + private String unit; + + //未入库数量 + private String notInCount; + + //仓库 + private String warehouseSid; + private String warehouseName; + + //库位 + private String warehouseRackSid; + private String warehouseRackCode; + + //入库数量 + private String count; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.java new file mode 100644 index 0000000000..26f92419b2 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Mapper +public interface WmsOldInventoryMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + WmsOldInventoryInitVo selectInit(String sid); + + IPage oldPageList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); + + WmsOldInventoryDetailsVo getDetailsList(String sid); + + IPage recordList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List excelRecordList(@Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.xml new file mode 100644 index 0000000000..765e2b19b4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListQuery.java new file mode 100644 index 0000000000..d0d91b1197 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListQuery.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryPageListQuery implements Query { + + //商品id + private String goodsID; + + //商品名称 + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + //厂家 + private String manufacturerName; + + //车架号 + private String vinNo; + + private String createBySid; + + private String orgPath; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListVo.java new file mode 100644 index 0000000000..390917b32c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryPageListVo.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryPageListVo { + private String sid; + //车架号 + private String vinNo; + + //车牌号 + private String vehMark; + + //商品ID + private String goodsID; + + //商品名称 + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //厂家 + private String manufacturerName; + + //规格 + private String goodsSkuOwnSpec; + + //单位 + private String unit; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + //库存数量 + private String inventoryCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryQuery.java new file mode 100644 index 0000000000..e38c3c958d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryQuery.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryQuery implements Query { + + //商品名称 + private String goodsSpuName; + //商品编码 + private String goodsSkuCode; + //维修工单编号 + private String billNo; + //车牌号 + private String vehMark; + //用户sid + private String createBySid; + //全组织路径sid + private String orgPath; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordList.java new file mode 100644 index 0000000000..3070cb7c8f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordList.java @@ -0,0 +1,57 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryRecordList { + + //车架号 + private String vinNo; + + //商品ID + private String goodsID; + + //商品名称 + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //厂家 + private String manufacturerName; + + //规格 + private String goodsSkuOwnSpec; + + //单位 + private String unit; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + //来源单号 + private String billNo; + + //单据类型 + private String billType; + + //发生时间 + private String createTime; + + //业务类型 + private String busTypeValue; + + //数量 + private String count; + + //出入库后的库存 + private String currentCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListExcelVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListExcelVo.java new file mode 100644 index 0000000000..a152cbec2c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListExcelVo.java @@ -0,0 +1,76 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.utils.ExportEntityMap; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryRecordListExcelVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + + //车架号 + @ExportEntityMap(CnName = "车架号", EnName = "vinNo") + private String vinNo; + + //商品ID + @ExportEntityMap(CnName = "商品ID", EnName = "goodsID") + private String goodsID; + + //商品名称 + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName; + + //商品编码 + @ExportEntityMap(CnName = "商品编码", EnName = "goodsSkuCode") + private String goodsSkuCode; + + //厂家 + @ExportEntityMap(CnName = "厂家", EnName = "manufacturerName") + private String manufacturerName; + + //规格 + @ExportEntityMap(CnName = "规格", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; + + //单位 + @ExportEntityMap(CnName = "单位", EnName = "unit") + private String unit; + + //仓库 + @ExportEntityMap(CnName = "仓库", EnName = "warehouseName") + private String warehouseName; + + //库位 + @ExportEntityMap(CnName = "库位", EnName = "warehouseRackCode") + private String warehouseRackCode; + + //来源单号 + @ExportEntityMap(CnName = "来源单号", EnName = "billNo") + private String billNo; + + //单据类型 + @ExportEntityMap(CnName = "单据类型", EnName = "billType") + private String billType; + + //发生时间 + @ExportEntityMap(CnName = "发生时间", EnName = "createTime") + private String createTime; + + //业务类型 + @ExportEntityMap(CnName = "业务类型", EnName = "busTypeValue") + private String busTypeValue; + + //数量 + @ExportEntityMap(CnName = "数量", EnName = "count") + private String count; + + //出入库后的库存 + @ExportEntityMap(CnName = "出入库后的库存", EnName = "currentCount") + private String currentCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListQuery.java new file mode 100644 index 0000000000..2aeefff362 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryRecordListQuery.java @@ -0,0 +1,49 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryRecordListQuery implements Query { + + //商品ID + private String goodsID; + + //商品名称 + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + //厂家 + private String manufacturerName; + + //车架号 + private String vinNo; + + //来源单号 + private String billNo; + + //单据类型 + private String billType; + + //业务类型 + private String busTypeValue; + + //发生时间开始时间 + private String createTimeStart; + + //发生时间结束时间 + private String createTimeEnd; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryService.java new file mode 100644 index 0000000000..38af103bd6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryService.java @@ -0,0 +1,264 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Service +public class WmsOldInventoryService extends MybatisBaseService { + + @Autowired + private WmsInventoryService wmsInventoryService; + @Autowired + private WmsInventoryRecordService wmsInventoryRecordService; + + public PagerVo listPage(PagerQuery pagerQuery) { + WmsOldInventoryQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("woi.billNo", query.getBillNo()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("woi.goodsSpuName", query.getGoodsSpuName()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("woi.goodsSkuCode", query.getGoodsSkuCode()); + } + //车牌号 + if (StringUtils.isNotBlank(query.getVehMark())) { + qw.like("woi.vehMark", query.getVehMark()); + } + qw.eq("woi.state", 1); + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean getInit(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsOldInventoryInitVo wmsOldInventoryInitVo = baseMapper.selectInit(sid); + if (wmsOldInventoryInitVo == null) { + return rb.setMsg("该待入库旧件不存在"); + } + return rb.success().setData(wmsOldInventoryInitVo); + } + + public ResultBean saveInventory(WmsOldInventoryDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + WmsOldInventory wmsOldInventory = fetchBySid(sid); + WmsInventory wmsInventory = new WmsInventory(); + BeanUtil.copyProperties(dto, wmsInventory, "sid"); + wmsInventoryService.insert(wmsInventory); + //入库后,修改待入库旧件为已入库 + wmsOldInventory.setState(0); + baseMapper.updateById(wmsOldInventory); + return rb.success(); + } + + public PagerVo oldPageList(PagerQuery pagerQuery) { + WmsOldInventoryPageListQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wi.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wi.goodsSpuName", query.getGoodsSpuName()); + } + //仓库 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wi.warehouseName", query.getWarehouseName()); + } + //库位 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wi.warehouseRackCode", query.getWarehouseRackCode()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wi.goodsSkuCode", query.getGoodsSkuCode()); + } + //ToDo:需测试时添加,待定 + //厂家 + //车架号 + //车牌号 + + qw.eq("wi.warehouseName", "旧件仓库"); + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.oldPageList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean delAllBySids(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + List sidss = Arrays.asList(sids); + for (int i = 0; i < sidss.size(); i++) { + WmsInventory wmsInventory = wmsInventoryService.fetchBySid(sidss.get(i)); + if (wmsInventory.getCount().compareTo(BigDecimal.ZERO) != 0) { + wmsInventoryService.deleteBySid(sidss.get(i)); + } + } + return rb.success().setMsg("删除成功"); + } + + public List listExcel(WmsOldInventoryPageListQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wi.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wi.goodsSpuName", query.getGoodsSpuName()); + } + //仓库 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wi.warehouseName", query.getWarehouseName()); + } + //库位 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wi.warehouseRackCode", query.getWarehouseRackCode()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wi.goodsSkuCode", query.getGoodsSkuCode()); + } + //ToDo:需测试时添加,待定 + //厂家 + //车架号 + //车牌号 + + qw.eq("wi.warehouseName", "旧件仓库"); + List list = baseMapper.listExcel(qw); + list.removeAll(Collections.singleton(null)); + return list; + } + + public ResultBean getDetailsList(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsOldInventoryDetailsVo wmsOldInventoryDetailsVo = baseMapper.getDetailsList(sid); + if (wmsOldInventoryDetailsVo != null) { + List list = wmsInventoryRecordService.getDetailsList(sid); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + wmsOldInventoryDetailsVo.setList(list); + } + } + return rb.success().setData(wmsOldInventoryDetailsVo); + } + + public PagerVo recordList(PagerQuery pagerQuery) { + WmsOldInventoryRecordListQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wir.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wir.goodsSpuName", query.getGoodsSpuName()); + } + //仓库 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wir.warehouseName", query.getWarehouseName()); + } + //库位 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wir.warehouseRackCode", query.getWarehouseRackCode()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wir.goodsSkuCode", query.getGoodsSkuCode()); + } + //ToDo:需测试时添加,待定 + //厂家 + //车架号 + //来源单号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wir.billNo", query.getBillNo()); + } + //单据类型 + if (StringUtils.isNotBlank(query.getBillType())) { + qw.like("wir.billType", query.getBillType()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wir.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wir.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + qw.eq("wir.warehouseName", "旧件仓库"); + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.recordList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public List excelRecordList(WmsOldInventoryRecordListQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsID())) { + qw.like("wir.goodsID", query.getGoodsID()); + } + //商品名称 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wir.goodsSpuName", query.getGoodsSpuName()); + } + //仓库 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wir.warehouseName", query.getWarehouseName()); + } + //库位 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wir.warehouseRackCode", query.getWarehouseRackCode()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wir.goodsSkuCode", query.getGoodsSkuCode()); + } + //ToDo:需测试时添加,待定 + //厂家 + //车架号 + //来源单号 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wir.billNo", query.getBillNo()); + } + //单据类型 + if (StringUtils.isNotBlank(query.getBillType())) { + qw.like("wir.billType", query.getBillType()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wir.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wir.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + qw.eq("wir.warehouseName", "旧件仓库"); + List list = baseMapper.excelRecordList(qw); + list.removeAll(Collections.singleton(null)); + return list; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryVo.java new file mode 100644 index 0000000000..e0256ddf0a --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldinventory/WmsOldInventoryVo.java @@ -0,0 +1,60 @@ +package com.yxt.wms.biz.inventory.wmsoldinventory; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/28 + **/ +@Data +public class WmsOldInventoryVo { + + private String sid; + + //商品ID + private String goodsID; + + //商品名称 + private String goodsSkuTitle; + + //商品编码 + private String goodsSkuCode; + + //厂家 + private String manufacturerName; + + //规格 + private String goodsSkuOwnSpec; + + //单位 + private String unit; + + //数量 + private String count; + + //已入库数量 + private String inCount; + + //维修工单编号 + private String billNo; + + //客户名称 + private String customerName; + + //车牌号 + private String vehMark; + + //车架号 + private String vinNo; + + //旧件回收说明 + private String shortss; + private String photos; + + //旧件照片 + private List photosList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegister.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegister.java new file mode 100644 index 0000000000..cb2990fc50 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegister.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOldRegister extends BaseEntity { + + //维修工单编号 + private String billNo; + //工单创建日期 + private String billTime; + //客户sid + private String customerSid; + //客户名称 + private String customerName; + //车牌号 + private String vehMark; + //车架号 + private String vinNo; + //旧件回收说明 + private String shortss; + //旧件照片 + private String photos; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterDto.java new file mode 100644 index 0000000000..0a303f9726 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterDto.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOldRegisterDto { + + //维修工单编号 + private String billNo; + //工单创建日期 + private String billTime; + //客户sid + private String customerSid; + //客户名称 + private String customerName; + //车牌号 + private String vehMark; + //车架号 + private String vinNo; + //旧件回收说明 + private String shortss; + //旧件照片 + private List photos = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.java new file mode 100644 index 0000000000..e57b4a9d2d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.java @@ -0,0 +1,14 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Mapper +public interface WmsOldRegisterMapper extends BaseMapper { + WmsOldRegister selectByBillNo(String billNo); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.xml new file mode 100644 index 0000000000..e3b5d2c699 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterMapper.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterQuery.java new file mode 100644 index 0000000000..bf6bb7c7da --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterQuery.java @@ -0,0 +1,25 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOldRegisterQuery implements Query { + + //维修工单编号 + private String billNo; + + //工单创建开始时间 + private String createTimeStart; + + //工单创建结束时间 + private String createTimeEnd; + + //车牌号 + private String vehMark; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterService.java new file mode 100644 index 0000000000..3adb3a865b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterService.java @@ -0,0 +1,44 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Service +public class WmsOldRegisterService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + + public ResultBean saveorUpdateOldRegister(WmsOldRegisterDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsOldRegister wmsOldRegister = baseMapper.selectByBillNo(dto.getBillNo()); + if (wmsOldRegister == null) { + wmsOldRegister = new WmsOldRegister(); + BeanUtil.copyProperties(dto, wmsOldRegister, "sid"); + List photos = dto.getPhotos(); + String photoss = String.join(",", photos).replaceAll(fileUploadComponent.getUrlPrefix(), ""); + wmsOldRegister.setPhotos(photoss); + baseMapper.insert(wmsOldRegister); + } else { + BeanUtil.copyProperties(dto, wmsOldRegister); + List photos = dto.getPhotos(); + String photoss = String.join(",", photos).replaceAll(fileUploadComponent.getUrlPrefix(), ""); + wmsOldRegister.setPhotos(photoss); + baseMapper.updateById(wmsOldRegister); + } + return rb.success(); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterVo.java new file mode 100644 index 0000000000..761ac8cf7c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoldregister/WmsOldRegisterVo.java @@ -0,0 +1,29 @@ +package com.yxt.wms.biz.inventory.wmsoldregister; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOldRegisterVo { + + //维修工单编号 + private String billNo; + //工单创建日期 + private String billTime; + //客户sid + private String customerSid; + //客户名称 + private String customerName; + //车牌号 + private String vehMark; + //车架号 + private String vinNo; + //旧件回收说明 + private String shortss; + //旧件照片 + private String photos; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBill.java new file mode 100644 index 0000000000..568314eb72 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBill.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBill extends BaseEntity { + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("业务类型key") + private String busTypeKey; + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner; + @ApiModelProperty("已完成/已发货") + private Integer billState; + @ApiModelProperty("是否一起发货(否0,是1)") + private Integer isTogether; + @ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") + private Integer isHandUp; + @ApiModelProperty("优先级") + private Integer priority; + @ApiModelProperty("实际发货时间") + private Date actualDeliveTime; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDetailsVo.java new file mode 100644 index 0000000000..0421a4354f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDetailsVo.java @@ -0,0 +1,39 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillDetailsVo { + + private String sid; + @ApiModelProperty("创建人sid") + private String createBySid; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("外部单号") + private String sourceBillNo; + + @ApiModelProperty("业务类型key") + private String busTypeKey; + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + + @ApiModelProperty("单据状态") + private String billState; + @ApiModelProperty("备注") + private String remarks; + + private List detailsList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDto.java new file mode 100644 index 0000000000..cd3f640667 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillDto.java @@ -0,0 +1,41 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillDto { + + private String sid; + @ApiModelProperty("创建人sid") + private String createBySid; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("外部单号") + private String sourceBillNo; + + @ApiModelProperty("业务类型key") + private String busTypeKey; + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + + @ApiModelProperty("单据状态") + private String billState; + @ApiModelProperty("备注") + private String remarks; + + private List detailsList = new ArrayList<>(); + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryQuery.java new file mode 100644 index 0000000000..e05d2c2be4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryQuery.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOutBillInventoryQuery implements Query { + + //商品名称 + @ApiModelProperty("商品名称") + private String goodsSpuName; + + //商品编码 + private String goodsSkuCode; + + //仓库 + private String warehouseName; + + //库位 + private String warehouseRackCode; + + //供应商 + private String supplierName; + + private String orgPath; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryVo.java new file mode 100644 index 0000000000..0d49800d5e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillInventoryVo.java @@ -0,0 +1,49 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/26 + **/ +@Data +public class WmsOutBillInventoryVo { + private String sid; + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + + + //入库单价 + private String money; + //库存数量 + private String count; + //供应商 + private String supplierSid; + private String supplierName; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.java new file mode 100644 index 0000000000..ea0e61e253 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.java @@ -0,0 +1,22 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Mapper +public interface WmsOutBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + WmsOutBillDetailsVo details(String sid); + + IPage getInventoryList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.xml new file mode 100644 index 0000000000..4dfcdd71fb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillQuery.java new file mode 100644 index 0000000000..270fb877fb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillQuery.java @@ -0,0 +1,31 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillQuery implements Query { + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期开始时间") + private String createTimeStart; + @ApiModelProperty("单据日期结束时间") + private String createTimeEnd; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + @ApiModelProperty("单据状态") + private String billState; + @ApiModelProperty("组织sid全路径") + private String orgPath; + @ApiModelProperty("用户sid") + private String createBySid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java new file mode 100644 index 0000000000..a6fcec6f88 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java @@ -0,0 +1,197 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventorySaveDto; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordDto; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; +import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetail; +import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailDto; +import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailService; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBill; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillPageVo; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillQuery; +import com.yxt.wms.biz.inventory.wmsshelfbill.WmsShelfBill; +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.WmsShelfBillDetail; +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.WmsShelfBillDetailVos; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.Collections; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Service +public class WmsOutBillService extends MybatisBaseService { + + @Autowired + private WmsOutBillDetailService wmsOutBillDetailService; + @Autowired + private WmsInventoryService wmsInventoryService; + @Autowired + private WmsInventoryRecordService wmsInventoryRecordService; + + public PagerVo listPage(PagerQuery pagerQuery) { + WmsOutBillQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wob.billNo", query.getBillNo()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wob.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wob.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + //来源单号 + if (StringUtils.isNotBlank(query.getSourceBillNo())) { + qw.like("wob.sourceBillNo", query.getSourceBillNo()); + } + //业务类型 + if (StringUtils.isNotBlank(query.getBusTypeValue())) { + qw.like("wob.busTypeValue", query.getBusTypeValue()); + } + //单据类型 + if (StringUtils.isNotBlank(query.getBillState())) { + qw.like("wob.billState", query.getBillState()); + } + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateOutBill(WmsOutBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsOutBill wmsOutBill = new WmsOutBill(); + BeanUtil.copyProperties(dto, wmsOutBill, "sid"); + sid = wmsOutBill.getSid(); + List detailsList = dto.getDetailsList(); + detailsList.removeAll(Collections.singleton(null)); + if (detailsList.size() > 0) { + wmsOutBillDetailService.saveOrUpdateBillDetails(sid, detailsList); + } + baseMapper.insert(wmsOutBill); + } else { + WmsOutBill wmsOutBill = fetchBySid(sid); + if (wmsOutBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsOutBill, "sid"); + List detailsList = dto.getDetailsList(); + detailsList.removeAll(Collections.singleton(null)); + if (detailsList.size() > 0) { + wmsOutBillDetailService.saveOrUpdateBillDetails(sid, detailsList); + } + baseMapper.updateById(wmsOutBill); + } + return rb.success().setData(sid); + } + + public ResultBean details(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsOutBillDetailsVo wmsOutBillDetailsVo = baseMapper.details(sid); + if (wmsOutBillDetailsVo == null) { + return rb.setMsg("该单据不存在"); + } + //ToDo:需补充仓库等信息 + List detailsList = wmsOutBillDetailService.selectDetailsList(sid); + detailsList.removeAll(Collections.singleton(null)); + if (!detailsList.isEmpty()) { + wmsOutBillDetailsVo.setDetailsList(detailsList); + } + return rb.success().setData(wmsOutBillDetailsVo); + } + + public PagerVo getInventoryList(PagerQuery pagerQuery) { + WmsOutBillInventoryQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("wi.goodsSpuName", query.getGoodsSpuName()); + } + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("wi.goodsSkuCode", query.getGoodsSkuCode()); + } + //仓库 + if (StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("wi.warehouseName", query.getWarehouseName()); + } + //库位 + if (StringUtils.isNotBlank(query.getWarehouseRackCode())) { + qw.like("wi.warehouseRackCode", query.getWarehouseRackCode()); + } + //ToDo:供应商 + /* if (StringUtils.isNotBlank(query.getSupplierName())) { + qw.like("supplierName", query.getSupplierName()); + }*/ + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.getInventoryList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean confirm(WmsOutBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = saveOrUpdateOutBill(dto).getData(); + List detailsList = dto.getDetailsList(); + detailsList.removeAll(Collections.singleton(null)); + if (!detailsList.isEmpty()) { + for (int i = 0; i < detailsList.size(); i++) { + WmsOutBillDetailDto wmsOutBillDetailDto = detailsList.get(i); + WmsInventory wmsInventory = wmsInventoryService.fetchBySid(wmsOutBillDetailDto.getInventorySid()); + //减去出库的数量 + wmsInventory.setCount(wmsInventory.getCount().subtract(new BigDecimal(wmsOutBillDetailDto.getOutCount()))); + wmsInventoryService.updateById(wmsInventory); + } + saveWmsInventory(dto.getSid()); + } + return rb.success(); + } + + public void saveWmsInventory(String sid) { + WmsOutBill wmsOutBill = fetchBySid(sid); + List detailList = wmsOutBillDetailService.selectDetailsList(sid); + detailList.removeAll(Collections.singleton(null)); + if (!detailList.isEmpty()) { + for (int i = 0; i < detailList.size(); i++) { + WmsOutBillDetailDto wmsOutBillDetailDto = detailList.get(i); + WmsInventoryRecordDto wmsInventoryRecordDto = new WmsInventoryRecordDto(); + wmsInventoryRecordDto.setInventorySid(wmsOutBillDetailDto.getInventorySid()); + wmsInventoryRecordDto.setGoodsID(wmsInventoryRecordDto.getGoodsID()); + wmsInventoryRecordDto.setSourceBillSid(wmsOutBill.getSid()); + wmsInventoryRecordDto.setBillNo(wmsOutBill.getBillNo()); + wmsInventoryRecordDto.setBillType("0"); + wmsInventoryRecordDto.setBatchNumber(wmsInventoryRecordDto.getBatchNumber()); + wmsInventoryRecordDto.setGoodSpuSid(wmsInventoryRecordDto.getGoodSpuSid()); + wmsInventoryRecordDto.setGoodsSpuName(wmsInventoryRecordDto.getGoodsSpuName()); + wmsInventoryRecordDto.setGoodsSkuSid(wmsInventoryRecordDto.getGoodsSkuSid()); + wmsInventoryRecordDto.setGoodsSkuCode(wmsInventoryRecordDto.getGoodsSkuCode()); + wmsInventoryRecordDto.setUnit(wmsInventoryRecordDto.getUnit()); + wmsInventoryRecordDto.setCurrentCount(StringUtils.isNotBlank(wmsInventoryRecordDto.getCount().toString()) ? new BigDecimal(wmsInventoryRecordDto.getCount().toString()) : BigDecimal.ZERO); + wmsInventoryRecordDto.setWarehouseSid(wmsInventoryRecordDto.getWarehouseSid()); + wmsInventoryRecordDto.setWarehouseName(wmsInventoryRecordDto.getWarehouseName()); + wmsInventoryRecordDto.setWarehouseRackSid(wmsInventoryRecordDto.getWarehouseRackSid()); + wmsInventoryRecordDto.setWarehouseRackCode(wmsInventoryRecordDto.getWarehouseRackCode()); + wmsInventoryRecordService.saveOrUpdateDto(wmsInventoryRecordDto); + } + } + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillVo.java new file mode 100644 index 0000000000..bb3292cef5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillVo.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsoutbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillVo { + + private String sid; + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("业务类型value((销售出库、采购退货出库等))") + private String busTypeValue; + @ApiModelProperty("单据状态:已完成/已发货") + private String billState; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetail.java new file mode 100644 index 0000000000..75f41d561c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetail.java @@ -0,0 +1,50 @@ +package com.yxt.wms.biz.inventory.wmsoutbilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.bouncycastle.cms.PasswordRecipientId; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillDetail extends BaseEntity { + @ApiModelProperty("单据sid") + private String billSid; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("订单数量") + private BigDecimal orderCount; + @ApiModelProperty("未结数量") + private BigDecimal remainingCount; + @ApiModelProperty("调整数量") + private BigDecimal adjustCount; + @ApiModelProperty("分配数量") + private BigDecimal distributeCount; + @ApiModelProperty("发货数量") + private BigDecimal deliveryCount; + @ApiModelProperty("状态(新建/已发货完成、部分分配、全部分配等)") + private Integer billState; + @ApiModelProperty("发货时间") + private Date deliveTime; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailDto.java new file mode 100644 index 0000000000..1eccd72bd3 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailDto.java @@ -0,0 +1,53 @@ +package com.yxt.wms.biz.inventory.wmsoutbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/24 + **/ +@Data +public class WmsOutBillDetailDto { + + private String sid; + @ApiModelProperty("库存商品sid") + private String inventorySid; + + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + + + @ApiModelProperty("出库数量") + private String outCount; + @ApiModelProperty("仓库sid") + private String warehouseSid; + //仓库名称 + private String warehouseName; + //库位sid + private String warehouseRackSid; + //库位编码 + private String warehouseRackCode; + //销售单价 + private String money; + //金额 + private String moneyAll; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.java new file mode 100644 index 0000000000..5e6aade279 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsoutbilldetail; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/29 + **/ +@Mapper +public interface WmsOutBillDetailMapper extends BaseMapper { + int deleteByMainSid(String sid); + + List selectDetailsList(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.xml new file mode 100644 index 0000000000..33833d632c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailMapper.xml @@ -0,0 +1,21 @@ + + + + + delete + from wms_out_bill_detail + where billSid = #{sid} + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailService.java new file mode 100644 index 0000000000..0b3d59544c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbilldetail/WmsOutBillDetailService.java @@ -0,0 +1,31 @@ +package com.yxt.wms.biz.inventory.wmsoutbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.service.MybatisBaseService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/29 + **/ +@Service +public class WmsOutBillDetailService extends MybatisBaseService { + public void saveOrUpdateBillDetails(String sid, List detailsList) { + //删除 + baseMapper.deleteByMainSid(sid); + for (int i = 0; i < detailsList.size(); i++) { + WmsOutBillDetailDto wmsOutBillDetailDto = detailsList.get(i); + WmsOutBillDetail wmsOutBillDetail = new WmsOutBillDetail(); + BeanUtil.copyProperties(wmsOutBillDetailDto, wmsOutBillDetail, "sid"); + wmsOutBillDetail.setBillSid(sid); + baseMapper.insert(wmsOutBillDetail); + } + } + + public List selectDetailsList(String sid) { + return baseMapper.selectDetailsList(sid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBill.java new file mode 100644 index 0000000000..c0b6c6bda8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBill.java @@ -0,0 +1,45 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Data +public class WmsReceiptBill extends BaseEntity { + + @ApiModelProperty("来源单sid(asn单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("业务类型key(采购入库、销售退库等)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner; + @ApiModelProperty("到货日期") + private Date deliveryDate; + @ApiModelProperty("待收货/部分收货/已收货(默认)") + private String billState; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto.java new file mode 100644 index 0000000000..7a32365c9c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto.java @@ -0,0 +1,58 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetail; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/7 + **/ +@Data +public class WmsReceiptBillDto { + + private String sid; + @ApiModelProperty("来源单sid(asn单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("业务类型key(采购入库、销售退库等)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + /* @ApiModelProperty("货主sid") + private String goodsOwnerSid; + @ApiModelProperty("货主") + private String goodsOwner;*/ + @ApiModelProperty("到货日期") + private Date deliveryDate; + //单据状态:新建/已完成 + @ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)") + private String billState; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + + private List list = new ArrayList<>(); + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto2.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto2.java new file mode 100644 index 0000000000..68d80baf2c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillDto2.java @@ -0,0 +1,56 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsReceiptBillDto2 { + + private String sid; + @ApiModelProperty("来源单sid(asn单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("业务类型key(采购入库、销售退库等)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("到货日期") + private String deliveryDate; + //单据状态:新建/已完成 + @ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)") + private String billState; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("商品列表") + private List list = new ArrayList<>(); + @ApiModelProperty("批次列表") + private List pcList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillInitVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillInitVo.java new file mode 100644 index 0000000000..f6448d5567 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillInitVo.java @@ -0,0 +1,56 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsReceiptBillInitVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("来源单sid(asn单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("业务类型key(采购入库、销售退库等)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("到货日期") + private String deliveryDate; + //单据状态:新建/已完成 + @ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)") + private String billState; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("商品列表") + private List list = new ArrayList<>(); + @ApiModelProperty("批次列表") + private List pcList = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.java new file mode 100644 index 0000000000..2b7347defc --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.java @@ -0,0 +1,20 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Mapper +public interface WmsReceiptBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + WmsReceiptBillInitVo getDetailsInit(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.xml new file mode 100644 index 0000000000..5fca13e4e8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillMapper.xml @@ -0,0 +1,42 @@ + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillPageVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillPageVo.java new file mode 100644 index 0000000000..36a2b32e0f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillPageVo.java @@ -0,0 +1,40 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Data +public class WmsReceiptBillPageVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + + @ApiModelProperty("供应商名称") + private String supplierName; + + @ApiModelProperty("到货日期") + private String deliveryDate; + + //单据状态:新建/已完成 + @ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)") + private String billState; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillQuery.java new file mode 100644 index 0000000000..52064cc3a6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillQuery.java @@ -0,0 +1,33 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Data +public class WmsReceiptBillQuery implements Query { + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期开始时间") + private String createTimeStart; + @ApiModelProperty("单据日期结束时间") + private String createTimeEnd; + @ApiModelProperty("来源编号") + private String sourceBillNo; + @ApiModelProperty("业务类型Key") + private String busTypeKey; + @ApiModelProperty("到货日期开始时间") + private String deliveryDateStart; + @ApiModelProperty("到货日期结束时间") + private String deliveryDateEnd; + @ApiModelProperty("单据状态") + private String billState; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillService.java new file mode 100644 index 0000000000..414480f9ac --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillService.java @@ -0,0 +1,220 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsansbill.WmsAnsBill; +import com.yxt.wms.biz.inventory.wmsansbill.WmsAnsBillService; +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetailService; +import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsListDetailsVo; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.*; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatch; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchMapper; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Service +public class WmsReceiptBillService extends MybatisBaseService { + + @Autowired + private WmsReceiptBillDetailService wmsReceiptBillDetailService; + @Autowired + private WmsAnsBillService wmsAnsBillService; + @Autowired + private WmsAnsBillDetailService wmsAnsBillDetailService; + @Autowired + private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService; + @Autowired + private WmsReceiptBillDetailMapper wmsReceiptBillDetailMapper; + @Autowired + private WmsReceiptBillDetailBatchMapper wmsReceiptBillDetailBatchMapper; + + public PagerVo listPage(PagerQuery pq) { + WmsReceiptBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wrb.billNo", query.getBillNo()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wrb.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wrb.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + //预期到货日期开始时间-预期到货日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getDeliveryDateStart()), "date_format (wrb.deliveryDate,'%Y-%m-%d') >= date_format('" + query.getDeliveryDateStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getDeliveryDateEnd()), "date_format (wrb.deliveryDate,'%Y-%m-%d') <= date_format('" + query.getDeliveryDateEnd() + "','%Y-%m-%d')" + ); + //单据状态 + if (StringUtils.isNotBlank(query.getBillState())) { + qw.like("wrb.billState", query.getBillState()); + } + //外部编号 + if (StringUtils.isNotBlank(query.getSourceBillNo())) { + qw.like("wrb.sourceBillNo", query.getSourceBillNo()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateBill(WmsReceiptBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsReceiptBill wmsReceiptBill = new WmsReceiptBill(); + sid = wmsReceiptBill.getSid(); + BeanUtil.copyProperties(dto, wmsReceiptBill, "sid"); + List wmsReceiptBillDetailList = dto.getList(); + wmsReceiptBillDetailList.removeAll(Collections.singleton(null)); + if (!wmsReceiptBillDetailList.isEmpty()) { + wmsReceiptBillDetailService.saveOrUpdateDetailsList(sid, wmsReceiptBillDetailList); + } + baseMapper.insert(wmsReceiptBill); + + } else { + WmsReceiptBill wmsReceiptBill = fetchBySid(sid); + if (wmsReceiptBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsReceiptBill, "sid"); + List wmsReceiptBillDetailList = dto.getList(); + wmsReceiptBillDetailList.removeAll(Collections.singleton(null)); + if (!wmsReceiptBillDetailList.isEmpty()) { + wmsReceiptBillDetailService.saveOrUpdateDetailsList(sid, wmsReceiptBillDetailList); + } + baseMapper.updateById(wmsReceiptBill); + } + return rb.success().setData(sid); + } + + public ResultBean saveOrUpdateBill2(WmsReceiptBillDto2 dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsReceiptBill wmsReceiptBill = new WmsReceiptBill(); + sid = wmsReceiptBill.getSid(); + BeanUtil.copyProperties(dto, wmsReceiptBill, "sid"); + List list = dto.getList(); + list.removeAll(Collections.singleton(null)); + List pcList = dto.getPcList(); + pcList.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + wmsReceiptBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList); + } + baseMapper.insert(wmsReceiptBill); + + } else { + WmsReceiptBill wmsReceiptBill = fetchBySid(sid); + if (wmsReceiptBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsReceiptBill, "sid"); + List list = dto.getList(); + list.removeAll(Collections.singleton(null)); + List pcList = dto.getPcList(); + pcList.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + wmsReceiptBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList); + } + baseMapper.updateById(wmsReceiptBill); + } + return rb.success().setData(sid); + } + + public ResultBean getInitDetails(String sourceSid) { + ResultBean rb = ResultBean.fireFail(); + WmsReceiptBillVo wmsReceiptBillVo = new WmsReceiptBillVo(); + WmsAnsBill wmsAnsBill = wmsAnsBillService.fetchBySid(sourceSid); + BeanUtil.copyProperties(wmsAnsBill, wmsReceiptBillVo, "sid"); + wmsReceiptBillVo.setSourceBillNo(wmsAnsBill.getBillNo()); + wmsReceiptBillVo.setSourceBillSid(wmsAnsBill.getSid()); + wmsReceiptBillVo.setCreateTime(DateUtil.today()); + List list = wmsAnsBillDetailService.selectByBillSid(sourceSid); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + List lists = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), WmsReceiptBillDetailVo.class)).collect(Collectors.toList()); + wmsReceiptBillVo.setList(lists); + } + + return rb.success().setData(wmsReceiptBillVo); + } + + public ResultBean getDetailsInit(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsReceiptBillInitVo wmsReceiptBillInitVo = baseMapper.getDetailsInit(sid); + List pcList = new ArrayList<>(); + if (wmsReceiptBillInitVo != null) { + List list = wmsReceiptBillDetailService.getDetailsInit(sid); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + for (int i = 0; i < list.size(); i++) { + WmsReceiptBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i); + int a = i + 1; + wmsReceiptBillDetailDto2.setXh(String.valueOf(a)); + List pcList2 = wmsReceiptBillDetailBatchService.getDetailsInit(sid, wmsReceiptBillDetailDto2.getDetailsSid()); + pcList2.removeAll(Collections.singleton(null)); + if (!pcList2.isEmpty()) { + for (int j = 0; j < pcList2.size(); j++) { + WmsReceiptBillDetailBatchDto2 wmsReceiptBillDetailBatchDto2 = pcList2.get(j); + wmsReceiptBillDetailBatchDto2.setXh(String.valueOf(a)); + } + pcList.addAll(pcList2); + } + } + } + wmsReceiptBillInitVo.setList(list); + wmsReceiptBillInitVo.setPcList(pcList); + } else { + return rb.setMsg("该单据不存在"); + } + return rb.success().setData(wmsReceiptBillInitVo); + } + + public ResultBean confirm(WmsReceiptBillDto2 dto) { + ResultBean rb = ResultBean.fireFail(); + dto.setBillState("1"); + List list = dto.getList(); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + for (int i = 0; i < list.size(); i++) { + WmsReceiptBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i); + wmsReceiptBillDetailDto2.setState(1); + } + } + dto.setList(list); + ResultBean resultBean = saveOrUpdateBill2(dto); + String sid = resultBean.getData(); + return rb.success().setData(sid); + } + + public ResultBean delAllBySids(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + List sidss = Arrays.asList(sids); + for (int i = 0; i < sidss.size(); i++) { + String s = sidss.get(i); + wmsReceiptBillDetailMapper.deleteByBillSid(s); + wmsReceiptBillDetailBatchMapper.deleteByDetails(s); + } + delBySids(sids); + return rb.success().setMsg("删除成功"); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillVo.java new file mode 100644 index 0000000000..8d36a5f69f --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbill/WmsReceiptBillVo.java @@ -0,0 +1,52 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbill; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Data +public class WmsReceiptBillVo { + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("来源单sid(asn单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(asn单号)") + private String sourceBillNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("业务类型key(采购入库、销售退库等)") + private String busTypeKey; + @ApiModelProperty("业务类型value(采购入库、销售退库等)") + private String busTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("到货日期") + private Date deliveryDate; + //单据状态:新建/已完成 + @ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)") + private String billState; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetail.java new file mode 100644 index 0000000000..eebb7ffa10 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetail.java @@ -0,0 +1,58 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Data +public class WmsReceiptBillDetail extends BaseEntity { + @ApiModelProperty("单据sid") + private String billSid; + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + /* @ApiModelProperty("预约数量") + private BigDecimal orderCount;*/ + @ApiModelProperty("实收数量") + private BigDecimal actualInCount; + @ApiModelProperty("拒收数量") + private BigDecimal rejectCount; + @ApiModelProperty("拒收原因") + private String rejectReason; + @ApiModelProperty("收货时间") + private Date receivingGoodsTime; + @ApiModelProperty("是否需要质检(不需要0,需要1)") + private Integer isQuality; + @ApiModelProperty("质检状态(合格0,不合格1)") + private Integer qualityState; + @ApiModelProperty("载具说明") + private String packageRemark; + + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位名称") + private String warehouseRackName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto.java new file mode 100644 index 0000000000..cb02089ec0 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto.java @@ -0,0 +1,55 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsReceiptBillDetailDto { + + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位名称") + private String warehouseRackName; + @ApiModelProperty("实收数量") + private String actualInCount; + @ApiModelProperty("拒收数量") + private String rejectCount; + @ApiModelProperty("拒收原因") + private String rejectReason; + @ApiModelProperty("是否需要质检(不需要0,需要1)") + private Integer isQuality; + @ApiModelProperty("质检状态(合格0,不合格1)") + private Integer qualityState; + @ApiModelProperty("载具说明") + private String packageRemark; + + private Integer state; + //批次 + private List list = new ArrayList<>(); + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto2.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto2.java new file mode 100644 index 0000000000..76abe39d99 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailDto2.java @@ -0,0 +1,69 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsReceiptBillDetailDto2 { + + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位名称") + private String warehouseRackName; + @ApiModelProperty("实收数量") + private String actualInCount; + @ApiModelProperty("拒收数量") + private String rejectCount; + @ApiModelProperty("拒收原因") + private String rejectReason; + @ApiModelProperty("是否需要质检(不需要0,需要1)") + private Integer isQuality; + @ApiModelProperty("质检状态(合格0,不合格1)") + private Integer qualityState; + @ApiModelProperty("载具说明") + private String packageRemark; + @ApiModelProperty("单据明细状态:0新建,1已完成") + private Integer state; + @ApiModelProperty("序号") + private String xh; + @JsonIgnore + private String detailsSid; + + @ApiModelProperty("预约数量(采购订单数量)") + private String orderCount; + + + //入库价 + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("税额") + private String taxAmount; + @ApiModelProperty("含税价") + private String taxPrice; + //采购金额 + @ApiModelProperty("金额") + private String amount; + + @ApiModelProperty("有效天数") + private String shelfLife; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.java new file mode 100644 index 0000000000..10bb3bfcd0 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.java @@ -0,0 +1,21 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Mapper +public interface WmsReceiptBillDetailMapper extends BaseMapper { + int deleteByBillSid(String sid); + + List getDetailsInit(String sid); + + List selectByBillSid(@Param("sid") String sid, @Param("sidList") List sidList); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml new file mode 100644 index 0000000000..5a05fe3d9d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml @@ -0,0 +1,43 @@ + + + + + delete + from wms_receipt_bill_detail + where billSid = #{sid} + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java new file mode 100644 index 0000000000..62102d16c6 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java @@ -0,0 +1,73 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/3 + **/ +@Service +public class WmsReceiptBillDetailService extends MybatisBaseService { + + @Autowired + private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService; + + public void saveOrUpdateDetailsList(String sid, List wmsReceiptBillDetailList) { + baseMapper.deleteByBillSid(sid); + wmsReceiptBillDetailList.forEach(v -> { + WmsReceiptBillDetail wmsReceiptBillDetail = new WmsReceiptBillDetail(); + BeanUtil.copyProperties(v, wmsReceiptBillDetail, "sid"); + wmsReceiptBillDetail.setBillSid(sid); + baseMapper.insert(wmsReceiptBillDetail); + wmsReceiptBillDetailBatchService.deleteByDetails(sid); + List list = v.getList(); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + wmsReceiptBillDetailBatchService.saveBatchs(sid, wmsReceiptBillDetail.getSid(), list); + + } + + }); + } + + public void saveOrUpdateDetailsList2(String sid, List list, List pcList) { + baseMapper.deleteByBillSid(sid); + list.forEach(v -> { + WmsReceiptBillDetail wmsReceiptBillDetail = new WmsReceiptBillDetail(); + BeanUtil.copyProperties(v, wmsReceiptBillDetail, "sid"); + wmsReceiptBillDetail.setBillSid(sid); + baseMapper.insert(wmsReceiptBillDetail); + wmsReceiptBillDetailBatchService.deleteByDetails(sid); + pcList.removeAll(Collections.singleton(null)); + if (!pcList.isEmpty()) { + List pcList2 = pcList.stream().filter(c -> c.getXh().equals(v.getXh())).collect(Collectors.toList()); + pcList2.removeAll(Collections.singleton(null)); + if (!pcList2.isEmpty()) { + wmsReceiptBillDetailBatchService.saveBatchs2(sid, wmsReceiptBillDetail.getSid(), pcList2); + } + } + + + }); + } + + public List getDetailsInit(String sid) { + return baseMapper.getDetailsInit(sid); + } + + public List selectByBillSid(String sid,List sidList) { + return baseMapper.selectByBillSid(sid,sidList); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailVo.java new file mode 100644 index 0000000000..d8f9d3dce9 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailVo.java @@ -0,0 +1,66 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetail; + +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Data +public class WmsReceiptBillDetailVo { + + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位名称") + private String warehouseRackName; + @ApiModelProperty("实收数量") + private String actualInCount; + @ApiModelProperty("拒收数量") + private String rejectCount; + @ApiModelProperty("拒收原因") + private String rejectReason; + @ApiModelProperty("是否需要质检(不需要0,需要1)") + private Integer isQuality; + @ApiModelProperty("质检状态(合格0,不合格1)") + private Integer qualityState; + @ApiModelProperty("载具说明") + private String packageRemark; + + //入库价 + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("税额") + private String taxAmount; + @ApiModelProperty("含税价") + private String taxPrice; + //采购金额 + @ApiModelProperty("金额") + private String amount; + + @ApiModelProperty("有效期天数") + private Integer shelfLife; + @ApiModelProperty("预约数量(采购订单数量)") + private String orderCount; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatch.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatch.java new file mode 100644 index 0000000000..a065cc68cb --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatch.java @@ -0,0 +1,30 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsReceiptBillDetailBatch extends BaseEntity { + @ApiModelProperty("收货单sid") + private String billSid; + @ApiModelProperty("收货明细sid") + private String detailSid; + @ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)") + private String batchNumber; + @ApiModelProperty("生产日期") + private Date manufactureDate; + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDate; + + @ApiModelProperty("数量") + private BigDecimal batchCount; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto.java new file mode 100644 index 0000000000..3a23bae515 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto.java @@ -0,0 +1,26 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Data +public class WmsReceiptBillDetailBatchDto { + + @ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)") + private String batchNumber; + @ApiModelProperty("生产日期") + private Date manufactureDate; + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDate; + @ApiModelProperty("数量") + private String batchCount; + @ApiModelProperty("有效期天数") + private Integer shelfLife; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto2.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto2.java new file mode 100644 index 0000000000..438db55d6e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchDto2.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsReceiptBillDetailBatchDto2 { + + @ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)") + private String batchNumber; + @ApiModelProperty("生产日期") + private String manufactureDate; + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private String expirationDate; + @ApiModelProperty("数量") + private String batchCount; + @ApiModelProperty("有效期天数") + private Integer shelfLife; + + private String xh; + + //商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + //商品编码 + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + //规格 + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + //单位 + @ApiModelProperty("计量单位") + private String unit; + //仓库 + @ApiModelProperty("仓库名称") + private String warehouseName; + //库位 + @ApiModelProperty("库位名称") + private String warehouseRackName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.java new file mode 100644 index 0000000000..287c4ef6d8 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.java @@ -0,0 +1,21 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Mapper +public interface WmsReceiptBillDetailBatchMapper extends BaseMapper { + int deleteByDetails(String sid); + + List getDetailsInit(@Param("sid") String sid, @Param("detailsSid") String detailsSid); + + WmsReceiptBillDetailBatch selectByDetails(String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.xml new file mode 100644 index 0000000000..12aa37ecc1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchMapper.xml @@ -0,0 +1,25 @@ + + + + + delete + from wms_receipt_bill_detail_batch + where billSid = #{sid} + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchService.java new file mode 100644 index 0000000000..f1a617af91 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchService.java @@ -0,0 +1,47 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.service.MybatisBaseService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Service +public class WmsReceiptBillDetailBatchService extends MybatisBaseService { + public int deleteByDetails(String sid) { + return baseMapper.deleteByDetails(sid); + } + + public void saveBatchs(String sid, String sid1, List list) { + list.forEach(v -> { + WmsReceiptBillDetailBatch wmsReceiptBillDetailBatch = new WmsReceiptBillDetailBatch(); + BeanUtil.copyProperties(v, wmsReceiptBillDetailBatch, "sid"); + wmsReceiptBillDetailBatch.setBillSid(sid); + wmsReceiptBillDetailBatch.setDetailSid(sid1); + baseMapper.insert(wmsReceiptBillDetailBatch); + }); + } + + public void saveBatchs2(String sid, String sid1, List list) { + list.forEach(v -> { + WmsReceiptBillDetailBatch wmsReceiptBillDetailBatch = new WmsReceiptBillDetailBatch(); + BeanUtil.copyProperties(v, wmsReceiptBillDetailBatch, "sid"); + wmsReceiptBillDetailBatch.setBillSid(sid); + wmsReceiptBillDetailBatch.setDetailSid(sid1); + baseMapper.insert(wmsReceiptBillDetailBatch); + }); + } + + public List getDetailsInit(String sid, String detailsSid) { + return baseMapper.getDetailsInit(sid,detailsSid); + } + + public WmsReceiptBillDetailBatch selectByDetails(String sid) { + return baseMapper.selectByDetails(sid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchVo.java new file mode 100644 index 0000000000..4d8e5d5c0c --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetailbatch/WmsReceiptBillDetailBatchVo.java @@ -0,0 +1,34 @@ +package com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/12 + **/ +@Data +public class WmsReceiptBillDetailBatchVo { + + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位名称") + private String warehouseRackName; + @ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)") + private String batchNumber; + @ApiModelProperty("生产日期") + private String manufactureDate; + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private String expirationDate; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfDetailsVo.java new file mode 100644 index 0000000000..668c886bd4 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfDetailsVo.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.ShelfDetailsListVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/17 + **/ +@Data +public class ShelfDetailsVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人名称") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据状态:0新建,1已完成") + private Integer billState; + + private String remarks; + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfInitVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfInitVo.java new file mode 100644 index 0000000000..89cdf591ac --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/ShelfInitVo.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.ShelfDetailsListVo; +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.ShelfInitListVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/23 + **/ +@Data +public class ShelfInitVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人名称") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据状态:0新建,1已完成") + private Integer billState; + + private String remarks; + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBill.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBill.java new file mode 100644 index 0000000000..efb0a36d64 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBill.java @@ -0,0 +1,28 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsShelfBill extends BaseEntity { + @ApiModelProperty("来源单sid(收货单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单号(收货单号)") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("0新建,1已完成") + private Integer billState; + + private String createOrgSid; + + private String useOrgSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillDto.java new file mode 100644 index 0000000000..828bfdd85d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillDto.java @@ -0,0 +1,36 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.WmsShelfBillDetailDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsShelfBillDto { + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人名称") + private String createByName; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("来源单号") + private String sourceBillNo; + @ApiModelProperty("来源单sid") + private String sourceBillSid; + @ApiModelProperty("单据状态:0新建,1已完成") + private Integer billState; + + private String remarks; + + private List list = new ArrayList<>(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.java new file mode 100644 index 0000000000..80f44945c1 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.java @@ -0,0 +1,22 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Mapper +public interface WmsShelfBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + ShelfDetailsVo details(String sid); + + String selectNum(String goodsId); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.xml new file mode 100644 index 0000000000..befbf2b659 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillQuery.java new file mode 100644 index 0000000000..bbf89110b7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillQuery.java @@ -0,0 +1,23 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsShelfBillQuery implements Query { + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期开始时间") + private String createTimeStart; + @ApiModelProperty("单据日期结束时间") + private String createTimeEnd; + @ApiModelProperty("单据状态") + private String billState; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java new file mode 100644 index 0000000000..a311de3fbd --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java @@ -0,0 +1,263 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventorySaveDto; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordDto; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBill; +import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillService; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetail; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto2; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailService; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatch; +import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService; +import com.yxt.wms.biz.inventory.wmsshelfbilldetail.*; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuDetailsVo; +import com.yxt.wms.feign.base.basegoodssku.BaseGoodsSkuFeign; +import com.yxt.wms.utils.Rule; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/11 + **/ +@Service +public class WmsShelfBillService extends MybatisBaseService { + @Autowired + private WmsShelfBillDetailService wmsShelfBillDetailService; + @Autowired + private WmsShelfBillDetailMapper wmsShelfBillDetailMapper; + + @Autowired + private WmsInventoryService wmsInventoryService; + @Resource + private BaseGoodsSkuFeign baseGoodsSkuFeign; + + @Autowired + private WmsInventoryRecordService wmsInventoryRecordService; + @Autowired + private WmsReceiptBillService wmsReceiptBillService; + @Autowired + private WmsReceiptBillDetailService wmsReceiptBillDetailService; + @Autowired + private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService; + + public PagerVo listPage(PagerQuery pq) { + WmsShelfBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //ToDo:添加查询条件 + if (StringUtils.isNotBlank(query.getBillNo())) { + qw.like("wsb.billNo", query.getBillNo()); + } + //单据日期开始时间-单据日期结束时间 + qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wsb.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wsb.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" + ); + //单据状态 + if (StringUtils.isNotBlank(query.getBillState())) { + qw.like("wsb.billState", query.getBillState()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateShelf(WmsShelfBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = dto.getSid(); + if (StringUtils.isBlank(sid)) { + WmsShelfBill wmsShelfBill = new WmsShelfBill(); + BeanUtil.copyProperties(dto, wmsShelfBill, "sid"); + List list = dto.getList(); + list.removeAll(Collections.singleton(null)); + sid = wmsShelfBill.getSid(); + if (!list.isEmpty()) { + wmsShelfBillDetailService.saveShelfDetails(sid, list); + } + baseMapper.insert(wmsShelfBill); + } else { + WmsShelfBill wmsShelfBill = fetchBySid(sid); + if (wmsShelfBill == null) { + return rb.setMsg("该单据不存在"); + } + BeanUtil.copyProperties(dto, wmsShelfBill, "sid"); + List list = dto.getList(); + list.removeAll(Collections.singleton(null)); + sid = wmsShelfBill.getSid(); + if (!list.isEmpty()) { + wmsShelfBillDetailService.saveShelfDetails(sid, list); + } + baseMapper.updateById(wmsShelfBill); + + } + saveWmsInventory(sid); + //新增出入库记录 + + return rb.success().setData(sid); + } + + public void saveWmsInventory(String sid) { + WmsShelfBill wmsShelfBill = fetchBySid(sid); + List detailList = wmsShelfBillDetailService.selectByBillSid(sid); + detailList.removeAll(Collections.singleton(null)); + if (!detailList.isEmpty()) { + for (int i = 0; i < detailList.size(); i++) { + WmsShelfBillDetailVos s = detailList.get(i); + WmsInventorySaveDto dto = new WmsInventorySaveDto(); + dto.setCreateBySid(wmsShelfBill.getCreateBySid()); + dto.setBatchNumber(s.getBatchNumber()); + dto.setGoodsID(getGoodsId(s.getGoodsSkuSid())); + dto.setGoodSpuSid(s.getGoodSpuSid()); + dto.setGoodsSpuName(s.getGoodsSpuName()); + dto.setGoodsSkuSid(s.getGoodsSkuSid()); + dto.setGoodsSkuTitle(s.getGoodsSkuTitle()); + dto.setGoodsSkuCode(s.getGoodsSkuCode()); + dto.setGoodsSkuOwnSpec(s.getGoodsSkuOwnSpec()); + dto.setUnit(s.getUnit()); + dto.setCount(s.getCount()); + dto.setWarehouseSid(s.getWarehouseSid()); + dto.setWarehouseName(s.getWarehouseName()); + dto.setWarehouseRackSid(s.getWarehouseRackSid()); + dto.setWarehouseRackCode(s.getWarehouseRackCode()); + dto.setFirstInDate(DateUtil.today()); + dto.setCreateOrgSid(wmsShelfBill.getCreateOrgSid()); + dto.setUseOrgSid(wmsShelfBill.getUseOrgSid()); + dto.setSid(s.getInventorySid()); + String inventorySid = wmsInventoryService.saveWmsInventory(dto).getData(); + WmsShelfBillDetail wmsShelfBillDetail = wmsShelfBillDetailService.fetchBySid(s.getDetailsSid()); + wmsShelfBillDetail.setInventorySid(inventorySid); + wmsShelfBillDetailService.updateById(wmsShelfBillDetail); + WmsInventoryRecordDto wmsInventoryRecordDto = new WmsInventoryRecordDto(); + wmsInventoryRecordDto.setInventorySid(inventorySid); + wmsInventoryRecordDto.setGoodsID(dto.getGoodsID()); + wmsInventoryRecordDto.setSourceBillSid(wmsShelfBill.getSourceBillSid()); + wmsInventoryRecordDto.setBillNo(wmsShelfBill.getSourceBillNo()); + wmsInventoryRecordDto.setBillType("1"); + wmsInventoryRecordDto.setBatchNumber(dto.getBatchNumber()); + wmsInventoryRecordDto.setGoodSpuSid(dto.getGoodSpuSid()); + wmsInventoryRecordDto.setGoodsSpuName(dto.getGoodsSpuName()); + wmsInventoryRecordDto.setGoodsSkuSid(dto.getGoodsSkuSid()); + wmsInventoryRecordDto.setGoodsSkuCode(dto.getGoodsSkuCode()); + wmsInventoryRecordDto.setUnit(dto.getUnit()); + wmsInventoryRecordDto.setCurrentCount(StringUtils.isNotBlank(dto.getCount()) ? new BigDecimal(dto.getCount()) : BigDecimal.ZERO); + wmsInventoryRecordDto.setWarehouseSid(dto.getWarehouseSid()); + wmsInventoryRecordDto.setWarehouseName(dto.getWarehouseName()); + wmsInventoryRecordDto.setWarehouseRackSid(dto.getWarehouseRackSid()); + wmsInventoryRecordDto.setWarehouseRackCode(dto.getWarehouseRackCode()); + wmsInventoryRecordService.saveOrUpdateDto(wmsInventoryRecordDto); + } + } + } + + /** + * 获取商品唯一的goodsID + * + * @param goodsSkuSid + * @return + */ + private String getGoodsId(String goodsSkuSid) { + String goodsId = ""; + ResultBean resultBean = baseGoodsSkuFeign.getDetails(goodsSkuSid); + if (resultBean.getSuccess()) { + BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = resultBean.getData(); + goodsId = baseGoodsSkuDetailsVo.getGoodsCode(); + String date = DateUtil.format(DateUtil.date(), "yyyyMM"); + goodsId = goodsId + date; + String i = baseMapper.selectNum(goodsId); + if (StringUtils.isNotBlank(i)) { + goodsId = Rule.getBillNo(goodsId, Integer.valueOf(i).intValue()); + } else { + goodsId = Rule.getBillNo(goodsId, 0); + } + } + return goodsId; + } + + public ResultBean delAllBySids(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + List sidss = Arrays.asList(sids); + for (int i = 0; i < sidss.size(); i++) { + String s = sidss.get(i); + wmsShelfBillDetailMapper.deleteByMainSid(s); + } + delBySids(sids); + return rb.success().setMsg("删除成功"); + } + + public ResultBean details(String sid) { + ResultBean rb = ResultBean.fireFail(); + ShelfDetailsVo shelfDetailsVo = baseMapper.details(sid); + if (shelfDetailsVo == null) { + return rb.setMsg("该单据不存在"); + } + List list = wmsShelfBillDetailService.details(sid); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + shelfDetailsVo.setList(list); + } + return rb.success().setData(shelfDetailsVo); + } + + public ResultBean getInit(String sid, String orgPath, String userSid) { + ResultBean rb = ResultBean.fireFail(); + ShelfInitVo shelfInitVo = new ShelfInitVo(); + //查询所有已上架的商品 + List stringList = wmsShelfBillDetailService.selectReceiptSidList(); + stringList.removeAll(Collections.singleton(null)); + //获取收货单据 + WmsReceiptBill wmsReceiptBill = wmsReceiptBillService.fetchBySid(sid); + shelfInitVo.setCreateTime(DateUtil.today());//单据日期 + shelfInitVo.setSourceBillNo(wmsReceiptBill.getBillNo());//来源单编号 + shelfInitVo.setSourceBillSid(wmsReceiptBill.getSid());//来源单sid + shelfInitVo.setBillState(0); + List list = new ArrayList<>(); + //获取收货单据的明细 + List wmsReceiptBillDetailsList = wmsReceiptBillDetailService.selectByBillSid(sid, stringList); + wmsReceiptBillDetailsList.removeAll(Collections.singleton(null)); + if (!wmsReceiptBillDetailsList.isEmpty()) { + for (int i = 0; i < wmsReceiptBillDetailsList.size(); i++) { + WmsReceiptBillDetail v = wmsReceiptBillDetailsList.get(i); + WmsReceiptBillDetailBatch wmsReceiptBillDetailBatch = wmsReceiptBillDetailBatchService.selectByDetails(v.getSid()); + ShelfInitListVo shelfInitListVo = new ShelfInitListVo(); + BeanUtil.copyProperties(v, shelfInitListVo, "sid"); + shelfInitListVo.setBatchNumber(wmsReceiptBillDetailBatch.getBatchNumber()); + shelfInitListVo.setWarehouseSid(v.getWarehouseSid()); + shelfInitListVo.setWarehouseRackSid(v.getWarehouseRackSid()); + shelfInitListVo.setWarehouseRackCode(""); + list.add(shelfInitListVo); + } + } + shelfInitVo.setList(list); + + return rb.success().setData(shelfInitVo); + } + + public ResultBean confirm(WmsShelfBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + dto.setBillState(1); + ResultBean resultBean = saveOrUpdateShelf(dto); + String sid = resultBean.getData(); + return rb.success().setData(sid); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillVo.java new file mode 100644 index 0000000000..9ae1591eef --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillVo.java @@ -0,0 +1,27 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsShelfBillVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("单据日期") + private String createTime; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("来源单号(收货单号)") + private String sourceBillNo; + @ApiModelProperty("单据状态:0新建,1已完成") + private String billState; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfDetailsListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfDetailsListVo.java new file mode 100644 index 0000000000..bd562b1cd5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfDetailsListVo.java @@ -0,0 +1,52 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/18 + **/ +@Data +public class ShelfDetailsListVo implements Vo { + + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("上架数量") + private String count; + + //商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + //商品编码 + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + //规格 + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + //单位 + @ApiModelProperty("计量单位") + private String unit; + //仓库 + @ApiModelProperty("仓库名称") + private String warehouseName; + //库位 + @ApiModelProperty("库位名称") + private String warehouseRackName; + //已上架数量 + private String actualCount; + //载具编号 + private String packageNo; + + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfInitListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfInitListVo.java new file mode 100644 index 0000000000..ca1a9d45ed --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/ShelfInitListVo.java @@ -0,0 +1,49 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/23 + **/ +@Data +public class ShelfInitListVo { + + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("上架数量") + private String count; + + //商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + //商品编码 + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + //规格 + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + //单位 + @ApiModelProperty("计量单位") + private String unit; + //仓库 + @ApiModelProperty("仓库名称") + private String warehouseName; + //库位 + @ApiModelProperty("库位名称") + private String warehouseRackName; + //已上架数量 + private String actualCount; + //载具编号 + private String packageNo; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetail.java new file mode 100644 index 0000000000..fbe1316bf7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetail.java @@ -0,0 +1,32 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/10 + **/ +@Data +public class WmsShelfBillDetail extends BaseEntity { + @ApiModelProperty("单据sid") + private String billSid; + @ApiModelProperty("收货单明细sid") + private String receiptDetailSid; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("上架数量") + private BigDecimal count; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailDto.java new file mode 100644 index 0000000000..57650dd6de --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailDto.java @@ -0,0 +1,55 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/15 + **/ +@Data +public class WmsShelfBillDetailDto { + + @ApiModelProperty("收货单明细sid") + private String receiptDetailSid; + @ApiModelProperty("批次号") + private String batchNumber; + @ApiModelProperty("库存sid") + private String inventorySid; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编号") + private String warehouseRackCode; + @ApiModelProperty("需上架数量") + private String count; + + + //商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + //商品编码 + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + //规格 + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + //单位 + @ApiModelProperty("计量单位") + private String unit; + //仓库 + @ApiModelProperty("仓库名称") + private String warehouseName; + //库位 + @ApiModelProperty("库位名称") + private String warehouseRackName; + //已上架数量 + private String actualCount; + //载具编号 + private String packageNo; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.java new file mode 100644 index 0000000000..35625f1885 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.java @@ -0,0 +1,22 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/17 + **/ +@Mapper +public interface WmsShelfBillDetailMapper extends BaseMapper { + int deleteByMainSid(String sid); + + List details(String sid); + + List selectByBillSid(String sid); + + List selectReceiptSidList(); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.xml new file mode 100644 index 0000000000..a275a55552 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailMapper.xml @@ -0,0 +1,46 @@ + + + + + delete + from wms_shelf_bill_detail + where billSid = #{sid} + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailService.java new file mode 100644 index 0000000000..6d70afce46 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailService.java @@ -0,0 +1,37 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.common.base.service.MybatisBaseService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/17 + **/ +@Service +public class WmsShelfBillDetailService extends MybatisBaseService { + public void saveShelfDetails(String sid, List list) { + baseMapper.deleteByMainSid(sid); + list.forEach(v -> { + WmsShelfBillDetail wmsShelfBillDetail = new WmsShelfBillDetail(); + BeanUtil.copyProperties(v, wmsShelfBillDetail, "sid"); + wmsShelfBillDetail.setBillSid(sid); + baseMapper.insert(wmsShelfBillDetail); + }); + } + + public List details(String sid) { + return baseMapper.details(sid); + } + + public List selectByBillSid(String sid) { + return baseMapper.selectByBillSid(sid); + } + + public List selectReceiptSidList() { + return baseMapper.selectReceiptSidList(); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailVos.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailVos.java new file mode 100644 index 0000000000..5b5987d977 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbilldetail/WmsShelfBillDetailVos.java @@ -0,0 +1,44 @@ +package com.yxt.wms.biz.inventory.wmsshelfbilldetail; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/19 + **/ +@Data +public class WmsShelfBillDetailVos { + + private String detailsSid; + + @ApiModelProperty("商品基础信息sid") + private String goodSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("现有量") + private String count; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("批次号") + private String batchNumber; + + private String inventorySid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/package-info.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/package-info.java new file mode 100644 index 0000000000..5b4ed4ca95 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 仓库管理 项目后台逻辑和接口 + */ +package com.yxt.wms.biz; \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/config/config.md b/yxt-wms-biz/src/main/java/com/yxt/wms/config/config.md new file mode 100644 index 0000000000..2b4f8f4439 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/config/config.md @@ -0,0 +1 @@ +// 添加相关配置 \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuDetailsVo.java new file mode 100644 index 0000000000..9e31af9afe --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuDetailsVo.java @@ -0,0 +1,48 @@ +package com.yxt.wms.feign.base.basegoodssku; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@Data +public class BaseGoodsSkuDetailsVo { + + @ApiModelProperty("商品代码") + private String goodsCode; + @ApiModelProperty("条形码") + private String barCode; + @ApiModelProperty("商品名称") + private String goodsName; + @ApiModelProperty("副标题") + private String subTitle; + @ApiModelProperty("拼音缩写") + private String goodsPY; + @ApiModelProperty("商品简称") + private String goodsShortName; + @ApiModelProperty("商品分类sid") + private String goodsTypeSid; + @ApiModelProperty("品牌sid") + private String brandSid; + @ApiModelProperty("厂家sid") + private String manufacturersid; + @ApiModelProperty("商品单位sid") + private String goodsUnitSid; + @ApiModelProperty("商品单位名称") + private String goodsUnitName; + + @ApiModelProperty("商品Sku代码") + private String goodsSkuCode; + @ApiModelProperty("商品标题") + private String title; + + @ApiModelProperty("是否一品一码(goodID),0否,1是") + @JsonProperty("isGoodsID") + private int isGoodsID; + @ApiModelProperty("商品类别名称") + private String goodsTypeName; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeign.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeign.java new file mode 100644 index 0000000000..ef3490cd32 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeign.java @@ -0,0 +1,24 @@ +package com.yxt.wms.feign.base.basegoodssku; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@FeignClient( + contextId = "yxt-base-BaseGoodsSku", + name = "yxt-base", + path = "/apiadmin/base/basegoodssku", + fallback = BaseGoodsSkuFeignFallback.class) +public interface BaseGoodsSkuFeign { + + @ApiOperation("获取商品信息") + @GetMapping("/getDetails") + ResultBean getDetails(@RequestParam("sid") String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeignFallback.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeignFallback.java new file mode 100644 index 0000000000..74f7970ae5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basegoodssku/BaseGoodsSkuFeignFallback.java @@ -0,0 +1,17 @@ +package com.yxt.wms.feign.base.basegoodssku; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.stereotype.Component; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@Component +public class BaseGoodsSkuFeignFallback implements BaseGoodsSkuFeign{ + @Override + public ResultBean getDetails(String sid) { + return null; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java new file mode 100644 index 0000000000..b73c900a52 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java @@ -0,0 +1,16 @@ +package com.yxt.wms.feign.base.basesupplierinfo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/26 17:12 + */ +@Data +public class BaseSupplierInfoDetailsVo { + + @ApiModelProperty("供应商名称") + private String supplierName; + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java new file mode 100644 index 0000000000..ea799b8419 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeign.java @@ -0,0 +1,24 @@ +package com.yxt.wms.feign.base.basesupplierinfo; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @author wangpengfei + * @date 2024/3/26 17:12 + */ +@FeignClient( + contextId = "yxt-base-BaseSupplierInfo", + name = "yxt-base", + path = "/apiadmin/base/basesupplierinfo", + fallback = BaseSupplierInfoFeignFallback.class) +public interface BaseSupplierInfoFeign { + + @ApiOperation("根据SID获取供应商") + @GetMapping("/fetchDetailsBySid/{sid}") + ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java new file mode 100644 index 0000000000..8f8b84b9db --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/base/basesupplierinfo/BaseSupplierInfoFeignFallback.java @@ -0,0 +1,18 @@ +package com.yxt.wms.feign.base.basesupplierinfo; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.stereotype.Component; + +/** + * @author wangpengfei + * @date 2024/3/26 17:12 + */ +@Component +public class BaseSupplierInfoFeignFallback implements BaseSupplierInfoFeign { + + + @Override + public ResultBean fetchDetailsBySid(String sid) { + return null; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/feign/package-info.java b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/package-info.java new file mode 100644 index 0000000000..39d2e43d23 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.wms.feign; \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/utils/DoubleUtils.java b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/DoubleUtils.java new file mode 100644 index 0000000000..6bd2dcc387 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/DoubleUtils.java @@ -0,0 +1,93 @@ +package com.yxt.yythmall.utils; + +import java.math.BigDecimal; + +/** + * @author wangpengfei + * @date 2024/1/24 8:53 + */ +public class DoubleUtils { + + /** + * 对double数据进行取精度. + * @param value double数据. + * @param scale 精度位数(保留的小数位数). + * @param roundingMode 精度取值方式. + * @return 精度计算后的数据. + */ + public static double round(double value, int scale, + int roundingMode) { + BigDecimal bd = BigDecimal.valueOf(value); + bd = bd.setScale(scale, roundingMode); + double d = bd.doubleValue(); + bd = null; + return d; + } + + + /** + * double 相加 + * @param d1 + * @param d2 + * @return + */ + public static double sum(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.add(bd2).doubleValue(); + } + + + /** + * double 相减 + * @param d1 + * @param d2 + * @return + */ + public static double sub(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.subtract(bd2).doubleValue(); + } + + /** + * double 乘法 + * @param d1 + * @param d2 + * @return + */ + public static double mul(double d1, double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.multiply(bd2).doubleValue(); + } + + + /** + * double 除法 + * @param d1 + * @param d2 + * @param scale 四舍五入 小数点位数 + * @return + */ + public static double div(double d1,double d2,int scale){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.divide + (bd2,scale,BigDecimal.ROUND_HALF_UP).doubleValue(); + } + /** + * 去除多余.0 + * @param num + * @return + */ + public static String removeZeros(String num) { + if (num.indexOf(".") > 0) { + // 去掉多余的0 + num = num.replaceAll("0+?$", ""); + // 如果最后一位是. 则去掉 + num = num.replaceAll("[.]$", ""); + } + return num; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/utils/Rule.java b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/Rule.java new file mode 100644 index 0000000000..95fd973322 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/Rule.java @@ -0,0 +1,15 @@ +package com.yxt.wms.utils; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +public class Rule { + + public static String getBillNo(String bill, int i) { + String num = String.format("%04d", i + 1); // 不足4位补0 + String billNo = bill + num; + return billNo; + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/utils/StyleUtils.java b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/StyleUtils.java new file mode 100644 index 0000000000..edf2534f09 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/utils/StyleUtils.java @@ -0,0 +1,89 @@ +package com.yxt.wms.utils; + +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.metadata.style.WriteFont; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.VerticalAlignment; + +/** + * @author wangpengfei + * @date 2023/12/16 22:14 + */ +public class StyleUtils { /** + * 标题样式 + * @return + */ +public static WriteCellStyle getHeadStyle(){ + // 头的策略 + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + // 背景颜色 +// headWriteCellStyle.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE1.getIndex()); +// headWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 字体 + WriteFont headWriteFont = new WriteFont(); + headWriteFont.setFontName("宋体");//设置字体名字 + headWriteFont.setFontHeightInPoints((short)14);//设置字体大小 + headWriteFont.setBold(true);//字体加粗 + headWriteCellStyle.setWriteFont(headWriteFont); //在样式用应用设置的字体; + + // 样式 + headWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + headWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + headWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + headWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + headWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + headWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + headWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + headWriteCellStyle.setTopBorderColor((short) 0); //设置顶边框颜色; + + headWriteCellStyle.setWrapped(true); //设置自动换行; + + headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);//设置水平对齐的样式为居中对齐; + headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; + headWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return headWriteCellStyle; +} + + + /** + * 内容样式 + * @return + */ + public static WriteCellStyle getContentStyle(){ + // 内容的策略 + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + + // 背景绿色 + // 这里需要指定 FillPatternType 为FillPatternType.SOLID_FOREGROUND 不然无法显示背景颜色.头默认了 FillPatternType所以可以不指定 +// contentWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); +// contentWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 设置字体 + WriteFont contentWriteFont = new WriteFont(); + contentWriteFont.setFontHeightInPoints((short) 12);//设置字体大小 + contentWriteFont.setFontName("宋体"); //设置字体名字 + contentWriteCellStyle.setWriteFont(contentWriteFont);//在样式用应用设置的字体; + + //设置样式; + contentWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + contentWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + contentWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + contentWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + contentWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + contentWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + contentWriteCellStyle.setTopBorderColor((short) 0); ///设置顶边框颜色; + + contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);// 水平居中 + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中 + contentWriteCellStyle.setWrapped(true); //设置自动换行; + +// contentWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return contentWriteCellStyle; + } + +} diff --git a/yxt-wms-biz/src/main/resources/application-dev.yml b/yxt-wms-biz/src/main/resources/application-dev.yml new file mode 100644 index 0000000000..ac0d002f42 --- /dev/null +++ b/yxt-wms-biz/src/main/resources/application-dev.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_wms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + # register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ \ No newline at end of file diff --git a/yxt-wms-biz/src/main/resources/application-pro.yml b/yxt-wms-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..9c2fd919da --- /dev/null +++ b/yxt-wms-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_wms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ \ No newline at end of file diff --git a/yxt-wms-biz/src/main/resources/application-test.yml b/yxt-wms-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..34ca76f836 --- /dev/null +++ b/yxt-wms-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_wms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ \ No newline at end of file diff --git a/yxt-wms-biz/src/main/resources/application.yml b/yxt-wms-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..b82281cf13 --- /dev/null +++ b/yxt-wms-biz/src/main/resources/application.yml @@ -0,0 +1,43 @@ +spring: + application: + name: yxt-wms + profiles: + active: dev + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7301 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + + + + diff --git a/yxt-wms-biz/src/main/resources/logback-spring.xml b/yxt-wms-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..1a756cd90a --- /dev/null +++ b/yxt-wms-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/test/java/com/yxt/wms/YxtWmsApplicationTest.java b/yxt-wms-biz/src/test/java/com/yxt/wms/YxtWmsApplicationTest.java new file mode 100644 index 0000000000..4f4f02fa21 --- /dev/null +++ b/yxt-wms-biz/src/test/java/com/yxt/wms/YxtWmsApplicationTest.java @@ -0,0 +1,24 @@ +package com.yxt.wms; + +import cn.hutool.core.util.IdUtil; +import org.junit.Test; + +import java.util.UUID; + +public class YxtWmsApplicationTest { + + @Test + public void test() { + System.out.println(IdUtil.nanoId()); + System.out.println(IdUtil.getSnowflakeNextId()); + + UUID uuid = UUID.randomUUID(); + String uniqueID = uuid.toString().replaceAll("-", "").substring(0, 16).replaceAll("\\D", ""); + System.out.println(uniqueID); + } +} + +//do3KW8XIUSyu4vg_zTXdm +// 1727231267909320704 +//uw0AotdmQTlIxKlA2V8_O +// 1727231437887668224