fanxw лет назад: 5
Родитель
Сommit
e735997cf8

+ 2 - 0
src/main/java/com/chinaitop/depot/basic/controller/BasicStorehouseController.java

@@ -232,6 +232,8 @@ public class BasicStorehouseController {
232
 			}
232
 			}
233
 			basicStorehouse.setDelFlag(delFlag);
233
 			basicStorehouse.setDelFlag(delFlag);
234
 			basicStorehouseService.updateBasicStorehouse(basicStorehouse);
234
 			basicStorehouseService.updateBasicStorehouse(basicStorehouse);
235
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
236
+			basicStorehouseService.editOrgChNum(basicStorehouse.getOrgId());
235
 			/* 同时删除这个仓房下的货位信息 */
237
 			/* 同时删除这个仓房下的货位信息 */
236
 			/*basicWarehouseService.deletEexample(basicStorehouse.getStorehouseId());*/
238
 			/*basicWarehouseService.deletEexample(basicStorehouse.getStorehouseId());*/
237
 			modelMap.put("status", "success");
239
 			modelMap.put("status", "success");

+ 4 - 0
src/main/java/com/chinaitop/depot/basic/controller/BasicWarehouseController.java

@@ -184,6 +184,8 @@ public class BasicWarehouseController {
184
 				warehouse.setDelFlag(1);
184
 				warehouse.setDelFlag(1);
185
 				basicWarehouseService.add(warehouse);
185
 				basicWarehouseService.add(warehouse);
186
 			}
186
 			}
187
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
188
+			basicStorehouseService.editOrgChNum(warehouse.getOrgId());
187
 			map.put("status", "success");
189
 			map.put("status", "success");
188
 		} catch (Exception e) {
190
 		} catch (Exception e) {
189
 			e.printStackTrace();
191
 			e.printStackTrace();
@@ -226,6 +228,8 @@ public class BasicWarehouseController {
226
 			if (id != null) {
228
 			if (id != null) {
227
 				basicWarehouseService.update(basicWarehouse);;
229
 				basicWarehouseService.update(basicWarehouse);;
228
 			}
230
 			}
231
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
232
+			basicStorehouseService.editOrgChNum(basicStorehouse.getOrgId());
229
 			map.put("status", "success");
233
 			map.put("status", "success");
230
 		} catch (Exception e) {
234
 		} catch (Exception e) {
231
 			e.printStackTrace();
235
 			e.printStackTrace();

+ 1 - 1
src/main/java/com/chinaitop/depot/basic/service/BasicTankService.java

@@ -18,7 +18,7 @@ public interface BasicTankService {
18
 
18
 
19
     BasicTank findByPrimary(Integer id);
19
     BasicTank findByPrimary(Integer id);
20
 
20
 
21
-    void updateBasicTank(Integer id, Integer delFlag);
21
+    void updateBasicTank(Integer id, Integer delFlag) throws Exception;
22
 
22
 
23
     Boolean findStorageTankCodeList(BasicTankExample basicTankExample, Integer id);
23
     Boolean findStorageTankCodeList(BasicTankExample basicTankExample, Integer id);
24
 
24
 

+ 1 - 1
src/main/java/com/chinaitop/depot/basic/service/impl/BasicStorehouseServiceImpl.java

@@ -603,7 +603,7 @@ public class BasicStorehouseServiceImpl implements BasicStorehouseService {
603
 		Map<String, Object> rl_map = basic.queryCrAndgw(orgId);
603
 		Map<String, Object> rl_map = basic.queryCrAndgw(orgId);
604
 		
604
 		
605
 
605
 
606
-		//更新当前单位下仓房数、货位数、有效仓房、有效罐容
606
+		//更新当前单位下仓房数、油罐数数、有效仓房、有效罐容
607
 		Map<String, Object> map = new HashMap<String, Object>();
607
 		Map<String, Object> map = new HashMap<String, Object>();
608
 		map.put("orgId", orgId);
608
 		map.put("orgId", orgId);
609
 		map.put("cf_count", ch_count);
609
 		map.put("cf_count", ch_count);

+ 3 - 1
src/main/java/com/chinaitop/depot/basic/service/impl/BasicTankServiceImpl.java

@@ -96,7 +96,7 @@ public class BasicTankServiceImpl implements BasicTankService {
96
     }
96
     }
97
 
97
 
98
 	@Override
98
 	@Override
99
-	public void updateBasicTank(Integer id, Integer delFlag) {
99
+	public void updateBasicTank(Integer id, Integer delFlag) throws Exception {
100
 		BasicTank basicTank = new BasicTank();
100
 		BasicTank basicTank = new BasicTank();
101
 		basicTank.setId(id);
101
 		basicTank.setId(id);
102
 		// 启用 : 1
102
 		// 启用 : 1
@@ -108,6 +108,8 @@ public class BasicTankServiceImpl implements BasicTankService {
108
 		}
108
 		}
109
 		basicTank.setDelFlag(delFlag);
109
 		basicTank.setDelFlag(delFlag);
110
 		basicTankMapper.updateByPrimaryKeySelective(basicTank);
110
 		basicTankMapper.updateByPrimaryKeySelective(basicTank);
111
+		/* 更新油罐数量 */
112
+		basicStorehouseService.editOrgChNum(basicTank.getOrgId());
111
 	}
113
 	}
112
 
114
 
113
 	@Override
115
 	@Override