Explorar el Código

修改入库作业和新增预留作业

胡半仙 hace 3 años
padre
commit
ecf7c6df8d

+ 3 - 1
src/main/java/com/steerinfo/dil/controller/WmspGridMaterialController.java

@@ -66,7 +66,9 @@ public class WmspGridMaterialController extends BaseRESTfulController {
                                                 String con) {
 
 
-
+        if (con!=null&&!con.equals("undefined")) {
+            mapVal.put("con", "%" + con + "%");
+        }
         List<Map<String, Object>>   libaryInBoundList = wmspGridMaterialService.selectGridMaterial(mapVal);
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String, Object>> columnList = wmspGridMaterialService.selectGridMaterial(mapVal);

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/WmspSendReceiveController.java

@@ -82,7 +82,7 @@ public class WmspSendReceiveController extends BaseRESTfulController {
     }*/
 
     @PostMapping("addSendReceive")
-    @Scheduled(cron =  "0 0 0 * * ? ")
+    @Scheduled(cron =  "0 30 23 * * ? ")
     public RESTfulResult addSendReceive(){
         int result = iWmspSendReceiveService.addSendReceive();
         return success(result);

+ 2 - 2
src/main/java/com/steerinfo/dil/service/impl/WmspSendReceiveServiceImpl.java

@@ -181,10 +181,10 @@ public class WmspSendReceiveServiceImpl implements IWmspSendReceiveService {
                 Map<String,Object> map2 = new HashMap<>();
                 map2.put("warehouseId",warehouseId);
                 map2.put("materialId",materialId);
-                //统计前一天的入库总数
+                //统计今天的入库总数(只统计当前仓库没有预留的数量,不统计预留库的数量)
                 BigDecimal sendReceiveThisdayInbound = wmspSendReceiveMapper.countSndReceiveThisdayInbound(map2);
                 wmspSendReceive.setSendReceiveThisdayInbound(sendReceiveThisdayInbound);
-                //统计前一天的出库总数
+                //统计今天天的出库总数
                 BigDecimal sendReceiveThisdayOutbound = wmspSendReceiveMapper.countSendReceiveThisdayOutbound(map2);
                 wmspSendReceive.setSendReceiveThisdayOutbound(sendReceiveThisdayOutbound);
                 //昨天库存

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,7 +1,7 @@
 api.version: api/v1/wms
 spring:
   profiles:
-    include: ${SPRING_PROFILES:prod}
+    include: ${SPRING_PROFILES:dev}
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8

+ 6 - 3
src/main/resources/com/steerinfo/dil/mapper/WmspGridMaterialMapper.xml

@@ -429,8 +429,6 @@
     RMS.MATERIAL_STEEL_ID "materialId",
     RMS.MATERIAL_ONLY_CODE "materialOnlyCode",
     WGM.GM_ID "gmId"
-
-
     from WMSP_GRID_MATERIAL WGM
     left join RMS_PWAREHOUSE_GRID RPG
     on  WGM.GRID_ID=RPG.GRID_ID
@@ -444,8 +442,13 @@
     on  RM.MATERIAL_ID=RMS.MATERIAL_ID
     left join RMS_MATERIAL_TYPE RMT
     on RM.MATERIAL_TYPE_ID=RMT.MATERIAL_TYPE_ID
-    where WGM.DELETED = 0 order by WGM.INSERT_TIME DESC
+    left join WMSP_INBOUND_RESULT WIR
+    on WIR.GRID_ID = WGM.GRID_ID
+    where WGM.DELETED = 0 and WIR.RESULT_STATUS = 1 order by WGM.INSERT_TIME DESC
     )
+   <if test="con!=null">
+    where "materialName" like #{con} or "warehouseName" like #{con} or "stackingNo" like #{con}
+  </if>
     <where>
       <if test="warehouseName != null">
         and

+ 3 - 2
src/main/resources/com/steerinfo/dil/mapper/WmspSendReceiveMapper.xml

@@ -603,7 +603,8 @@
     on rpg.GRID_ID = wir.GRID_ID
     where rm.MATERIAL_ID = #{materialId} and
     rpg.WAREHOUSE_ID = #{warehouseId} and
-    trunc(wir.INSERT_TIME) = trunc(sysdate-1)
+     wir.INBOUND_ISCOMPLETE = 1 and
+    trunc(wir.INSERT_TIME) = trunc(sysdate)
   </select>
 
   <select id="countSendReceiveThisdayOutbound" parameterType="java.util.Map" resultType="java.math.BigDecimal">
@@ -616,6 +617,6 @@
     on rpg.GRID_ID = wgm.GRID_ID
     where  rm.MATERIAL_ID = #{materialId} and
     rpg.WAREHOUSE_ID = #{warehouseId} and
-    trunc(wgm.UPDATE_TIME) = trunc(sysdate-1)
+    trunc(wgm.UPDATE_TIME) = trunc(sysdate)
   </select>
 </mapper>