|
|
|
@ -507,7 +507,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
|
|
|
|
// 定义开启线程数目
|
|
|
|
int openThreadSize = 0; |
|
|
|
if(threadSize == 0){ |
|
|
|
if (threadSize == 0) { |
|
|
|
return list; |
|
|
|
} |
|
|
|
// 开启对应数量的线程
|
|
|
|
@ -841,14 +841,6 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
// 获取入库的仓库
|
|
|
|
Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId")); |
|
|
|
|
|
|
|
// List<RoleAndDepository> depositoryIdForIn = roleMapper.findRoleAndDepositoryByDepositoryIdForIn(depositoryId);
|
|
|
|
|
|
|
|
// 用于标志该仓库是否需要进行审批
|
|
|
|
boolean flagForApproval = false; // 默认不需要
|
|
|
|
// if (depositoryIdForIn.size() > 0) {
|
|
|
|
// flagForApproval = true; // 需要
|
|
|
|
// }
|
|
|
|
map.put("flagForApproval", flagForApproval); |
|
|
|
|
|
|
|
// 定义参数用与入库
|
|
|
|
Map<String, Object> insertForApplicationInRecord = new HashMap<>(); |
|
|
|
@ -856,7 +848,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
insertForApplicationInRecord.put("applicantId", userToken.getId()); |
|
|
|
|
|
|
|
// 获取当前入库的组合数量
|
|
|
|
Integer quantityForGroup = ObjectFormatUtil.toInteger(map.get("quantity")); |
|
|
|
Double quantityForGroup = ObjectFormatUtil.toDouble(map.get("quantity")); |
|
|
|
|
|
|
|
// 获取要出库的组合
|
|
|
|
Integer gid = ObjectFormatUtil.toInteger(map.get("gid")); |
|
|
|
@ -872,9 +864,21 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
insertForApplicationInRecord.put("placeId", placeId); |
|
|
|
|
|
|
|
insertForApplicationInRecord.put("applyRemark", map.get("applyRemark")); |
|
|
|
// 用于标志该是否需要进行审批
|
|
|
|
boolean flagForApproval = false; // 默认不需要
|
|
|
|
// 循环当前组合信息
|
|
|
|
for (GroupInfo groupInfo : |
|
|
|
groupInfoByGid) { |
|
|
|
|
|
|
|
// 获取当前类型是否有用户进行管理入库审批
|
|
|
|
Map<String, Object> paramForMtRole = new HashMap<>(); |
|
|
|
paramForMtRole.put("mtid", groupInfo.getMtid()); |
|
|
|
List<RoleAndMaterialType> roleAndMaterials = roleMapper.findRoleAndMaterialTypeByCondition(paramForMtRole); |
|
|
|
|
|
|
|
if (roleAndMaterials.size() > 0 ) { |
|
|
|
flagForApproval = true; // 需要
|
|
|
|
} |
|
|
|
|
|
|
|
// 获取当前组合记录中的单位
|
|
|
|
String unit = groupInfo.getUnit(); |
|
|
|
insertForApplicationInRecord.put("mid", groupInfo.getMid()); |
|
|
|
@ -913,9 +917,10 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
insertForApplicationInRecord.remove("applicationInId"); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("flagForApproval", flagForApproval); |
|
|
|
insertForApplicationInRecord.remove("toGroupId"); |
|
|
|
insertForApplicationInRecord.put("flagForGroup", 2); |
|
|
|
insertForApplicationInRecord.put("quantity", quantityForGroup.toString()); |
|
|
|
insertForApplicationInRecord.put("quantity", quantityForGroup * 100); |
|
|
|
insertForApplicationInRecord.put("mid", gid); |
|
|
|
insertForApplicationInRecord.put("unit", -1); |
|
|
|
Depository depository = depositoryMapper.findDepositoryById(depositoryId); |
|
|
|
|