Andru
2024-01-11 663b9b92ce3f65b43bb8be16898b85464139378d
Merge branch 'master-prod-new' into Andru-项目转增凭证

* master-prod-new:
评价优化优化
评价优化优化
修改
修改补发通知
CRM同步优化
卡包开单优化
1.修改退款拒绝问题
积分商城
添加判断排除处理
7个文件已修改
163 ■■■■■ 已修改文件
phi_platform_common/src/main/resources/mapper/platform/InvestigateDataMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/AutoDomeUtil.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/deduction/impl/DeductionSingleServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/market/impl/MarketActivityServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/questionnaire/impl/QuestionnaireServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/platform/InvestigateDataMapper.xml
@@ -8,7 +8,7 @@
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,investigateId = #{investigateId},userId = #{userId},data = #{data},projectId = #{projectId},projectName = #{projectName},shopId = #{shopId},shopName = #{shopName},deductionSingleId = #{deductionSingleId},type = #{type},startTime = #{startTime},doneTime = #{doneTime},proposal = #{proposal},userName = #{userName},doctorCorpUserId = #{doctorCorpUserId},doctorCorpUserName = #{doctorCorpUserName},nurseCorpUserId = #{nurseCorpUserId},nurseCorpUserName = #{nurseCorpUserName},deductionSingleTime = #{deductionSingleTime},isDone = #{isDone},nurseScore = #{nurseScore},consultantScore = #{consultantScore},isHighQuality = #{isHighQuality},isComplete = #{isComplete},doctorScore = #{doctorScore},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
            ,investigateId = #{investigateId},userId = #{userId},data = #{data},projectId = #{projectId},projectName = #{projectName},shopId = #{shopId},shopName = #{shopName},deductionSingleId = #{deductionSingleId},type = #{type},startTime = #{startTime},doneTime = #{doneTime},proposal = #{proposal},userName = #{userName},doctorCorpUserId = #{doctorCorpUserId},doctorCorpUserName = #{doctorCorpUserName},nurseCorpUserId = #{nurseCorpUserId},nurseCorpUserName = #{nurseCorpUserName},deductionSingleTime = #{deductionSingleTime},isDone = #{isDone},nurseScore = #{nurseScore},consultantScore = #{consultantScore},isHighQuality = #{isHighQuality},isComplete = #{isComplete},doctorScore = #{doctorScore},receptionScore = #{receptionScore},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
        </trim>
    </sql>
     
@@ -19,7 +19,7 @@
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into investigate_data (id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,isDel,createTime,editTime)  values (#{id},#{investigateId},#{userId},#{data},#{projectId},#{projectName},#{shopId},#{shopName},#{deductionSingleId},#{type},#{startTime},#{doneTime},#{proposal},#{userName},#{doctorCorpUserId},#{doctorCorpUserName},#{nurseCorpUserId},#{nurseCorpUserName},#{deductionSingleTime},#{isDone},#{nurseScore},#{consultantScore},#{isHighQuality},#{isComplete},#{doctorScore},#{isDel},#{createTime},#{editTime})
        insert into investigate_data (id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,receptionScore,isDel,createTime,editTime)  values (#{id},#{investigateId},#{userId},#{data},#{projectId},#{projectName},#{shopId},#{shopName},#{deductionSingleId},#{type},#{startTime},#{doneTime},#{proposal},#{userName},#{doctorCorpUserId},#{doctorCorpUserName},#{nurseCorpUserId},#{nurseCorpUserName},#{deductionSingleTime},#{isDone},#{nurseScore},#{consultantScore},#{isHighQuality},#{isComplete},#{doctorScore},#{receptionScore},#{isDel},#{createTime},#{editTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.questionnaire.InvestigateData" parameterType="com.hx.mybatisTool.SqlSentence" >
@@ -51,14 +51,14 @@
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.questionnaire.InvestigateData" parameterType="java.lang.Object" >
        select 
            id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,isDel,createTime,editTime
            id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,receptionScore,isDel,createTime,editTime
        from investigate_data
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.questionnaire.InvestigateData" parameterType="java.lang.Object" >
        select 
            id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,isDel,createTime,editTime
            id,investigateId,userId,data,projectId,projectName,shopId,shopName,deductionSingleId,type,startTime,doneTime,proposal,userName,doctorCorpUserId,doctorCorpUserName,nurseCorpUserId,nurseCorpUserName,deductionSingleTime,isDone,nurseScore,consultantScore,isHighQuality,isComplete,doctorScore,receptionScore,isDel,createTime,editTime
        from investigate_data
        WHERE id = #{value}
    </select>
phi_platform_user/src/main/java/com/hx/phip/AutoDomeUtil.java
@@ -2,7 +2,7 @@
import com.hx.auto.GeneratorUtil;
import com.hx.auto.common.UrlData;
import com.hx.phiappt.model.user.UserAcquisitionRecord;
import com.hx.phiappt.model.questionnaire.InvestigateData;
import com.hx.util.StringUtils;
import java.io.File;
@@ -27,7 +27,7 @@
        String controllerPackRootResourse = "phi_platform_user.src.main.resources";
        // 替换此处名字
        Class<?> clas = UserAcquisitionRecord.class;
        Class<?> clas = InvestigateData.class;
        // 获取对象生成的上层包名
phi_platform_user/src/main/java/com/hx/phip/service/deduction/impl/DeductionSingleServiceImpl.java
@@ -4792,6 +4792,10 @@
                    }
                    //发送企业微信通知药房
                    for (Employee employee : employees) {
                        // 判断是否有企业微信UserId
                        if (StringUtils.isEmpty(employee.getUserId())){
                            continue;
                        }
                        // 企业服务消息提醒
                        String sendDate = SendMessageToolV2.sendDataByTreatOrderNoticeMic(visitOrder, employee, mpToken, "1000050", content);
                        if (StringUtils.isEmpty(sendDate)) {
phi_platform_user/src/main/java/com/hx/phip/service/market/impl/MarketActivityServiceImpl.java
@@ -76,15 +76,16 @@
        //遍历领取
        String couponName = "";
        Integer isApprove = null;
        Integer isApprove = BaseEntity.NO;
        for(MarketActivityItem activityCoupon : list)
        {
            //新增
            recordItem = new MarketActivityReceiveRecordItem(activityCoupon);
            recordItemList.add(recordItem);
            //获取优惠券名称
            couponName = activityCoupon.getCommonName();
            //判断是否需要审批,如果需要审批先跳过不发放优惠券
            if(activityCoupon.getIsApprove() == BaseEntity.YES){
                couponName = activityCoupon.getCommonName();
                isApprove = activityCoupon.getIsApprove();
                continue;
            }
@@ -137,7 +138,7 @@
        }
        //发送审批通知给活动负责人-------------------------------------------------------------------------------------
        if(isApprove == BaseEntity.YES) {
//        if(isApprove == BaseEntity.YES) {
            try {
                String empUserId;
                Shop shop = commonService.selectOneByKey(ShopMapper.class, receiveRecord.getOpShopId());
@@ -153,7 +154,7 @@
                    empUserId = "18023612893";
                }
                String sendDate = MessageTemplate.receiveCouponSendToManager(empUserId, user.getName(), receiveRecord.getOpName(), shop.getName(), marketActivity.getTitle(), couponName, customParameter.getCorpMpAppId());
                String sendDate = MessageTemplate.receiveCouponSendToManager(isApprove,empUserId, user.getName(), receiveRecord.getOpName(), shop.getName(), marketActivity.getTitle(), couponName, customParameter.getCorpMpAppId());
                log.info("小程序营销活动领取优惠券通知活动负责人,userId为:{}", empUserId);
                String token = WeiXinCorpMpUtil.getApplicationAccessToken(commonService, customParameter.getCorpAppId(), customParameter.getCorpMpSecret());
                SendMessageTool.sendMessge(sendDate, token);
@@ -161,7 +162,7 @@
                log.info("小程序用户营销活动发送通知失败");
                log.info(GlobalExceptionHandler.getExceptionInformation(e));
            }
        }
//        }
        //-------------------------------------------------------------------------------------------
    }
phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -1846,7 +1846,7 @@
            orderRefundModelList.add(orderRefundNoteDto);
            //是现金 && 是第三方退款
            if(refundRecordMethod.getIsMoneyPay().equals(BaseEntity.YES) && isThirdPartyRefund == BaseEntity.YES){
            if(refundRecordMethod.getIsMoneyPay().equals(BaseEntity.YES) && isThirdPartyRefund.equals(BaseEntity.YES)){
                orderRefundNoteDtos.add(orderRefundNoteDto);
            }
@@ -1940,7 +1940,9 @@
            }else if(PayMethodTypeConstants.PAY_CRM_ZFB.equals(orderRefundNoteDto.getPaymentNumberNo())){
                refundAmountModelDto.setRefundType(1);
            }else{
                throw new TipsException("同步CRM退款,未知退款类型:"+orderRefundNoteDto.getRefundName());
                //其他的现金金额走下面已退款的流程
                continue;
                //throw new TipsException("同步CRM退款,未知退款类型:"+orderRefundNoteDto.getRefundName());
            }
            refundAmountModelDto.setAmountTotal(orderRefundNoteDto.getPaymentTotal());
            amountModelList.add(refundAmountModelDto);
@@ -1960,6 +1962,7 @@
            }
            refundModelVo = new RefundModelVo();
            refundModelVo.setThirdPartyNo(orderRefundNoteDto.getPaymentNumberNo());
            refundModelVo.setRefundTotal(orderRefundNoteDto.getPaymentTotal());
            if(PayMethodTypeConstants.PAY_INTEGRAL.equals(orderRefundNoteDto.getPaymentNumberNo())){
                refundModelVo.setModelNo(RefundModelVo.REFUND_TYPE_INTEGRAL);
@@ -1976,7 +1979,8 @@
                    refundModelVo.setModelNo(RefundModelVo.REFUND_TYPE_INCREMENT);
                    crmIncrement = crmIncrement.add(orderRefundNoteDto.getPaymentTotal());
                }else{
                    throw new TipsException("同步CRM退款,未知退款类型[001]:"+orderRefundNoteDto.getRefundName());
                    refundModelVo.setModelNo(RefundModelVo.REFUND_TYPE_HIS);
                    //crmAmount = crmAmount.add(orderRefundNoteDto.getPaymentTotal());
                }
            }
            refundModelList.add(refundModelVo);
@@ -2221,6 +2225,13 @@
            //活动规则退款处理
            OrderRefundCancelTool.activityRuleHandle(ordersTotal,refundRecord,OrderRefundCancelTool.OPT_TYPE_CANCEL,"拒绝审批",orderNodeBuilder,commonService);
            //审核不通过时,过滤出子单类型为虚拟商品的子单,对应的要把作废的优惠券恢复回有效
            List<OrderItem> vgItemList = orderItemList.stream().filter(s->s.getType().equals(OrderItemConstants.TYPE_COUPON)).collect(Collectors.toList());
            logger.info("退款审核不通过,优惠券商品数量:{}", vgItemList.size());
            if(vgItemList != null && vgItemList.size() > 0){
                OrderVirtualGoodsUtil.refundNotRecoveredCouponRestoreEffective(commonService, vgItemList, refundRecord.getId());
            }
            ordersNodeLog.setCommonType(OrdersNodeLog.TYPE_COMMON_ORDER_REFUND);
            ordersNodeLog.setContent(orderNodeBuilder.toString());
            ordersNodeLog.setOrderId(ordersTotal.getId());
phi_platform_user/src/main/java/com/hx/phip/service/questionnaire/impl/QuestionnaireServiceImpl.java
@@ -446,6 +446,7 @@
        StringBuilder proposal = new StringBuilder();
        StringBuilder nurse = new StringBuilder();
        StringBuilder doctor = new StringBuilder();
        StringBuilder reception = new StringBuilder();
        //List<String> clozeIds = Arrays.asList(questionInvestigateConfig.getNewProposal(), questionInvestigateConfig.getOldProposal());
        Integer isHighQuality = 0;
        QuestionTitle questionTitle = null;
@@ -489,6 +490,13 @@
                                doctor.append(",");
                            }
                        }
                    }else if (QuestionTitle.SPECIAL_TYPE_RECEPTION.equals(questionTitle.getSpecialType())){
                        for (int s = 0; s < answerDto.getAnswer().length; s++) {
                            reception.append(answerDto.getAnswer()[s]);
                            if (s != answerDto.getAnswer().length - 1) {
                                reception.append(",");
                            }
                        }
                    }
                }
            }
@@ -507,7 +515,9 @@
        if (doctor.length() > 0){
            data.setDoctorScore(doctor.toString());
        }
        if (reception.length() > 0){
            data.setReceptionScore(reception.toString());
        }
        data.setIsHighQuality(isHighQuality);
        int i = investigateDataMapper.insert(data);
        if (i != 1) {
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java
@@ -1240,19 +1240,23 @@
    //计算一级子订单和总订单售价,卡包比较特殊,售价=未执行划扣金额,未执行划扣金额=(卡项明细分摊金额 除以 卡项明细分摊次数 )乘以 用户划扣次数
        //一级子订单未执行划扣金额
        BigDecimal sumCardBagMoney =BigDecimal.ZERO;
        //用户划扣次数
        BigDecimal userNum =null;
        //单次划扣金额
        BigDecimal everySnapNum = null;
        //总次数
        Integer usedNum;
        CardEquity cardEquity;
        UserCardItemInfoVo userCardItemInfoVo;
        CardItemInfo cardItemInfo;
        if(vo.getCardItemInfoIds()!=null && vo.getCardItemInfoIds().size()>0){
            for(CardItemInfo info:vo.getCardItemInfoIds()){
                if(info.getUserNum() == null || info.getUserNum() < 0){
                    throw new PlatTipsException(PlatformCode.ERROR_TIPS,"卡包开单提示:购买的卡项的条目数量错误!");
                }
                cardItemInfo = commonService.selectOneByKey(CardItemInfoMapper.class,info.getId());
                //-----校验抵扣次数
                cardEquity = commonService.selectOneByKey(CardEquityMapper.class,cardItemInfo.getCardEquityId());
                //获取当前需要抵扣的次数
                //获取当前需要抵扣的总次数
                usedNum = UserCardTool.countUsedNumber(info.getUserNum(),cardItemInfo,cardEquity);
                userCardItemInfoVo = UserCardTool.getSurplusNumber(vo.getUserCardId(),cardItemInfo,cardEquity,commonService);
                if(!userCardItemInfoVo.isNumByNum()){
@@ -1262,33 +1266,37 @@
                    throw new PlatTipsException(PlatformCode.ERROR_TIPS,"卡包开单提示:卡项的次卡使用次数不够");
                }
                userNum=new BigDecimal(info.getUserNum());
                if(cardItemInfo!=null){
                    //卡项明细分摊金额
                    BigDecimal shareMoney=cardItemInfo.getShareMoney()==null?cardItemInfo.getEveryShareMoney():cardItemInfo.getShareMoney();
                    //卡项明细分摊次数
                    Integer num=cardItemInfo.getMaxNum()==null?cardItemInfo.getEveryDrawNum():cardItemInfo.getMaxNum();
               if(CardEquity.EQUITY_TYPE_TIME_CARD.equals(cardEquity.getEquityType())){
                    //-----次卡
                    //每次划扣金额
                    BigDecimal everySnapNum=shareMoney.divide(BigDecimal.valueOf(num),2,BigDecimal.ROUND_HALF_UP);
                    //一级子订单未执行划扣金额
                    sumCardBagMoney=sumCardBagMoney.add(everySnapNum.multiply(userNum));
                   if(cardItemInfo.getEveryDrawNum()>0){
                        everySnapNum = cardItemInfo.getEveryShareMoney().divide(BigDecimal.valueOf(cardItemInfo.getEveryDrawNum()),10,RoundingMode.HALF_UP);
                   }else{
                       everySnapNum = BigDecimal.ZERO;
                   }
                }else{
                    //-----N选M/固定项目/其他
                    //每次划扣金额
                   if(cardItemInfo.getMaxNum()>0){
                        everySnapNum = cardItemInfo.getShareMoney().divide(BigDecimal.valueOf(cardItemInfo.getMaxNum()),10,RoundingMode.HALF_UP);
                   }else{
                       everySnapNum = BigDecimal.ZERO;
                   }
                }
                sumCardBagMoney=sumCardBagMoney.add(everySnapNum.multiply(BigDecimal.valueOf(usedNum))).setScale(2,RoundingMode.HALF_UP);
            }
        }
        //一级子订单:售价=一级子订单未执行划扣金额
        BigDecimal actualTotal = sumCardBagMoney;
        //设置一级子订单原价(卡包:划扣项目的未执行划扣金额)
        vo.setOriPrice(sumCardBagMoney);
        //设置一级子订单售价
        vo.setCurPrice(actualTotal);
        vo.setCurPrice(sumCardBagMoney);
        //设置一级子订单优惠前小计,优惠前小计=一级子订单未执行划扣金额
        vo.setTotal(sumCardBagMoney);
        vo.setTotal(BigDecimal.ZERO);
        //设置一级子订单优惠券抵扣金额,开单不知道是否使用优惠券,默认为0
        vo.setDiscountPrice(BigDecimal.ZERO);
        //设置一级子订单优惠后小计,优惠后小计=一级子订单未执行划扣金额
        vo.setActualTotal(vo.getCurPrice());
        vo.setActualTotal(BigDecimal.ZERO);
        //设置一级子订单用户已支付总金额,开单默认为0
        vo.setUserPaidTotal(BigDecimal.ZERO);
        //设置item总积分
@@ -1305,7 +1313,7 @@
        vo.setUsedTotal(vo.getSingle()*vo.getBuyNum());//总次疗程次数,单次疗程次数*购买的总量
        Map<String,BigDecimal> moneyMap=new HashMap<>();
        moneyMap.put("actualTotal",actualTotal);
        moneyMap.put("actualTotal",vo.getActualTotal());
        moneyMap.put("discountTotal",BigDecimal.ZERO);
        return moneyMap;
    }
@@ -1881,12 +1889,16 @@
        if(cardItemInfo.getMaxNum()==null && cardItemInfo.getEveryDrawNum()==null){
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"开单:卡项组合项目最大次数或者每次划扣的扣减次数为空,组合项标识:"+cardItemInfo.getId());
        }
        CardEquity cardEquity = commonService.selectOneByKey(CardEquityMapper.class,cardItemInfo.getCardEquityId());
        //卡项明细分摊金额
        BigDecimal shareMoney=cardItemInfo.getShareMoney()==null?cardItemInfo.getEveryShareMoney():cardItemInfo.getShareMoney();
        //总金额
        BigDecimal total = BigDecimal.ZERO;
        BigDecimal pro2Price;
        BigDecimal curPrice;
        //每次划扣金额
        BigDecimal everySnapMoney=BigDecimal.ZERO;
        BigDecimal everySnapMoney;
        OrderItemSon orderItemSon=new OrderItemSon();
        //卡项明细最大次数或者每次划扣次数
@@ -1895,18 +1907,31 @@
        //数量
        orderItemSon.setBuyNum(OrderItemConstants.CARD_BAG.equals(vo.getType())?cardItemInfo.getUserNum():cardNum);
        if(OrderItemConstants.CARD_BAG.equals(vo.getType())){
            /*
             *   如果是正常买卡,那么总金额是卡项明细的分摊金额,购买次数则是卡项的最大次数或者每次划扣次数
             *   如果是已有卡项内订单,那么总金额是 每次划扣金额 * 开单数量
             *   每次划扣金额:
             *          每次划扣金额=(卡项明细分摊金额➗卡项明细最大次数或划扣最大次数)
             * */
            everySnapMoney= shareMoney.divide(BigDecimal.valueOf(cardNum),2,BigDecimal.ROUND_HALF_UP);
            //总金额=每次划扣金额 * 开单数量
            total = everySnapMoney.multiply(BigDecimal.valueOf(cardItemInfo.getUserNum()));
            if(CardEquity.EQUITY_TYPE_TIME_CARD.equals(cardEquity.getEquityType())){
                //-----次卡
                //每次划扣金额
                if(cardItemInfo.getEveryDrawNum()>0){
                    everySnapMoney = cardItemInfo.getEveryShareMoney().divide(BigDecimal.valueOf(cardItemInfo.getEveryDrawNum()),10,RoundingMode.HALF_UP);
                }else{
                    everySnapMoney = BigDecimal.ZERO;
                }
                pro2Price = cardItemInfo.getEveryShareMoney();
            }else{
                //-----N选M/固定项目/其他
                //每次划扣金额
                if(cardItemInfo.getMaxNum()>0){
                    everySnapMoney = cardItemInfo.getShareMoney().divide(BigDecimal.valueOf(cardItemInfo.getMaxNum()),2,RoundingMode.HALF_UP);
                }else{
                    everySnapMoney = BigDecimal.ZERO;
                }
                pro2Price = everySnapMoney;
            }
            curPrice = pro2Price;
        }else{
            total=shareMoney;
            pro2Price = shareMoney;
            curPrice = pro2Price;
        }
        BigDecimal originalPrice=BigDecimal.ZERO;
        if(OrderTotalConstants.TYPE_PROJECT.equals(cardItemInfo.getCommonType())){
            Project project=commonService.selectOneByKeyBlob(ProjectMapper.class,cardItemInfo.getCommonId());
@@ -2091,14 +2116,26 @@
        //项目原价
        orderItemSon.setOriPrice(originalPrice);
        //项目售价(卡项的分摊金额/卡包就是卡项分摊金额除以使用次数)
        orderItemSon.setProPrice(OrderItemConstants.CARD_BAG.equals(vo.getType())?everySnapMoney:shareMoney);
        orderItemSon.setProPrice(pro2Price);
        //售价
        orderItemSon.setCurPrice(curPrice);
        //折扣=上级item填写的商品折扣
        orderItemSon.setDiscount(vo.getDiscount());
        //订单售价=项目售价*订单折扣
        orderItemSon.setCurPrice(orderItemSon.getProPrice().multiply(orderItemSon.getDiscount().divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP)));
        if(orderItemSon.getDiscount().compareTo(BigDecimal.ZERO)> 0){
            orderItemSon.setCurPrice(orderItemSon.getCurPrice().multiply(orderItemSon.getDiscount().divide(new BigDecimal(100),10,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
        }else{
            orderItemSon.setCurPrice(BigDecimal.ZERO);
        }
        //总金额
        BigDecimal total = BigDecimal.ZERO;
        if(!OrderItemConstants.CARD_BAG.equals(vo.getType())){
            total = orderItemSon.getCurPrice().multiply(new BigDecimal(orderItemSon.getBuyNum()));
        }
        //优惠前小计=订单售价*数量
        orderItemSon.setTotal(orderItemSon.getCurPrice().multiply(new BigDecimal(orderItemSon.getBuyNum())));
        orderItemSon.setTotal(total);
        //优惠券抵扣金额
        orderItemSon.setDiscountPrice(BigDecimal.ZERO);
        //优惠后小计=优惠前小计-优惠券抵扣金额