wanglang 1 неделя назад
Родитель
Сommit
9ff6af266c

+ 3 - 0
trade-service/src/main/java/com/trade/service/finance/paymentcollection/domain/OrderReceivePaymentAssociation.java

@@ -51,4 +51,7 @@ public class OrderReceivePaymentAssociation extends BizBaseEntity {
     // 销售订单中商品总金额最大的“商品名称”(报关品名)。不同商品的总金额相同,则随机的一个“商品名称”。
     @ApiModelProperty(name = "goodsName", value = "商品名称(仅用于B端入账详情展示)")
     private String goodsName;
+    @ApiModelProperty(name = "status", value = "1草稿2正式")
+    private String status;
+
 }

+ 9 - 0
trade-service/src/main/java/com/trade/service/trade/salesorder/service/impl/SalesOrderServiceImpl.java

@@ -293,6 +293,7 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, SalesOr
                 orderListInfoDto.setActualAmount(salesOrder.getAmount());
             }
             orderListInfoDto.setId(salesOrderReceiveExtendDto.getSalesOrderId());
+            list.add(orderListInfoDto);
         }
         return list;
     }
@@ -324,6 +325,7 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, SalesOr
             orderReceivePaymentAssociation.setGoodsCurrency(orderListInfoDto.getCurrency());
             orderReceivePaymentAssociation.setRemark(orderListInfoDto.getRemark());
             orderReceivePaymentAssociation.setBusinessBatchNumber(businessBatchNumber);
+            orderReceivePaymentAssociation.setStatus("1");
             orderReceivePaymentAssociationService.save(orderReceivePaymentAssociation);
             actualReceivedAmount = actualReceivedAmount.add(orderListInfoDto.getActualAmount());
         }
@@ -405,6 +407,13 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, SalesOr
                     }
                     updateSalesOrderAndGoodsStatus(salesOrderReceiveExtendDto, orderStatus, goodsStatus, flag);
                 }
+                OrderReceivePaymentAssociation orderReceivePaymentAssociation = orderReceivePaymentAssociationService
+                        .queryByBusinessBatchNumberAndOrderId(e.getBusinessBatchNumber(),
+                                salesOrderReceiveExtendDto.getSalesOrderId());
+                if (orderReceivePaymentAssociation != null) {
+                    orderReceivePaymentAssociation.setStatus("2");
+                    orderReceivePaymentAssociationService.updateById(orderReceivePaymentAssociation);
+                }
             }
             orderIncomeAssociation.setOrderInfo(JSON.toJSONString(e.getSalesOrderInfo()));
             Long billingIncomeId;

+ 2 - 1
trade-service/src/main/resources/mapper/finance/paymentcollection/OrderReceivePaymentAssociationMapper.xml

@@ -15,12 +15,13 @@
 		<id column="file_id" property="fileId" />
 		<id column="business_batch_number" property="businessBatchNumber" />
 		<id column="source" property="source" />
+        <id column="status" property="status" />
 		<id column="deleted" property="deleted" />
 		<id column="gmt_create" property="gmtCreate" />
 		<id column="gmt_modified" property="gmtModified" />
 	</resultMap>
 	<sql id="Base_Column_List">
-		id, customer_user_id, order_id, order_no, goods_amount, goods_currency, actual_received_amount, actual_received_currency, remark, file_id, business_batch_number, source, deleted, gmt_create, gmt_modified
+		id, customer_user_id, order_id, order_no, goods_amount, goods_currency, actual_received_amount, actual_received_currency, remark, file_id, business_batch_number, source, status, deleted, gmt_create, gmt_modified
 	</sql>
 	
 </mapper>