dongke 1 yıl önce
ebeveyn
işleme
3423b9d668

+ 2 - 0
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml

@@ -81,6 +81,7 @@
         <result column="contact_name" property="contactName"/>
         <result column="contact_phone" property="contactPhone"/>
         <result column="return_address" property="returnAddress"/>
+        <result column="address_no" property="addressNo"/>
 
     </resultMap>
 
@@ -527,6 +528,7 @@
                tmc.cus_name         as "cusName",
                tmc.cus_phone        as "cusPhone",
                tmc.address_full     as "addressFull",
+               tmc.address_no   ,
                tmsp.sup_id,
                tmsp.sup_code,
                tmsp.sup_name,

+ 6 - 1
src/main/java/com/dk/mdm/model/response/mac/RecPayResponse.java

@@ -318,7 +318,12 @@ public class RecPayResponse extends PageInfo<RecPayResponse> implements Serializ
 
     @ApiModelProperty(value = "退货地址")
     private String returnAddress;
-
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
     /**
      * 资金账户编码
      */

+ 12 - 0
src/main/java/com/dk/mdm/service/mac/ReceiptService.java

@@ -1,5 +1,7 @@
 package com.dk.mdm.service.mac;
 
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.dk.common.exception.BaseBusinessException;
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.constant.Constant;
@@ -17,6 +19,8 @@ import com.dk.mdm.mapper.mst.CustomerMapper;
 import com.dk.mdm.mapper.mst.MoneyAccountItemMapper;
 import com.dk.mdm.mapper.mst.MoneyAccountMapper;
 import com.dk.mdm.mapper.mst.SaleChannelMapper;
+import com.dk.mdm.model.pojo.ivt.Inbound;
+import com.dk.mdm.model.pojo.ivt.OutboundItem;
 import com.dk.mdm.model.pojo.mac.*;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
@@ -228,6 +232,14 @@ public class ReceiptService extends BaseService<RecPay> {
                 recPayVO.setObjectId(listCustomer.get(0).getCusId());
                 recPay.setObjectId(listCustomer.get(0).getCusId());
             }
+        }else{ //如果有客户id 更新 客户信息
+            Customer customer = new Customer();
+            customer.setCusId(recPayVO.getObjectId()).setCusName(recPayVO.getCusName())
+                    .setCusPhone(recPayVO.getCusPhone()).setAddressArea(recPayVO.getAddressArea()).setAddressName(recPayVO.getAddressName())
+                    .setAddressNo(recPayVO.getAddressNo()).setAddressGcj02(recPayVO.getAddressGcj02()).setAddressFull(recPayVO.getAddressFull());
+
+            //修改
+            customerMapper.update(customer,   new UpdateWrapper<Customer>().lambda().eq(Customer::getCusId, UUID.fromString(customer.getCusId())));
         }
         // 总单保存
         super.insert(recPay);

+ 1 - 0
src/main/java/com/dk/mdm/service/mst/GoodsSkuService.java

@@ -148,6 +148,7 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 			inboundItemVO.setIntoingAmt(goodsSkuVO.getIntoQty().multiply(goodsSkuVO.getPriceInto()));
 			inboundItemVO.setPriceInto(goodsSkuVO.getPriceInto());
 			inboundItemVO.setCostPrice(goodsSkuVO.getPriceInto());
+			inboundItemVO.setCostAmt(inboundItemVO.getIntoingAmt());
 			inboundItemVO.setIntoAmt(goodsSkuVO.getIntoQty().multiply(goodsSkuVO.getPriceInto()));
 			inboundItemVO.setIntoQty(goodsSkuVO.getIntoQty());
 			inboundItemVO.setItemIndex(0);