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