ZeroLiYi 1 рік тому
батько
коміт
aafa258666

+ 39 - 0
src/main/java/com/chinaitop/depot/storage/controller/ClearanceConfirmationController.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.storage.controller;
2 2
 
3 3
 
4
+import com.chinaitop.depot.storage.model.StorageStorehouseBusiness;
4 5
 import com.github.pagehelper.PageHelper;
5 6
 import com.chinaitop.depot.storage.model.ClearanceConfirmation;
6 7
 import com.chinaitop.depot.storage.service.ClearanceConfirmationService;
@@ -161,6 +162,44 @@ public class ClearanceConfirmationController {
161 162
     }
162 163
 
163 164
 
165
+    /**
166
+     * 查询当前库区库存实物为空仓的仓房
167
+     *
168
+     * @param orgId
169
+     * @return
170
+     */
171
+    @RequestMapping(value = "/findStorehouse",produces = MediaType.APPLICATION_JSON_VALUE,method = RequestMethod.GET)
172
+    public List<StorageStorehouseBusiness> findStorehouse(Integer orgId) {
173
+        List<StorageStorehouseBusiness> storageStorehouseBusinessList = null;
174
+        try {
175
+
176
+            storageStorehouseBusinessList = clearanceConfirmationService.findStorehouse(orgId);
177
+
178
+        } catch (Exception e) {
179
+            e.printStackTrace();
180
+        }
181
+        return storageStorehouseBusinessList;
182
+    }
183
+
184
+    /**
185
+     * 查询当前库区库存实物为空仓的仓房
186
+     *
187
+     * @param storehouseId
188
+     * @return
189
+     */
190
+    @RequestMapping(value = "/findByWarehouse",produces = MediaType.APPLICATION_JSON_VALUE,method = RequestMethod.GET)
191
+    public List<StorageStorehouseBusiness> findByWarehouse(Integer storehouseId) {
192
+        List<StorageStorehouseBusiness> storageStorehouseBusinessList = null;
193
+        try {
194
+
195
+            storageStorehouseBusinessList = clearanceConfirmationService.findByWarehouse(storehouseId);
196
+
197
+        } catch (Exception e) {
198
+            e.printStackTrace();
199
+        }
200
+        return storageStorehouseBusinessList;
201
+    }
202
+
164 203
     
165 204
 
166 205
 }

+ 6 - 0
src/main/java/com/chinaitop/depot/storage/mapper/ClearanceConfirmationMapper.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.storage.mapper;
2 2
 
3 3
 import com.chinaitop.depot.storage.model.ClearanceConfirmation;
4
+import com.chinaitop.depot.storage.model.StorageStorehouseBusiness;
4 5
 import org.springframework.stereotype.Repository;
5 6
 
6 7
 import java.math.BigDecimal;
@@ -29,4 +30,9 @@ public interface ClearanceConfirmationMapper {
29 30
     Map<String, BigDecimal> getexcessLossQuantity(Integer warehouseId);
30 31
 
31 32
     Map<String, Object> getStoreHouse(Integer warehouseId);
33
+
34
+
35
+    List<StorageStorehouseBusiness> findStorehouseList(Integer orgId);
36
+
37
+    List<StorageStorehouseBusiness> findByWarehouseList(Integer storehouseId);
32 38
 }

+ 18 - 0
src/main/java/com/chinaitop/depot/storage/mapper/ClearanceConfirmationMapper.xml

@@ -231,4 +231,22 @@ cc.updatename updatename,cc.updatedate updatedate,cc.warehouse_id
231 231
     warehouse_id = #{warehouseId,jdbcType=INTEGER}
232 232
   where id = #{id,jdbcType=INTEGER}
233 233
   </update>
234
+  <select id="findStorehouseList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.storage.model.StorageStorehouseBusiness">
235
+    select DISTINCT bs.storehouse_id,bs.storehouse_name
236
+    from
237
+      depot_qh.basic_storehouse bs
238
+        left join data_kcgl_kcsw_default dkkd on bs.storehouse_id =dkkd.ch
239
+
240
+    where bs.org_id=#{orgId} and dkkd.ch is null
241
+  </select>
242
+  <select id="findByWarehouseList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.storage.model.StorageStorehouseBusiness">
243
+
244
+    select DISTINCT bw.warehouse_id,bw.warehouse_name
245
+    from
246
+      depot_qh.basic_warehouse bw
247
+        left join depot_qh.data_kcgl_kcsw_default dkkd on bw.warehouse_id =dkkd.hwh
248
+
249
+    where bw.storehouse_id=#{storehouseId} and dkkd.hwh is null
250
+
251
+  </select>
234 252
 </mapper>

+ 4 - 0
src/main/java/com/chinaitop/depot/storage/service/ClearanceConfirmationService.java

@@ -2,6 +2,7 @@ package com.chinaitop.depot.storage.service;
2 2
 
3 3
 
4 4
 import com.chinaitop.depot.storage.model.ClearanceConfirmation;
5
+import com.chinaitop.depot.storage.model.StorageStorehouseBusiness;
5 6
 
6 7
 import javax.servlet.http.HttpServletRequest;
7 8
 import java.util.List;
@@ -35,4 +36,7 @@ public interface ClearanceConfirmationService {
35 36
     public void updateBasicStorehouse(ClearanceConfirmation ClearanceConfirmation);
36 37
 
37 38
 
39
+    List<StorageStorehouseBusiness> findStorehouse(Integer orgId);
40
+
41
+    List<StorageStorehouseBusiness> findByWarehouse(Integer storehouseId);
38 42
 }

+ 11 - 0
src/main/java/com/chinaitop/depot/storage/service/impl/ClearanceConfirmationServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 4
 
5 5
 import com.chinaitop.depot.storage.mapper.ClearanceConfirmationMapper;
6 6
 import com.chinaitop.depot.storage.model.ClearanceConfirmation;
7
+import com.chinaitop.depot.storage.model.StorageStorehouseBusiness;
7 8
 import com.chinaitop.depot.storage.service.ClearanceConfirmationService;
8 9
 import com.fasterxml.jackson.databind.ObjectMapper;
9 10
 import com.sun.javafx.collections.MappingChange;
@@ -100,4 +101,14 @@ public class ClearanceConfirmationServiceImpl implements ClearanceConfirmationSe
100 101
     public void updateBasicStorehouse(ClearanceConfirmation ClearanceConfirmation){
101 102
         ClearanceConfirmationMapper.updateByPrimaryKey(ClearanceConfirmation);
102 103
     }
104
+
105
+    @Override
106
+    public List<StorageStorehouseBusiness> findStorehouse(Integer orgId) {
107
+        return ClearanceConfirmationMapper.findStorehouseList(orgId);
108
+    }
109
+
110
+    @Override
111
+    public List<StorageStorehouseBusiness> findByWarehouse(Integer storehouseId) {
112
+        return ClearanceConfirmationMapper.findfindByWarehouseList(storehouseId);
113
+    }
103 114
 }