|
@ -145,6 +145,8 @@ import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
import com.yxt.anrui.portal.api.sysuser.UserQuery; |
|
|
import com.yxt.anrui.portal.api.sysuser.UserQuery; |
|
|
|
|
|
import com.yxt.anrui.reportcenter.api.carsSoldProfit.CarsSoldProfitDto; |
|
|
|
|
|
import com.yxt.anrui.reportcenter.api.carsSoldProfit.CarsSoldProfitFeign; |
|
|
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamine; |
|
|
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamine; |
|
|
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamineFeign; |
|
|
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamineFeign; |
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitfileexamine.LoanHomevisitFileexamineFeign; |
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitfileexamine.LoanHomevisitFileexamineFeign; |
|
@ -303,6 +305,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FinKingDeeFeign finKingDeeFeign; |
|
|
private FinKingDeeFeign finKingDeeFeign; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private CarsSoldProfitFeign carsSoldProfitFeign; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 构造出库申请的查询条件 |
|
|
* 构造出库申请的查询条件 |
|
|
* |
|
|
* |
|
@ -1184,6 +1189,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
Future future10 = pool.submit(() -> { |
|
|
Future future10 = pool.submit(() -> { |
|
|
pushOtherDocument(busDeliveredApply, detailsList); |
|
|
pushOtherDocument(busDeliveredApply, detailsList); |
|
|
}); |
|
|
}); |
|
|
|
|
|
/*Future future13 = pool.submit(() -> { |
|
|
|
|
|
pushCarSoldProfit(busDeliveredApply, detailsList); |
|
|
|
|
|
});*/ |
|
|
//推送单车返利管理
|
|
|
//推送单车返利管理
|
|
|
String concatNo = busDeliveredApply.getContractNo(); |
|
|
String concatNo = busDeliveredApply.getContractNo(); |
|
|
BusSalesOrder busSalesOrder = busSalesOrderService.selectOrderByContractNo(concatNo).getData(); |
|
|
BusSalesOrder busSalesOrder = busSalesOrderService.selectOrderByContractNo(concatNo).getData(); |
|
@ -1367,6 +1375,67 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void pushCarSoldProfit(BusDeliveredApply busDeliveredApply, List<BusDeliveredApplyDetails> detailsList) { |
|
|
|
|
|
List<CarsSoldProfitDto> dtoList = new ArrayList<>(); |
|
|
|
|
|
detailsList.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if(!detailsList.isEmpty()){ |
|
|
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderService.selectByContractNos(busDeliveredApply.getContractNo()); |
|
|
|
|
|
for (int i = 0; i < detailsList.size(); i++) { |
|
|
|
|
|
BusDeliveredApplyDetails busDeliveredApplyDetails = detailsList.get(i); |
|
|
|
|
|
BaseVehicle baseVehicle = baseVehicleFeign.fetchBySid(busDeliveredApplyDetails.getVinSid()).getData(); |
|
|
|
|
|
CarsSoldProfitDto carsSoldProfitDto = new CarsSoldProfitDto(); |
|
|
|
|
|
carsSoldProfitDto.setStaffSid(busSalesOrder.getStaffSid());//销售专员
|
|
|
|
|
|
carsSoldProfitDto.setStaffName(busSalesOrder.getStaffName()); |
|
|
|
|
|
carsSoldProfitDto.setCustomerSid(busSalesOrder.getCustomerSid()); |
|
|
|
|
|
carsSoldProfitDto.setCustomerName(busSalesOrder.getCustomerName()); |
|
|
|
|
|
//金融服务费
|
|
|
|
|
|
//中介返利
|
|
|
|
|
|
|
|
|
|
|
|
//车辆台账中取
|
|
|
|
|
|
carsSoldProfitDto.setOrgSidPath(baseVehicle.getOrgSidPath()); |
|
|
|
|
|
//分公司
|
|
|
|
|
|
carsSoldProfitDto.setUseOrgSid(baseVehicle.getUseOrgSid()); |
|
|
|
|
|
carsSoldProfitDto.setUseOrgName(baseVehicle.getUseOrgName()); |
|
|
|
|
|
//销售日期
|
|
|
|
|
|
carsSoldProfitDto.setSaleDate(baseVehicle.getSalesDate()); |
|
|
|
|
|
//车架号
|
|
|
|
|
|
carsSoldProfitDto.setVinNo(baseVehicle.getVinNo()); |
|
|
|
|
|
//车型
|
|
|
|
|
|
carsSoldProfitDto.setVehModelSid(baseVehicle.getModelSid()); |
|
|
|
|
|
carsSoldProfitDto.setVehMConfigSid(baseVehicle.getModelConfigSid()); |
|
|
|
|
|
carsSoldProfitDto.setPurchaseSystemSid(baseVehicle.getPurchaseSystemSid()); |
|
|
|
|
|
carsSoldProfitDto.setPurchaseSystemName(baseVehicle.getPurchaseSystemName()); |
|
|
|
|
|
//入库价
|
|
|
|
|
|
//出库价
|
|
|
|
|
|
carsSoldProfitDto.setExStockPrice(baseVehicle.getContractPrice().toString()); |
|
|
|
|
|
//存放地点
|
|
|
|
|
|
carsSoldProfitDto.setLocationSid(baseVehicle.getLocation()); |
|
|
|
|
|
carsSoldProfitDto.setLocationName(baseVehicle.getLocationName()); |
|
|
|
|
|
//厂家结算价
|
|
|
|
|
|
carsSoldProfitDto.setMakersSettlementPrice(baseVehicle.getSettlePrice().toString()); |
|
|
|
|
|
|
|
|
|
|
|
//排产订单编号
|
|
|
|
|
|
|
|
|
|
|
|
//变速箱
|
|
|
|
|
|
|
|
|
|
|
|
//数据日期
|
|
|
|
|
|
carsSoldProfitDto.setCreateDate(new Date()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dtoList.add(carsSoldProfitDto); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if(!dtoList.isEmpty()){ |
|
|
|
|
|
ResultBean resultBean = carsSoldProfitFeign.saveOrUpdate(dtoList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void pushVehRebateAdjustBill(BusDeliveredApply busDeliveredApply, List<BusDeliveredApplyDetails> detailsList, SolutionsDetailsVo solutionsDetailsVo) { |
|
|
private void pushVehRebateAdjustBill(BusDeliveredApply busDeliveredApply, List<BusDeliveredApplyDetails> detailsList, SolutionsDetailsVo solutionsDetailsVo) { |
|
|
BigDecimal cjtx = BigDecimal.ZERO;//厂家贴息
|
|
|
BigDecimal cjtx = BigDecimal.ZERO;//厂家贴息
|
|
|
BigDecimal txdck = BigDecimal.ZERO;//贴息抵车款
|
|
|
BigDecimal txdck = BigDecimal.ZERO;//贴息抵车款
|
|
|