|
|
@ -585,13 +585,6 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
}).start(); |
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
} else if (state == 1) { // 如果是启用仓库,则只启用当前仓库下的物品
|
|
|
|
|
|
new Thread(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
// UpdateSonMaterialState(id, state);
|
|
|
|
|
|
} |
|
|
|
|
|
}).start(); |
|
|
|
|
|
} |
|
|
} |
|
|
return CrudUtil.postHandle(depositoryService.updateDepository(map), 1); |
|
|
return CrudUtil.postHandle(depositoryService.updateDepository(map), 1); |
|
|
} |
|
|
} |
|
|
@ -607,10 +600,6 @@ public class DepositoryController { |
|
|
|
|
|
|
|
|
// 获取当前仓库所有子仓库
|
|
|
// 获取当前仓库所有子仓库
|
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userToken); |
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userToken); |
|
|
// if (envelop) {
|
|
|
|
|
|
// 将当前仓库下的产品状态改为禁用
|
|
|
|
|
|
// UpdateSonMaterialState(parentId, state);
|
|
|
|
|
|
// }
|
|
|
|
|
|
for (Depository depository : depositoryRecordPByCondition) { |
|
|
for (Depository depository : depositoryRecordPByCondition) { |
|
|
int depositoryId = depository.getId(); |
|
|
int depositoryId = depository.getId(); |
|
|
Map<String, Object> newMap = new HashMap<>(); |
|
|
Map<String, Object> newMap = new HashMap<>(); |
|
|
@ -623,18 +612,6 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 修改当前仓库下的物料状态 |
|
|
|
|
|
* |
|
|
|
|
|
* @param parentId |
|
|
|
|
|
* @param state |
|
|
|
|
|
*/ |
|
|
|
|
|
public void UpdateSonMaterialState(String parentId, Integer state) { |
|
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
|
param.put("depositoryId", parentId); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取各类别库存容量
|
|
|
// 获取各类别库存容量
|
|
|
@RequestMapping(value = "/layui/echart_back_invetory", method = RequestMethod.GET) |
|
|
@RequestMapping(value = "/layui/echart_back_invetory", method = RequestMethod.GET) |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
@ -1455,8 +1432,8 @@ public class DepositoryController { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userToken); |
|
|
List<Depository> depositoryRecordPByCondition = depositoryService.findDepositoryByCondition(param, userToken); |
|
|
for (int i = 0; i < depositoryRecordPByCondition.size(); i++) { |
|
|
for (Depository depository : depositoryRecordPByCondition) { |
|
|
String depositoryId = depositoryRecordPByCondition.get(i).getId().toString(); |
|
|
String depositoryId = depository.getId().toString(); |
|
|
if (!findMaterialByDepository(depositoryId)) { |
|
|
if (!findMaterialByDepository(depositoryId)) { |
|
|
findAllSonDepository(depositoryId, userToken); |
|
|
findAllSonDepository(depositoryId, userToken); |
|
|
} else { |
|
|
} else { |
|
|
@ -1468,8 +1445,7 @@ public class DepositoryController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据父级编号查询所有关联信息 |
|
|
* 根据父级编号查询所有关联信息 |
|
|
* |
|
|
* @param did 待查询仓库 |
|
|
* @param did |
|
|
|
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public Boolean findAllSonDepositoryOfRelevancy(String did, HttpServletRequest request) { |
|
|
public Boolean findAllSonDepositoryOfRelevancy(String did, HttpServletRequest request) { |
|
|
@ -1495,7 +1471,7 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据仓库编号判断该仓库是否有物品 |
|
|
* 根据仓库编号判断该仓库是否有库存 |
|
|
* |
|
|
* |
|
|
* @param depositoryId 待查询仓库id |
|
|
* @param depositoryId 待查询仓库id |
|
|
* @return |
|
|
* @return |
|
|
@ -1504,8 +1480,9 @@ public class DepositoryController { |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
param.put("state", 1); |
|
|
param.put("state", 1); |
|
|
param.put("depositoryId", depositoryId); |
|
|
param.put("depositoryId", depositoryId); |
|
|
List<InventoryP> materialPByCondition = materialService.findInventory(param); |
|
|
// 获取当前库存
|
|
|
return materialPByCondition.size() > 0; |
|
|
List<InventoryP> inventoryPList = materialService.findInventory(param); |
|
|
|
|
|
return inventoryPList.size() > 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|