|
|
@ -238,9 +238,9 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
BusSalesOrderDetailsVo vo = new BusSalesOrderDetailsVo(); |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
vo.setCreateDate(DateUtil.formatDate(entity.getCreateDate())); |
|
|
|
if(!entity.getCustomerPhoto().contains(fileUploadComponent.getUrlPrefix())){ |
|
|
|
vo.setCustomerPhoto(fileUploadComponent.getUrlPrefix()+entity.getCustomerPhoto()); |
|
|
|
}else{ |
|
|
|
if (!entity.getCustomerPhoto().contains(fileUploadComponent.getUrlPrefix())) { |
|
|
|
vo.setCustomerPhoto(fileUploadComponent.getUrlPrefix() + entity.getCustomerPhoto()); |
|
|
|
} else { |
|
|
|
vo.setCustomerPhoto(entity.getCustomerPhoto()); |
|
|
|
} |
|
|
|
//查询主车车型信息
|
|
|
@ -365,10 +365,20 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
if ("1".equals(dto.getIsTop())) { |
|
|
|
//上装价格
|
|
|
|
BusSalesOrderMakeupDto busSalesOrderMakeup = dto.getBusSalesOrderMakeup(); |
|
|
|
if (StringUtils.isBlank(busSalesOrderMakeup.getTopName())) { |
|
|
|
return rb.setMsg("包含上装下上装名称不能为空"); |
|
|
|
} |
|
|
|
String topPrice = busSalesOrderMakeup.getTopPrice(); |
|
|
|
// String topPrice = dto.getBusSalesOrderMakeup().getTopPrice();
|
|
|
|
singleGuildPriceBig = singleGuildPriceBig.add(new BigDecimal(topPrice)); |
|
|
|
singleFinalPriceBig = singleFinalPriceBig.add(new BigDecimal(topPrice)); |
|
|
|
if(StringUtils.isNotBlank(topPrice)){ |
|
|
|
singleGuildPriceBig = singleGuildPriceBig.add(new BigDecimal(topPrice)); |
|
|
|
singleFinalPriceBig = singleFinalPriceBig.add(new BigDecimal(topPrice)); |
|
|
|
} |
|
|
|
} |
|
|
|
if("1".equals(dto.getIsInsurance())){ |
|
|
|
BusSalesOrderInsuranceDto busSalesOrderInsurance = dto.getBusSalesOrderInsurance(); |
|
|
|
if(StringUtils.isBlank(busSalesOrderInsurance.getInsuranceName())){ |
|
|
|
return rb.setMsg("公司入保下保险公司名称不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
//单台指导价(主车+上装价格)
|
|
|
|
String singleGuildPrice = dto.getBusSalesOrderPrice().getSingleGuildPrice(); |
|
|
@ -429,7 +439,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
//判断补交金额和订金合计-本次结转金额
|
|
|
|
String makeUpDeposit = dto.getBusSalesOrderDeposit().getMakeUpDeposit(); |
|
|
|
if (StringUtils.isNotBlank(makeUpDeposit)) { |
|
|
|
if(depositBig.compareTo(new BigDecimal(depositAll))>0){ |
|
|
|
if (depositBig.compareTo(new BigDecimal(depositAll)) > 0) { |
|
|
|
return rb.setMsg("本次结转金额之和已超订金合计金额"); |
|
|
|
} |
|
|
|
if (new BigDecimal(makeUpDeposit).compareTo(new BigDecimal(depositAll).subtract(depositBig)) != 0) { |
|
|
@ -462,8 +472,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
List<BusDepositFictitiousDto> busDepositFictitiousDtoList = dto.getBusDepositFictitiousList(); |
|
|
|
BusSalesOrder busSalesOrder = fetchBySid(dto.getSid()); |
|
|
|
BeanUtil.copyProperties(dto, busSalesOrder, "sid"); |
|
|
|
if(dto.getCustomerPhoto().contains(fileUploadComponent.getUrlPrefix())){ |
|
|
|
busSalesOrder.setCustomerPhoto(dto.getCustomerPhoto().replace(fileUploadComponent.getUrlPrefix(),"")); |
|
|
|
if (dto.getCustomerPhoto().contains(fileUploadComponent.getUrlPrefix())) { |
|
|
|
busSalesOrder.setCustomerPhoto(dto.getCustomerPhoto().replace(fileUploadComponent.getUrlPrefix(), "")); |
|
|
|
} |
|
|
|
baseMapper.updateById(busSalesOrder); |
|
|
|
//主车车型信息保存
|
|
|
|