Commit 4f681e89 authored by hezhen's avatar hezhen

Merge branch 'feature_chw_zjw' into dev-chw

parents 768ae1f3 e66229b1
......@@ -222,6 +222,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
BigDecimal insureAmount = orderDetailDTO.getInsureAmount() == null ? BigDecimal.ZERO : orderDetailDTO.getInsureAmount();
log.info("-----保险分账---insureAmount===="+insureAmount);
if (insureAmount.compareTo(BigDecimal.ZERO) > 0){
Long time = System.currentTimeMillis();
Integer type = status == 1 ? 2 : 1;
BaseOrderAcceptDetailed acceptDetailed=new BaseOrderAcceptDetailed();
acceptDetailed.setMchId(0);
......@@ -231,7 +232,9 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
acceptDetailed.setOrderAmount(orderDetailDTO.getOrderAmount());
acceptDetailed.setDivisionAmount(insureAmount);
acceptDetailed.setDivisionType(9);
acceptDetailed.setAddTime(System.currentTimeMillis());
acceptDetailed.setAddTime(time);
if (status == 1)
acceptDetailed.setStatusTime(time);
acceptDetailed.setStatus(status);
acceptDetailed.setType(type);
insertSelective(acceptDetailed);
......@@ -262,6 +265,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
acceptDetailed1.setType(2);
acceptDetailed1.setId(null);
acceptDetailed1.setOrderAmount(orderAmount);
BigDecimal dAmount = BigDecimal.ZERO;
if (num.equals(acceptDetaileds.size())){
acceptDetailed1.setDivisionAmount(amount);
insertSelective(acceptDetailed1);
......@@ -269,6 +273,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
if (acceptDetailed1.getDivisionType() == 5) {
acceptDetailed1.setDivisionAmount(companyDivisionAmount);
insertSelective(acceptDetailed1);
dAmount = acceptDetailed1.getDivisionAmount();
} else if (acceptDetailed1.getDivisionType() == 2 || acceptDetailed1.getDivisionType() == 3 || acceptDetailed1.getDivisionType() == 4) {
if (otherDivisionAmount.compareTo(BigDecimal.ZERO) > 0) {
if (!orderDetailDTO.getOrderStatus().equals(OrderDetailDTO.CANEL)) {
......@@ -276,6 +281,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
acceptDetailed1.setDivisionAmount(divisionAmount);
}
insertSelective(acceptDetailed1);
dAmount = acceptDetailed1.getDivisionAmount();
orderWaterDTO.setAcceptId(acceptDetailed1.getId());
orderWaterDTO.setZAcceptId(zAcceptId);
orderWaterDTO.setOrderAmount(orderAmount);
......@@ -283,7 +289,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
}
amount=amount.subtract(acceptDetailed1.getDivisionAmount());
amount=amount.subtract(dAmount);
}
}
}
......
......@@ -3,6 +3,7 @@ package com.xxfc.platform.order.rest.background;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.msg.TableResultResponse;
......@@ -63,6 +64,9 @@ public class BgOrderPersonInsuranceController extends BaseController<OrderPerson
setPayTimeStr("下单时间");
setRefundTimeStr("退保时间");
setStatusStr("状态");
setBuyInsureIdCard("投保人身份证");
setBuyInsurePhone("投保人手机号");
setBuyInsureName("投保人名称");
}};
exportBean(log, head, () -> {
List<OrderPersonInsurance> bgList = baseBiz.selectInsuranceInfo(dto);
......@@ -70,6 +74,15 @@ public class BgOrderPersonInsuranceController extends BaseController<OrderPerson
bgList.forEach(vo -> {
//OrderNo Name IdCard
PageExportDTO ped = BeanUtil.toBean(vo, PageExportDTO.class);
if(StrUtil.isBlank(vo.getBuyInsureIdCard())) {
ped.setBuyInsureIdCard("");
}
if(StrUtil.isBlank(vo.getBuyInsureName())) {
ped.setBuyInsureName("");
}
if(StrUtil.isBlank(vo.getBuyInsurePhone())) {
ped.setBuyInsurePhone("");
}
switch (vo.getStatus()) {
case OrderPersonInsurance.STATUS_PAY:
ped.setStatusStr("已购买");
......@@ -78,6 +91,7 @@ public class BgOrderPersonInsuranceController extends BaseController<OrderPerson
case OrderPersonInsurance.STATUS_CNL:
ped.setStatusStr("已退保");
ped.setRefundTimeStr(DateUtil.date(vo.getRefundTime()).toString());
break;
default:
ped.setStatusStr("");
ped.setRefundTimeStr("");
......@@ -105,6 +119,9 @@ public class BgOrderPersonInsuranceController extends BaseController<OrderPerson
private String payTimeStr;
private String refundTimeStr;
private String statusStr;
private String buyInsureName;
private String buyInsureIdCard;
private String buyInsurePhone;
}
}
\ No newline at end of file
......@@ -44,7 +44,7 @@
and bo.has_pay = 1
<if test="keyWord != null">
and (
bo.no like concat('%',#{keyWord},'%') or opi.name like concat('%',#{keyWord},'%')
opi.id_card like concat('%',#{keyWord},'%') or opi.name like concat('%',#{keyWord},'%')
)
</if>
<if test="price != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment