ERP:基本完成采购订单 100%

This commit is contained in:
YunaiV 2024-02-12 10:00:02 +08:00
parent c5d9ad59e0
commit 5d092361ed
7 changed files with 14 additions and 22 deletions

View File

@ -87,10 +87,10 @@ public class ErpPurchaseOrderRespVO {
@ExcelProperty("产品信息") @ExcelProperty("产品信息")
private String productNames; private String productNames;
// ========== 采购 ========== // ========== 采购 ==========
@Schema(description = "采购库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") @Schema(description = "采购库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
private BigDecimal outCount; private BigDecimal inCount;
// ========== 采购退货出库 ========== // ========== 采购退货出库 ==========
@ -125,10 +125,10 @@ public class ErpPurchaseOrderRespVO {
@Schema(description = "备注", example = "随便") @Schema(description = "备注", example = "随便")
private String remark; private String remark;
// ========== 采购 ========== // ========== 采购 ==========
@Schema(description = "采购库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") @Schema(description = "采购库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
private BigDecimal outCount; private BigDecimal inCount;
// ========== 采购退货入库 ========== // ========== 采购退货入库 ==========

View File

@ -14,8 +14,8 @@ import java.math.BigDecimal;
* *
* @author 芋道源码 * @author 芋道源码
*/ */
@TableName("erp_sale_order_items") @TableName("erp_purchase_order_items")
@KeySequence("erp_sale_order_items_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写 @KeySequence("erp_purchase_order_items_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true) @ToString(callSuper = true)

View File

@ -162,9 +162,7 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService {
if (item.getTotalPrice() == null) { if (item.getTotalPrice() == null) {
return; return;
} }
if (item.getTaxPercent() == null) { if (item.getTaxPercent() != null) {
item.setTaxPercent(BigDecimal.ZERO);
} else {
item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent()));
} }
})); }));

View File

@ -68,10 +68,10 @@ public class ErpSupplierServiceImpl implements ErpSupplierService {
public ErpSupplierDO validateSupplier(Long id) { public ErpSupplierDO validateSupplier(Long id) {
ErpSupplierDO supplier = supplierMapper.selectById(id); ErpSupplierDO supplier = supplierMapper.selectById(id);
if (supplier == null) { if (supplier == null) {
throw exception(WAREHOUSE_NOT_EXISTS); throw exception(SUPPLIER_NOT_EXISTS);
} }
if (CommonStatusEnum.isDisable(supplier.getStatus())) { if (CommonStatusEnum.isDisable(supplier.getStatus())) {
throw exception(WAREHOUSE_NOT_ENABLE, supplier.getName()); throw exception(SUPPLIER_NOT_ENABLE, supplier.getName());
} }
return supplier; return supplier;
} }

View File

@ -174,9 +174,7 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService {
if (item.getTotalPrice() == null) { if (item.getTotalPrice() == null) {
return; return;
} }
if (item.getTaxPercent() == null) { if (item.getTaxPercent() != null) {
item.setTaxPercent(BigDecimal.ZERO);
} else {
item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent()));
} }
})); }));

View File

@ -206,9 +206,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService {
if (item.getTotalPrice() == null) { if (item.getTotalPrice() == null) {
return; return;
} }
if (item.getTaxPercent() == null) { if (item.getTaxPercent() != null) {
item.setTaxPercent(BigDecimal.ZERO);
} else {
item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent()));
} }
})); }));

View File

@ -206,9 +206,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService {
if (item.getTotalPrice() == null) { if (item.getTotalPrice() == null) {
return; return;
} }
if (item.getTaxPercent() == null) { if (item.getTaxPercent() != null) {
item.setTaxPercent(BigDecimal.ZERO);
} else {
item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent()));
} }
})); }));