|
@@ -38,6 +38,8 @@ import java.util.stream.Collectors;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import static com.dayou.enums.MainBusinessEnum.PERSONAL_BUSINESS;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 实收款认领 服务实现类
|
|
@@ -274,13 +276,16 @@ public class FinanceClaimServiceImpl extends ServiceImpl<FinanceClaimMapper, Fin
|
|
|
}
|
|
|
personalClaimDTOS.stream().forEach(x->{
|
|
|
//检查该订单是否创建应收款记录
|
|
|
- OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getOrderId, x.getOrderId()).eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
+ OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>()
|
|
|
+ .eq(OrderFund::getOrderId, x.getOrderId())
|
|
|
+ .eq(BaseEntity::getDeleted, Boolean.FALSE)
|
|
|
+ .eq(OrderFund::getBusinessType,PERSONAL_BUSINESS.name()));
|
|
|
if (orderFund==null){
|
|
|
Personal personal = personalService.getOne(new LambdaQueryWrapper<Personal>().select(BaseEntity::getId, Personal::getLocation).eq(Personal::getOrderId, x.getOrderId()).eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
if (personal!=null){
|
|
|
orderFund = new OrderFund();
|
|
|
orderFund.setOrderId(x.getOrderId());
|
|
|
- orderFund.setBusinessType(MainBusinessEnum.PERSONAL_BUSINESS.name());
|
|
|
+ orderFund.setBusinessType(PERSONAL_BUSINESS.name());
|
|
|
orderFund.setBusinessId(personal.getId());
|
|
|
orderFund.setOrderName(personal.getLocation());
|
|
|
orderFundService.save(orderFund);
|