|
|
@@ -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);
|