|
@@ -1770,11 +1770,11 @@
|
|
|
AND OO.OPTIONER_CODE=#{orgCode}
|
|
|
</if>
|
|
|
<if test="oneDate != null">
|
|
|
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') < = greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<if test="index!=null">
|
|
|
and ((instr(RC.CAPACITY_NUMBER, #{index}) > 0) or (instr(RW1.WAREHOUSE_NAME, #{index}) > 0)
|
|
@@ -1859,11 +1859,11 @@
|
|
|
or (instr( RC.CARRIER_NAME , #{index}) > 0) or (instr(RL.LINE_NAME , #{index}) > 0))
|
|
|
</if>
|
|
|
<if test="oneDate != null">
|
|
|
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME,TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME,TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME,TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
)
|
|
|
</select>
|