fanxw 5 lat temu
rodzic
commit
e735997cf8

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

@@ -232,6 +232,8 @@ public class BasicStorehouseController {
232 232
 			}
233 233
 			basicStorehouse.setDelFlag(delFlag);
234 234
 			basicStorehouseService.updateBasicStorehouse(basicStorehouse);
235
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
236
+			basicStorehouseService.editOrgChNum(basicStorehouse.getOrgId());
235 237
 			/* 同时删除这个仓房下的货位信息 */
236 238
 			/*basicWarehouseService.deletEexample(basicStorehouse.getStorehouseId());*/
237 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 184
 				warehouse.setDelFlag(1);
185 185
 				basicWarehouseService.add(warehouse);
186 186
 			}
187
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
188
+			basicStorehouseService.editOrgChNum(warehouse.getOrgId());
187 189
 			map.put("status", "success");
188 190
 		} catch (Exception e) {
189 191
 			e.printStackTrace();
@@ -226,6 +228,8 @@ public class BasicWarehouseController {
226 228
 			if (id != null) {
227 229
 				basicWarehouseService.update(basicWarehouse);;
228 230
 			}
231
+			/* 更新单位表中仓房数、油罐数、有效仓容、有效罐容 */
232
+			basicStorehouseService.editOrgChNum(basicStorehouse.getOrgId());
229 233
 			map.put("status", "success");
230 234
 		} catch (Exception e) {
231 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 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 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 603
 		Map<String, Object> rl_map = basic.queryCrAndgw(orgId);
604 604
 		
605 605
 
606
-		//更新当前单位下仓房数、货位数、有效仓房、有效罐容
606
+		//更新当前单位下仓房数、油罐数数、有效仓房、有效罐容
607 607
 		Map<String, Object> map = new HashMap<String, Object>();
608 608
 		map.put("orgId", orgId);
609 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 98
 	@Override
99
-	public void updateBasicTank(Integer id, Integer delFlag) {
99
+	public void updateBasicTank(Integer id, Integer delFlag) throws Exception {
100 100
 		BasicTank basicTank = new BasicTank();
101 101
 		basicTank.setId(id);
102 102
 		// 启用 : 1
@@ -108,6 +108,8 @@ public class BasicTankServiceImpl implements BasicTankService {
108 108
 		}
109 109
 		basicTank.setDelFlag(delFlag);
110 110
 		basicTankMapper.updateByPrimaryKeySelective(basicTank);
111
+		/* 更新油罐数量 */
112
+		basicStorehouseService.editOrgChNum(basicTank.getOrgId());
111 113
 	}
112 114
 
113 115
 	@Override