commit
dc7102f6bb
running/pdf
stdiet-custom/src/main
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
package com.stdiet.custom.utils;
|
||||
|
||||
import com.stdiet.common.utils.HealthyUtils;
|
||||
import com.stdiet.common.utils.NumberUtils;
|
||||
import com.stdiet.custom.domain.SysCustomerHealthy;
|
||||
import com.stdiet.custom.dto.response.NutritionalCalories;
|
||||
|
||||
@ -19,7 +20,7 @@ public class NutritionalUtils {
|
||||
nutritionalCalories.setTall(sysCustomerHealthy.getTall());
|
||||
nutritionalCalories.setWeight(sysCustomerHealthy.getWeight().doubleValue());
|
||||
nutritionalCalories.setStandardWeight(HealthyUtils.calculateStandardWeight(nutritionalCalories.getTall()));
|
||||
double overHeight = nutritionalCalories.getWeight() - nutritionalCalories.getStandardWeight();
|
||||
double overHeight = NumberUtils.getNumberByRoundHalfUp(nutritionalCalories.getWeight() - nutritionalCalories.getStandardWeight(),1).doubleValue();
|
||||
overHeight = overHeight > 0 ? overHeight : 0;
|
||||
nutritionalCalories.setOverWeight(overHeight);
|
||||
nutritionalCalories.setMetabolizeHeat(HealthyUtils.calculateMetabolizeHeat(nutritionalCalories.getAge(), nutritionalCalories.getTall(), nutritionalCalories.getWeight()).intValue());
|
||||
|
@ -69,6 +69,28 @@
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON cp.dict_value = o.conditioning_project_id
|
||||
</sql>
|
||||
|
||||
<sql id="searchOrderType">
|
||||
<if test="searchOrderTypeArray != null">
|
||||
<trim prefix="AND (" suffix=")" suffixOverrides="or">
|
||||
<foreach collection="searchOrderTypeArray" separator="or" item="typeArray" index="i">
|
||||
(
|
||||
<foreach collection="typeArray" separator="and" item="type" index="j">
|
||||
<if test="j == 0">
|
||||
order_type = #{type}
|
||||
</if>
|
||||
<if test="j == 1">
|
||||
order_count_type = #{type}
|
||||
</if>
|
||||
<if test="j == 2">
|
||||
order_money_type = #{type}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAllOrderAmount" parameterType="SysOrder" resultType="BigDecimal">
|
||||
SELECT SUM(amount) FROM sys_order
|
||||
<where>
|
||||
@ -102,6 +124,9 @@
|
||||
and 0 > amount
|
||||
</if>
|
||||
</if>
|
||||
<include refid="searchOrderType">
|
||||
<property name="reviewStatus" value="#{searchOrderTypeArray}"/>
|
||||
</include>
|
||||
<if test="true">and del_flag = 0</if>
|
||||
<!-- 计算总额时需要除去二开售后提成单 -->
|
||||
AND after_sale_commiss_order = 0
|
||||
@ -141,26 +166,9 @@
|
||||
and 0 > amount
|
||||
</if>
|
||||
</if>
|
||||
<if test="searchOrderTypeArray != null">
|
||||
<trim prefix="AND (" suffix=")" suffixOverrides="or">
|
||||
<foreach collection="searchOrderTypeArray" separator="or" item="typeArray" index="i">
|
||||
(
|
||||
<foreach collection="typeArray" separator="and" item="type" index="j">
|
||||
<if test="j == 0">
|
||||
order_type = #{type}
|
||||
</if>
|
||||
<if test="j == 1">
|
||||
order_count_type = #{type}
|
||||
</if>
|
||||
<if test="j == 2">
|
||||
order_money_type = #{type}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
<!--(order_type = #{typeArray[0]} and order_count_type = #{typeArray[1]} and order_money_type =#{typeArray[2]})-->
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<include refid="searchOrderType">
|
||||
<property name="reviewStatus" value="#{searchOrderTypeArray}"/>
|
||||
</include>
|
||||
<if test="true">and o.del_flag = 0</if>
|
||||
</where>
|
||||
order by order_time desc
|
||||
|
Loading…
x
Reference in New Issue
Block a user