dengyj пре 4 година
родитељ
комит
44f2794ccd

+ 5 - 6
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml

@@ -3690,7 +3690,6 @@
     order by carriage_Code desc, A.create_time desc
   </select>
 
-
   <select id="batchMatchFirstView" parameterType="java.util.HashMap" resultType="HashMap">
     select A.create_time gross_Time,
     A.actual_first_no gross_no,
@@ -3698,22 +3697,22 @@
     A.matter_name matter_name,
     A.lc_no gorss_lc_No,
     A.railway_no railway_No,
-    A.meter_weight/1000 gross_Weight,
+    to_char(round(A.meter_weight/1000,3),'FM9999999999999999.000') gross_Weight,
     A.weight_type gross_weight_Type,
     A.base_spot_no base_spot1_no,
     A.base_spot_name base_spot1_name,
     A.value_flag vlaue_Flag,
     A.is_pre_sacale is_Pre_Sacale,
     D.meter_weight ai_weight,
-    C.meter_weight/1000 his_Tare_Weight,
+    to_char(round(C.meter_weight/1000,3),'FM9999999999999999.000') his_Tare_Weight,
     E.create_time tare_time,
     E.lc_no tare_lc_no,
     E.Actual_First_No tare_no,
-    E.meter_weight/1000 tare_weight,
+    to_char(round(E.meter_weight/1000,3),'FM9999999999999999.000') tare_weight,
     E.Weight_Type tare_weight_type,
-    B.CARRIAGE_WEIGHT/1000 carriage_Weight,
+    to_char(round(B.CARRIAGE_WEIGHT/1000,3),'FM9999999999999999.000') carriage_Weight,
     A.conveyance_type conveyance_Type,
-    A.railway_factory_weight/1000 railway_Factory_Weight,
+    to_char(round(A.railway_factory_weight/1000,3),'FM9999999999999999.000') railway_Factory_Weight,
     A.note note
     from meter_work_railway_act_first A
       left join meter_base_railway_carriage_weight B

+ 5 - 5
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml

@@ -4340,14 +4340,14 @@
     A.prediction_no prediction_no,
     A.matter_name,
     A.actual_first1_no grossNo,
-    A.gross_weight/1000 grossWeight,
+    to_char(round(A.gross_weight / 1000,3),'FM9999999999999999.000') grossWeight,
     A.gross_time grossTime,
     A.base_spot1_name grossSpot,
     A.actual_first2_no tareNo,
-    A.tare_weight/1000  tareWeight,
+    to_char(round(A.tare_weight / 1000, 3),'FM9999999999999999.000') tareWeight,
     A.tare_time tareTime,
     A.base_spot2_name tareSpot,
-    A.net_weight/1000 netWeight,
+    to_char(round(A.net_weight / 1000, 3),'FM9999999999999999.000') netWeight,
     A.net_time netTime,
     A.net_spot3_name netSpot,
     A.note note,
@@ -4355,10 +4355,10 @@
     E.Actual_First_No tare_no,
     E.create_time tare_time,
     E.PREDICTION_NO tare_scale_no,
-    E.Meter_weight/1000 tare_weight,
+    to_char(round(E.Meter_weight / 1000, 3),'FM9999999999999999.000') tare_weight,
     E.Weight_Type tare_weight_type,
     A.conveyance_type conveyance_type,
-    B.CARRIAGE_WEIGHT/1000 crriage_weight
+    to_char(round(B.CARRIAGE_WEIGHT / 1000, 3) ,'FM9999999999999999.000') crriage_weight
     from meter_work_railway_actual A
     left join meter_base_railway_carriage_weight B
     on A.conveyance_type = B.Carriage_Code

+ 1 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactualbak/mapper/MeterWorkRailwayActualBakMapper.java

@@ -51,6 +51,7 @@ public interface MeterWorkRailwayActualBakMapper extends IBaseMapper<MeterWorkRa
 
     List<MeterWorkRailwayActualBak> selectByParameter(Map<String, Object> params);
     List<MeterWorkRailwayActualBak> likeByDesc(Map<String, Object> params);
+    List<MeterWorkRailwayActualBak> likeByDescTemp(Map<String, Object> params);
 
     List<MeterWorkRailwayActualBak> selectByAcatualFristNo(Map<String, Object> params);
     List<MeterWorkRailwayActualBak> autoPrintRailway(Map<String, Object> params);

+ 132 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactualbak/mapper/MeterWorkRailwayActualBakMapper.xml

@@ -3764,12 +3764,12 @@
     </if>
     <if test="grossLcNo != null and grossLcNo != ''">
       and actual_first1_no in (
-      select B.actual_first_no from meter_work_railway_act_first B where B.lc_no = #{grossLcNo}
+      select B.actual_first_no from meter_work_railway_act_first_bak B where B.lc_no = #{grossLcNo}
       )
     </if>
     <if test="tareLcNo != null and tareLcNo != ''">
       and actual_first2_no in (
-      select C.actual_first_no from meter_work_railway_act_first C where C.lc_no = #{tareLcNo}
+      select C.actual_first_no from meter_work_railway_act_first_bak C where C.lc_no = #{tareLcNo}
       )
     </if>
     <!--and RAILWAY_NO like '%${railwayNo}%'-->
@@ -3806,6 +3806,9 @@
     <if test="valueFlag != null and valueFlag != ''">
       and  VALUE_FLAG = #{valueFlag}
     </if>
+    <if test="isPreSacale != null and isPreSacale">
+      and is_pre_sacale = #{isPreSacale}
+    </if>
     <if test="railwayNo != null and railwayNo != ''">
       and railway_no like '%${railwayNo}%'
     </if>
@@ -3926,6 +3929,133 @@
     order by net_time desc
   </select>
 
+  <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
+  <select id="likeByDescTemp" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <where>
+      1 = 1
+      <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+        and  net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="actualNo != null and actualNo != ''">
+        and ACTUAL_NO LIKE '%${actualNo}%'
+      </if>
+      <if test="predictionNo != null and predictionNo != ''">
+        and PREDICTION_NO LIKE '%${predictionNo}%'
+      </if>
+
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}%'
+      </if>
+      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+        and RAILWAY_CARRIAGE_NO LIKE '%${railwayCarriageNo}%'
+      </if>
+      <if test="matterNo != null and matterNo != ''">
+        and MATTER_NO LIKE '%${matterNo}%'
+      </if>
+      <if test="matterName != null and matterName != ''">
+        and MATTER_NAME LIKE '%${matterName}%'
+      </if>
+
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+      </if>
+      <if test="materialNo != null and materialNo != ''">
+        and MATERIAL_NO LIKE '%${materialNo}%'
+      </if>
+      <if test="materialName != null and materialName != ''">
+        and MATERIAL_NAME LIKE '%${materialName}%'
+      </if>
+      <if test="meterTypeNo != null and meterTypeNo != ''">
+        and METER_TYPE_NO LIKE '%${meterTypeNo}%'
+      </if>
+      <if test="meterTypeName != null and meterTypeName != ''">
+        and METER_TYPE_NAME LIKE '%${meterTypeName}%'
+      </if>
+      <if test="netManNo != null and netManNo != ''">
+        and NET_MAN_NO LIKE '%${netManNo}%'
+      </if>
+      <if test="netManName != null and netManName != ''">
+        and NET_MAN_NAME LIKE '%${netManName}%'
+      </if>
+      <if test="netTime != null">
+        and TO_CHAR(NET_TIME,'yyyy-MM-dd') = #{netTime}
+      </if>
+      <if test="netSpot3No != null and netSpot3No != ''">
+        and NET_SPOT3_NO LIKE '%${netSpot3No}%'
+      </if>
+      <if test="netSpot3Name != null and netSpot3Name != ''">
+        and NET_SPOT3_NAME LIKE '%${netSpot3Name}%'
+      </if>
+      <if test="netMode != null and netMode != ''">
+        and NET_MODE LIKE '%${netMode}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="uploadFlag != null and uploadFlag != ''">
+        and UPLOAD_FLAG LIKE '%${uploadFlag}%'
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
+      </if>
+      <if test="senderType != null and senderType != ''">
+        and SENDER_TYPE LIKE '%${senderType}%'
+      </if>
+      <if test="senderRemark != null and senderRemark != ''">
+        and SENDER_REMARK LIKE '%${senderRemark}%'
+      </if>
+      <if test="receiverRemark != null and receiverRemark != ''">
+        and RECEIVER_REMARK LIKE '%${receiverRemark}%'
+      </if>
+      <if test="dataSource != null and dataSource != ''">
+        and DATA_SOURCE LIKE '%${dataSource}%'
+      </if>
+      <if test="isPreSacale != null and isPreSacale != ''">
+        and IS_PRE_SACALE LIKE '%${isPreSacale}%'
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO LIKE '%${lcNo}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and NET_SPOT3_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and NET_SPOT3_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE LIKE '%${predictionType}%'
+      </if>
+      <if test="flag != null and flag !=''">
+        and lc_no is null
+      </if>
+      <if test="grossLcNo != null and grossLcNo != ''">
+        and actual_first1_no in (
+        select B.actual_first_no from meter_work_railway_act_first B where B.lc_no = #{grossLcNo}
+        )
+      </if>
+      <if test="tareLcNo != null and tareLcNo != ''">
+        and actual_first2_no in (
+        select C.actual_first_no from meter_work_railway_act_first C where C.lc_no = #{tareLcNo}
+        )
+      </if>
+    </where>
+    and value_flag != '0'
+    order by net_time desc
+  </select>
+
   <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select" />
     <where>

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayactualbak/service/impl/MeterWorkRailwayActualBakServiceImpl.java

@@ -2566,7 +2566,7 @@ public class MeterWorkRailwayActualBakServiceImpl extends BaseServiceImpl<MeterW
                 parameters.put("lcNoNull", "");
             }
         }
-        List<MeterWorkRailwayActualBak> rows = meterWorkRailwayActualBakMapper.likeByDesc(parameters);
+        List<MeterWorkRailwayActualBak> rows = meterWorkRailwayActualBakMapper.likeByDescTemp(parameters);
         return rows;
     }