Sfoglia il codice sorgente

Merge branch 'HEAD' of https://git.steerinfo.com/caol/jg_wzjl_api.git

dengyj 4 anni fa
parent
commit
11850ba1dd

+ 3 - 3
src/main/java/com/steerinfo/pretrack/prehookscale/controller/PreHookScaleController.java

@@ -148,11 +148,11 @@ public class PreHookScaleController extends BaseRESTfulController {
             @ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", dataType = "Integer")
     })
-    @GetMapping(value = "/selectPre")
-    public RESTfulResult selectPre(@RequestParam String railwayNo, Integer pageNum, Integer pageSize) {
+    @PostMapping(value = "/selectPre")
+    public RESTfulResult selectPre(@RequestBody HashMap map) {
         RESTfulResult rm = failed();
         try {
-            PageList<PreHookScale> pageInfo = preHookScaleService.selectPre(railwayNo, pageNum, pageSize);
+            PageList<PreHookScale> pageInfo = preHookScaleService.selectPre(map);
             return success(pageInfo);
         } catch (MarkerMetException e) {
             e.printStackTrace();

+ 2 - 1
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.java

@@ -3,6 +3,7 @@ package com.steerinfo.pretrack.prehookscale.mapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import java.math.*;
+import java.util.HashMap;
 import java.util.List;
 
 import org.apache.ibatis.annotations.Mapper;
@@ -17,5 +18,5 @@ public interface PreHookScaleMapper extends IBaseMapper<PreHookScale, String> {
 
     int batchUpdateByIdsForUsed(List<String> ids);
 
-    List<PreHookScale> selectPre(String railwayNo);
+    List<PreHookScale> selectPre(HashMap map);
 }

+ 165 - 3
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.xml

@@ -1545,11 +1545,173 @@
     order by CREATE_TIME desc
   </select>
 
-  <select id="selectPre" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="selectPre" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
-    where VALUE_FLAG = '1' or VALUE_FLAG = '4'
+    where (VALUE_FLAG = '1' or VALUE_FLAG = '4')
+    <if test="predictionNo != null and predictionNo != ''">
+      and PREDICTION_NO = #{predictionNo}
+    </if>
+    <if test="noticeNo != null and noticeNo != ''">
+      and NOTICE_NO = #{noticeNo}
+    </if>
     <if test="railwayNo != null and railwayNo != ''">
-      and RAILWAY_NO LIKE '%${railwayNo}'
+      and RAILWAY_NO = #{railwayNo}
+    </if>
+    <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+      and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
+    </if>
+    <if test="matterNo != null and matterNo != ''">
+      and MATTER_NO = #{matterNo}
+    </if>
+    <if test="matterName != null and matterName != ''">
+      and MATTER_NAME = #{matterName}
+    </if>
+    <if test="contractNo != null and contractNo != ''">
+      and CONTRACT_NO = #{contractNo}
+    </if>
+    <if test="batchNo != null and batchNo != ''">
+      and BATCH_NO = #{batchNo}
+    </if>
+    <if test="customerSupplierNo != null and customerSupplierNo != ''">
+      and CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
+    </if>
+    <if test="customerSupplierName != null and customerSupplierName != ''">
+      and CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
+    </if>
+    <if test="sourceArea != null and sourceArea != ''">
+      and SOURCE_AREA = #{sourceArea}
+    </if>
+    <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+      and FORWARDING_UNIT_NO = #{forwardingUnitNo}
+    </if>
+    <if test="forwardingUnitName != null and forwardingUnitName != ''">
+      and FORWARDING_UNIT_NAME = #{forwardingUnitName}
+    </if>
+    <if test="receivingUintNo != null and receivingUintNo != ''">
+      and RECEIVING_UINT_NO = #{receivingUintNo}
+    </if>
+    <if test="receivingUintName != null and receivingUintName != ''">
+      and RECEIVING_UINT_NAME = #{receivingUintName}
+    </if>
+    <if test="materialNo != null and materialNo != ''">
+      and MATERIAL_NO = #{materialNo}
+    </if>
+    <if test="materialName != null and materialName != ''">
+      and MATERIAL_NAME = #{materialName}
+    </if>
+    <if test="specNo != null and specNo != ''">
+      and SPEC_NO = #{specNo}
+    </if>
+    <if test="specName != null and specName != ''">
+      and SPEC_NAME = #{specName}
+    </if>
+    <if test="shipmentGrossWeight != null">
+      and SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
+    </if>
+    <if test="shipmentNetWeight != null">
+      and SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
+    </if>
+    <if test="shipmentNum != null">
+      and SHIPMENT_NUM = #{shipmentNum}
+    </if>
+    <if test="loadPointNo != null and loadPointNo != ''">
+      and LOAD_POINT_NO = #{loadPointNo}
+    </if>
+    <if test="loadPointName != null and loadPointName != ''">
+      and LOAD_POINT_NAME = #{loadPointName}
+    </if>
+    <if test="sampleNo != null and sampleNo != ''">
+      and SAMPLE_NO = #{sampleNo}
+    </if>
+    <if test="sampleVoucher != null and sampleVoucher != ''">
+      and SAMPLE_VOUCHER = #{sampleVoucher}
+    </if>
+    <if test="carrierUnitNo != null and carrierUnitNo != ''">
+      and CARRIER_UNIT_NO = #{carrierUnitNo}
+    </if>
+    <if test="carrierUnitName != null and carrierUnitName != ''">
+      and CARRIER_UNIT_NAME = #{carrierUnitName}
+    </if>
+    <if test="predictionType != null and predictionType != ''">
+      and PREDICTION_TYPE = #{predictionType}
+    </if>
+    <if test="predictionCombination != null and predictionCombination != ''">
+      and PREDICTION_COMBINATION = #{predictionCombination}
+    </if>
+    <if test="meterTypeNo != null and meterTypeNo != ''">
+      and METER_TYPE_NO = #{meterTypeNo}
+    </if>
+    <if test="meterTypeName != null and meterTypeName != ''">
+      and METER_TYPE_NAME = #{meterTypeName}
+    </if>
+    <if test="effectiveStartTime != null">
+      and TO_CHAR(EFFECTIVE_START_TIME,'yyyy-MM-dd') = #{effectiveStartTime}
+    </if>
+    <if test="effectiveEndTime != null">
+      and TO_CHAR(EFFECTIVE_END_TIME,'yyyy-MM-dd') = #{effectiveEndTime}
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and RAILWAY_TYPE_NO = #{railwayTypeNo}
+    </if>
+    <if test="railwayTypeName != null and railwayTypeName != ''">
+      and RAILWAY_TYPE_NAME = #{railwayTypeName}
+    </if>
+    <if test="memo != null and memo != ''">
+      and MEMO = #{memo}
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and VALUE_FLAG = #{valueFlag}
+    </if>
+    <if test="usedTime != null">
+      and TO_CHAR(USED_TIME,'yyyy-MM-dd') = #{usedTime}
+    </if>
+    <if test="createManNo != null and createManNo != ''">
+      and CREATE_MAN_NO = #{createManNo}
+    </if>
+    <if test="createManName != null and createManName != ''">
+      and CREATE_MAN_NAME = #{createManName}
+    </if>
+    <if test="createTime != null">
+      and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+    </if>
+    <if test="updateManNo != null and updateManNo != ''">
+      and UPDATE_MAN_NO = #{updateManNo}
+    </if>
+    <if test="updateManName != null and updateManName != ''">
+      and UPDATE_MAN_NAME = #{updateManName}
+    </if>
+    <if test="updateTime != null">
+      and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+    </if>
+    <if test="deleteManNo != null and deleteManNo != ''">
+      and DELETE_MAN_NO = #{deleteManNo}
+    </if>
+    <if test="deleteManName != null and deleteManName != ''">
+      and DELETE_MAN_NAME = #{deleteManName}
+    </if>
+    <if test="deleteTime != null">
+      and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+    </if>
+    <if test="pValueFlag != null and pValueFlag != ''">
+      and P_VALUE_FLAG = #{pValueFlag}
+    </if>
+    <if test="isChemical != null and isChemical != ''">
+      and IS_CHEMICAL = #{isChemical}
+    </if>
+    <if test="limitWeight != null">
+      and LIMIT_WEIGHT = #{limitWeight}
+    </if>
+    <if test="railwayModelNo != null and railwayModelNo != ''">
+      and RAILWAY_MODEL_NO = #{railwayModelNo}
+    </if>
+    <if test="railwayModelName != null and railwayModelName != ''">
+      and RAILWAY_MODEL_NAME = #{railwayModelName}
+    </if>
+    <if test="arrival != null and arrival != ''">
+      and ARRIVAL = #{arrival}
+    </if>
+    <if test="station != null and station != ''">
+      and STATION = #{station}
     </if>
     order by CREATE_TIME desc
   </select>

+ 1 - 1
src/main/java/com/steerinfo/pretrack/prehookscale/service/IPreHookScaleService.java

@@ -28,7 +28,7 @@ public interface IPreHookScaleService extends IBaseService<PreHookScale, String>
 
     PageList<PreHookScale> selectlist(String railwayNo, Integer pageNum, Integer pageSize);
 
-    PageList<PreHookScale> selectPre(String railwayNo, Integer pageNum, Integer pageSize);
+    PageList<PreHookScale> selectPre(HashMap map);
 
     PageList<PreHookScale> queryLikeForRailwayNo(Map<String, Object> var1, Integer var2, Integer var3);
 }

+ 5 - 5
src/main/java/com/steerinfo/pretrack/prehookscale/service/impl/PreHookScaleServiceImpl.java

@@ -9,6 +9,7 @@ import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
 import com.steerinfo.pretrack.prehookscale.service.IPreHookScaleService;
 import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
+import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -57,12 +58,11 @@ public class PreHookScaleServiceImpl extends BaseServiceImpl<PreHookScale, Strin
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public PageList<PreHookScale> selectPre(String railwayNo, Integer pageNum, Integer pageSize) {
-        if (railwayNo == null && "".equals(railwayNo)) {
-            throw new MarkerMetException(500, "车号为空!!");
-        }
+    public PageList<PreHookScale> selectPre(HashMap map) {
+        int pageNum = map.get("pageNum") == null ? 1 : Integer.parseInt(map.get("pageNum").toString());
+        int pageSize = map.get("pageSize") == null ? 20 : Integer.parseInt(map.get("pageSize").toString());
         PageHelper.startPage(pageNum, pageSize);
-        List<PreHookScale> list = preHookScaleMapper.selectPre(railwayNo);
+        List<PreHookScale> list = preHookScaleMapper.selectPre(map);
         PageList pageInfo = new PageList(list);
         return pageInfo;
     }

+ 3 - 0
src/main/java/com/steerinfo/pretrack/pretrackscale/mapper/PreTrackScaleMapper.xml

@@ -3219,6 +3219,9 @@
             <if test="pValueFlag != null and pValueFlag != ''">
                 and P_VALUE_FLAG = #{pValueFlag}
             </if>
+            <if test="lineDesc != null and lineDesc != ''">
+              and LINE_DESC = #{lineDesc}
+            </if>
         </where>
         order by CREATE_TIME desc
     </select>