Commit 5d092361edcbcb0bf3284bf72f77c25f8ab1f4d7
1 parent
c5d9ad59
✨ ERP:基本完成采购订单 100%
Showing
7 changed files
with
14 additions
and
22 deletions
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/vo/order/ErpPurchaseOrderRespVO.java
| @@ -87,10 +87,10 @@ public class ErpPurchaseOrderRespVO { | @@ -87,10 +87,10 @@ public class ErpPurchaseOrderRespVO { | ||
| 87 | @ExcelProperty("产品信息") | 87 | @ExcelProperty("产品信息") |
| 88 | private String productNames; | 88 | private String productNames; |
| 89 | 89 | ||
| 90 | - // ========== 采购出库 ========== | 90 | + // ========== 采购入库 ========== |
| 91 | 91 | ||
| 92 | - @Schema(description = "采购出库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") | ||
| 93 | - private BigDecimal outCount; | 92 | + @Schema(description = "采购入库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") |
| 93 | + private BigDecimal inCount; | ||
| 94 | 94 | ||
| 95 | // ========== 采购退货(出库)) ========== | 95 | // ========== 采购退货(出库)) ========== |
| 96 | 96 | ||
| @@ -125,10 +125,10 @@ public class ErpPurchaseOrderRespVO { | @@ -125,10 +125,10 @@ public class ErpPurchaseOrderRespVO { | ||
| 125 | @Schema(description = "备注", example = "随便") | 125 | @Schema(description = "备注", example = "随便") |
| 126 | private String remark; | 126 | private String remark; |
| 127 | 127 | ||
| 128 | - // ========== 采购出库 ========== | 128 | + // ========== 采购入库 ========== |
| 129 | 129 | ||
| 130 | - @Schema(description = "采购出库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") | ||
| 131 | - private BigDecimal outCount; | 130 | + @Schema(description = "采购入库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") |
| 131 | + private BigDecimal inCount; | ||
| 132 | 132 | ||
| 133 | // ========== 采购退货(入库)) ========== | 133 | // ========== 采购退货(入库)) ========== |
| 134 | 134 |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/purchase/ErpPurchaseOrderItemDO.java
| @@ -14,8 +14,8 @@ import java.math.BigDecimal; | @@ -14,8 +14,8 @@ import java.math.BigDecimal; | ||
| 14 | * | 14 | * |
| 15 | * @author 芋道源码 | 15 | * @author 芋道源码 |
| 16 | */ | 16 | */ |
| 17 | -@TableName("erp_sale_order_items") | ||
| 18 | -@KeySequence("erp_sale_order_items_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | 17 | +@TableName("erp_purchase_order_items") |
| 18 | +@KeySequence("erp_purchase_order_items_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | ||
| 19 | @Data | 19 | @Data |
| 20 | @EqualsAndHashCode(callSuper = true) | 20 | @EqualsAndHashCode(callSuper = true) |
| 21 | @ToString(callSuper = true) | 21 | @ToString(callSuper = true) |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseOrderServiceImpl.java
| @@ -162,9 +162,7 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService { | @@ -162,9 +162,7 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService { | ||
| 162 | if (item.getTotalPrice() == null) { | 162 | if (item.getTotalPrice() == null) { |
| 163 | return; | 163 | return; |
| 164 | } | 164 | } |
| 165 | - if (item.getTaxPercent() == null) { | ||
| 166 | - item.setTaxPercent(BigDecimal.ZERO); | ||
| 167 | - } else { | 165 | + if (item.getTaxPercent() != null) { |
| 168 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); | 166 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); |
| 169 | } | 167 | } |
| 170 | })); | 168 | })); |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpSupplierServiceImpl.java
| @@ -68,10 +68,10 @@ public class ErpSupplierServiceImpl implements ErpSupplierService { | @@ -68,10 +68,10 @@ public class ErpSupplierServiceImpl implements ErpSupplierService { | ||
| 68 | public ErpSupplierDO validateSupplier(Long id) { | 68 | public ErpSupplierDO validateSupplier(Long id) { |
| 69 | ErpSupplierDO supplier = supplierMapper.selectById(id); | 69 | ErpSupplierDO supplier = supplierMapper.selectById(id); |
| 70 | if (supplier == null) { | 70 | if (supplier == null) { |
| 71 | - throw exception(WAREHOUSE_NOT_EXISTS); | 71 | + throw exception(SUPPLIER_NOT_EXISTS); |
| 72 | } | 72 | } |
| 73 | if (CommonStatusEnum.isDisable(supplier.getStatus())) { | 73 | if (CommonStatusEnum.isDisable(supplier.getStatus())) { |
| 74 | - throw exception(WAREHOUSE_NOT_ENABLE, supplier.getName()); | 74 | + throw exception(SUPPLIER_NOT_ENABLE, supplier.getName()); |
| 75 | } | 75 | } |
| 76 | return supplier; | 76 | return supplier; |
| 77 | } | 77 | } |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOrderServiceImpl.java
| @@ -174,9 +174,7 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService { | @@ -174,9 +174,7 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService { | ||
| 174 | if (item.getTotalPrice() == null) { | 174 | if (item.getTotalPrice() == null) { |
| 175 | return; | 175 | return; |
| 176 | } | 176 | } |
| 177 | - if (item.getTaxPercent() == null) { | ||
| 178 | - item.setTaxPercent(BigDecimal.ZERO); | ||
| 179 | - } else { | 177 | + if (item.getTaxPercent() != null) { |
| 180 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); | 178 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); |
| 181 | } | 179 | } |
| 182 | })); | 180 | })); |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleOutServiceImpl.java
| @@ -206,9 +206,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService { | @@ -206,9 +206,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService { | ||
| 206 | if (item.getTotalPrice() == null) { | 206 | if (item.getTotalPrice() == null) { |
| 207 | return; | 207 | return; |
| 208 | } | 208 | } |
| 209 | - if (item.getTaxPercent() == null) { | ||
| 210 | - item.setTaxPercent(BigDecimal.ZERO); | ||
| 211 | - } else { | 209 | + if (item.getTaxPercent() != null) { |
| 212 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); | 210 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); |
| 213 | } | 211 | } |
| 214 | })); | 212 | })); |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/sale/ErpSaleReturnServiceImpl.java
| @@ -206,9 +206,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService { | @@ -206,9 +206,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService { | ||
| 206 | if (item.getTotalPrice() == null) { | 206 | if (item.getTotalPrice() == null) { |
| 207 | return; | 207 | return; |
| 208 | } | 208 | } |
| 209 | - if (item.getTaxPercent() == null) { | ||
| 210 | - item.setTaxPercent(BigDecimal.ZERO); | ||
| 211 | - } else { | 209 | + if (item.getTaxPercent() != null) { |
| 212 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); | 210 | item.setTaxPrice(MoneyUtils.priceMultiplyPercent(item.getTotalPrice(), item.getTaxPercent())); |
| 213 | } | 211 | } |
| 214 | })); | 212 | })); |