Commit 025bdcab06c93a5406f2b9909d5f0d0d991a60fc

Authored by 周峰
1 parent 6caef407

库位监控修改

src/main/java/com/huaheng/pc/config/location/domain/LocationInfo.java
... ... @@ -8,6 +8,7 @@ import lombok.Data;
8 8 @Data
9 9 public class LocationInfo {
10 10 private long maxRow;
  11 + private long minRow = 1;
11 12 private long maxLine;
12 13 private long maxLayer;
13 14 private long maxGrid;
... ...
src/main/java/com/huaheng/pc/config/location/mapper/LocationMapper.java
... ... @@ -28,5 +28,7 @@ public interface LocationMapper extends BaseMapper<Location> {
28 28  
29 29 List<Location> selectContainerEmpty(@Param("warehouseCode") String warehouseCode );
30 30  
  31 + int getFirstRowOfZone(@Param("warehouseCode") String warehouseCode, @Param("locationType") String locationType);
31 32  
  33 + int getLastRowOfZone(@Param("warehouseCode") String warehouseCode, @Param("locationType") String locationType);
32 34 }
33 35 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationService.java
... ... @@ -101,4 +101,8 @@ public interface LocationService extends IService&lt;Location&gt;{
101 101 Location getEmptyOutSideLocation(Location location);
102 102  
103 103 Location getEmptyLocation(Location location);
  104 +
  105 + int getFirstRowOfZone(String warehouseCode, String zoneCode);
  106 +
  107 + int getLastRowOfZone(String warehouseCode, String zoneCode);
104 108 }
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... ... @@ -359,6 +359,8 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
359 359 locationInfo.setMaxLine(location.getIColumn());
360 360 locationInfo.setMaxLayer(location.getILayer());
361 361 locationInfo.setMaxGrid(location.getIGrid());
  362 + int minRow = locationMapper.getFirstRowOfZone(ShiroUtils.getWarehouseCode(), type);
  363 + locationInfo.setMinRow(minRow);
362 364 return locationInfo;
363 365 }
364 366 return null;
... ... @@ -594,4 +596,14 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
594 596 }
595 597 return location1;
596 598 }
  599 +
  600 + @Override
  601 + public int getFirstRowOfZone(String warehouseCode, String locationType) {
  602 + return locationMapper.getFirstRowOfZone(warehouseCode, locationType);
  603 + }
  604 +
  605 + @Override
  606 + public int getLastRowOfZone(String warehouseCode, String locationType) {
  607 + return locationMapper.getLastRowOfZone(warehouseCode, locationType);
  608 + }
597 609 }
... ...
src/main/resources/mybatis/config/LocationMapper.xml
... ... @@ -152,7 +152,12 @@
152 152 ORDER BY t.lastUpdated ASC
153 153 </where>
154 154 </select>
155   -
  155 + <select id="getFirstRowOfZone" resultType="java.lang.Integer">
  156 + select min(iRow) from location where warehouseCode=#{warehouseCode} and locationType = #{locationType}
  157 + </select>
  158 + <select id="getLastRowOfZone" resultType="java.lang.Integer">
  159 + select max(iRow) from location where warehouseCode=#{warehouseCode} and locationType = #{locationType}
  160 + </select>
156 161  
157 162  
158 163 </mapper>
159 164 \ No newline at end of file
... ...
src/main/resources/templates/monitor/locationstatus/locationstatus.html
... ... @@ -144,6 +144,7 @@
144 144 <script th:inline="javascript">
145 145 var prefix = ctx + "config/location";
146 146 var grid_row;
  147 + var grid_row_first;
147 148 var grid_line;
148 149 var grid_layer;
149 150 var list_info;
... ... @@ -180,7 +181,7 @@
180 181 let num=$("#editable-select").val();
181 182 $("#editable-num").children().remove();
182 183 if (num === "row") {
183   - for (let i = 1; i <= grid_row; i++) {
  184 + for (let i = grid_row_first; i <= grid_row; i++) {
184 185 $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
185 186 }
186 187 }
... ... @@ -211,6 +212,7 @@
211 212 },
212 213 success:function (res) {
213 214 grid_row=res.data.maxRow;
  215 + grid_row_first = res.data.minRow;
214 216 grid_line=res.data.maxLine;
215 217 grid_layer=res.data.maxLayer;
216 218 //初始格子
... ... @@ -225,7 +227,7 @@
225 227 let num=$("#editable-select").val();
226 228 $("#editable-num").children().remove();
227 229 if (num === "row") {
228   - for (let i = 1; i <= grid_row; i++) {
  230 + for (let i = grid_row_first; i <= grid_row; i++) {
229 231 $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
230 232 }
231 233 }
... ...