Helius
2021-01-11 69d8c54fe4d0c90de196f3d92f74933d06529902
zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
@@ -7,7 +7,7 @@
import com.matrix.core.tools.ModelUtils;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.api.vo.UserAchieveVo;
import com.matrix.system.app.vo.UserAchieveVo;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.SysUsersDao;
import com.matrix.system.constance.Dictionary;
@@ -264,24 +264,9 @@
        achieveNew.setT2(orderItem.getIsFree());
        // 根据商品类型设置业绩类型
        String goodType = shoppingGoodsDao.selectById(orderItem.getGoodsId()).getGoodType();
        if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY)
                && Dictionary.SHOPPING_GOODS_TYPE_XM.equals(goodType)) {
            // 现金支付设置现金单次
            achieveNew.setProjCash(Double.parseDouble(achieveNew.getT1()));
        } else if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY)
                && Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(goodType)) {
            // 设置现金产品
            achieveNew.setGoodsCash(Double.parseDouble(achieveNew.getT1()));
        } else if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY)
                && (Dictionary.SHOPPING_GOODS_TYPE_TC.equals(goodType)
                || Dictionary.SHOPPING_GOODS_TYPE_CZK.equals(goodType)
                || Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(goodType)
                || Dictionary.SHOPPING_GOODS_TYPE_TCK.equals(goodType))) {
            // 设置卡项
        if (Dictionary.ACHIEVE_TYPE_CASH.equals(achieveNew.getT3())){
            achieveNew.setCardCash(Double.parseDouble(achieveNew.getT1()));
        } else if (!orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_CARD)) {
        } else {
            // 设置划扣金额
            achieveNew.setConsume(Double.parseDouble(achieveNew.getT1()));
        }
@@ -355,4 +340,9 @@
        return achieveNewDao.selectUserAchieveByTime(startTime, endTime, users.getSuId());
    }
    @Override
    public List<AchieveNew> findOrderItemAchieve(Long orderId) {
        return achieveNewDao.selectOrderItemAchieveByOrderId(orderId);
    }
}