Redeem 1 năm trước cách đây
mục cha
commit
c57ddc1ba9

+ 21 - 0
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -5839,6 +5839,27 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TER.RESULT_ENTRY_GATE_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TER.RESULT_ENTRY_GATE_TIME
         </if>
+        <if test="oneDate != null and isOrderDate == 1">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ASOM.SALE_DATE_OF_RECEIPT
+        </if>
+        <if test="startDate != null and isOrderDate == 1">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ASOM.SALE_DATE_OF_RECEIPT
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= ASOM.SALE_DATE_OF_RECEIPT
+        </if>
+        <if test="oneDate != null and isEnFactoryFlag == 4">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ASOM.SALE_DATE_OF_RECEIPT
+        </if>
+        <if test="startDate != null and isEnFactoryFlag == 4">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
+        </if>
+        <if test="oneDate != null and isEnFactoryFlag == 5">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null and isEnFactoryFlag == 5">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
         <if test="capacityNumber != null and capacityNumber != ''">
             and RC.CAPACITY_NUMBER like Concat('%',Concat(#{capacityNumber},'%'))
         </if>