luobang hace 2 años
padre
commit
498ab38441

+ 8 - 21
src/main/java/com/steerinfo/dil/controller/WmsInboundResultController.java

@@ -207,34 +207,21 @@ public class WmsInboundResultController extends BaseRESTfulController {
                                              Integer pageSize,
                                              Integer warehouseId,
                                              String con) {
+        String startTime = null;
+        String endTime = null;
+        if(mapValue.get("startTime") != null && mapValue.get("endTime") != null) {
+            startTime = mapValue.get("startTime").toString();
+            endTime = mapValue.get("endTime").toString();
+        }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         if (mapValue == null){
             mapValue = new HashMap<>();
         }
         if(con != null){
-            if(!"undefined".equals(con)){
-                String index = "get_wms_reservedresult";
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
-            }
+
         }
         mapValue.put("warehouseId",warehouseId);
         List<Map<String,Object>>inboundResultList = null;
-        if(mapValue.size() == 0){
-            //将查询结果存入索引中
-            inboundResultList = wmsInboundResultServiceImpl.getWmsReservedResult(mapValue);
-            Map<String, Object> inboundResultMap = new HashMap<>();
-            //添加索引
-            inboundResultMap.put("index","get_wms_reservedresult");
-            //添加ID
-            inboundResultMap.put("indexId","reservedresultId");
-            inboundResultList.add(inboundResultMap);
-            //新建索引
-            esFeign.insertIndex(inboundResultList);
-            //删除
-            inboundResultList.remove(inboundResultList.size() -1);
-        }
-        if(inboundResultList == null) {
-            inboundResultList = wmsInboundResultServiceImpl.getWmsReservedResult(mapValue);
-        }
         /*分页*/
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String,Object>> columnList = wmsInboundResultServiceImpl.getWmsReservedResult(mapValue);

+ 7 - 4
src/main/resources/com/steerinfo/dil/mapper/WmspInboundResultMapper.xml

@@ -947,18 +947,21 @@
         ON rm.MATERIAL_ID = rms.MATERIAL_ID
         LEFT JOIN RMS_PWAREHOUSE_GRID rpg
         ON RPG.GRID_ID = wir.GRID_ID
-
         LEFT JOIN RMS_WAREHOUSE RW
         ON RW.WAREHOUSE_ID = rpg.WAREHOUSE_ID
-
         LEFT JOIN RMS_STACKING RS
         ON RS.STACKING_ID = RPG.STACKING_ID
-
-
         where wir.inbound_type = 0
         and wir.result_deleted = 0
         and wir.INBOUND_ISCOMPLETE = 2
         and rpg.WAREHOUSE_ID = #{warehouseId}
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= wir.inbound_time
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= wir.inbound_time
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= wir.inbound_time
+        </if>
         order by wir.inbound_time desc
         )
         <where>

+ 1 - 1
src/main/resources/com/steerinfo/dil/mapper/WmspInboundScanResultMapper.xml

@@ -1144,7 +1144,7 @@ where wisr.result_id = #{stackResultId}
     </select>
     <select id="getMaterialSteelId" resultType="java.math.BigDecimal">
         SELECT RMS.MATERIAL_STEEL_ID FROM RMS_MATERIAL_STEEL RMS
-        WHERE RMS.MATERIAL_ONLY_CODE = #{materialOnlyCode}
+        WHERE RMS.MATERIAL_ONLY_CODE = '0' || #{materialOnlyCode}
     </select>
     <delete id="deleteMaterialSteel">
         delete from RMS_MATERIAL_STEEL RMS