|
|
@ -1296,7 +1296,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
insertForSplitInventory.put("mid",inventory.getMid()); |
|
|
insertForSplitInventory.put("mid",inventory.getMid()); |
|
|
insertForSplitInventory.put("mcode",inventory.getCode()); |
|
|
insertForSplitInventory.put("mcode",inventory.getCode()); |
|
|
insertForSplitInventory.put("price",inventory.getPrice() / scale); |
|
|
insertForSplitInventory.put("price",inventory.getPrice() / scale); |
|
|
insertForSplitInventory.put("quantity",splitInfo.getQuantity() - residue_realQuantity); |
|
|
insertForSplitInventory.put("quantity",residue_realQuantity); |
|
|
insertForSplitInventory.put("unit",unit); |
|
|
insertForSplitInventory.put("unit",unit); |
|
|
insertForSplitInventory.put("depositoryId",applicationOutMinById.getDepositoryId()); |
|
|
insertForSplitInventory.put("depositoryId",applicationOutMinById.getDepositoryId()); |
|
|
insertForSplitInventory.put("placeId",placeAndMaterialByMidAndPid.getPid()); |
|
|
insertForSplitInventory.put("placeId",placeAndMaterialByMidAndPid.getPid()); |
|
|
@ -1677,9 +1677,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 获取所有子订单键值
|
|
|
// 获取所有子订单键值
|
|
|
String[] split = minRecordList.replace("[", "").replace("]", "").split(","); |
|
|
String[] split = minRecordList.replace("[", "").replace("]", "").split(","); |
|
|
int pass = 1; // 设置主订单最终状态
|
|
|
int pass = 1; // 设置主订单最终状态
|
|
|
for (int i = 0; i < split.length; i++) { |
|
|
for (String value : split) { |
|
|
// 获取所有子订单状态
|
|
|
// 获取所有子订单状态
|
|
|
String state = (String) redisTemplate.opsForHash().get(split[i], "state"); |
|
|
String state = (String) redisTemplate.opsForHash().get(value, "state"); |
|
|
if ("1".equals(state)) { |
|
|
if ("1".equals(state)) { |
|
|
// 如果有子订单未完成
|
|
|
// 如果有子订单未完成
|
|
|
pass = 3; // 设置主订单状态为处理中
|
|
|
pass = 3; // 设置主订单状态为处理中
|
|
|
@ -1687,6 +1687,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (pass == 1) { // 如果最终状态为完成
|
|
|
if (pass == 1) { // 如果最终状态为完成
|
|
|
|
|
|
|
|
|
|
|
|
redisTemplate.delete(redisMainRecordKey); |
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
map.put("pass", pass); |
|
|
map.put("pass", pass); |
|
|
map.put("id", record.getId()); |
|
|
map.put("id", record.getId()); |
|
|
@ -2112,7 +2115,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
boolean flagForHasOtherDepository = true; |
|
|
boolean flagForHasOtherDepository = true; |
|
|
for (ApplicationOutRecordMin min : minByParent |
|
|
for (ApplicationOutRecordMin min : minByParent |
|
|
) { |
|
|
) { |
|
|
Depository depositoryById = depositoryMapper.findDepositoryById(min.getId()); |
|
|
Depository depositoryById = depositoryMapper.findDepositoryById(min.getDepositoryId()); |
|
|
if (Integer.compare(depositoryById.getParentId(), 0) != 0) { |
|
|
if (Integer.compare(depositoryById.getParentId(), 0) != 0) { |
|
|
// 如果不是
|
|
|
// 如果不是
|
|
|
List<Depository> depositoryAll = depositoryMapper.findDepositoryAll(); |
|
|
List<Depository> depositoryAll = depositoryMapper.findDepositoryAll(); |
|
|
@ -2126,7 +2129,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (map.containsKey("departmentheadPass") && flagForHasOtherDepository) { |
|
|
if (map.containsKey("departmentheadPass") && !flagForHasOtherDepository) { |
|
|
String result = ""; |
|
|
String result = ""; |
|
|
String simpleTime = DateUtil.getSimpleTime(new Date()); |
|
|
String simpleTime = DateUtil.getSimpleTime(new Date()); |
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
@ -2219,6 +2222,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// map.put("mid", record.getMid());
|
|
|
// map.put("mid", record.getMid());
|
|
|
// Material material = materialMapper.findMaterialById(record.getMid());
|
|
|
// Material material = materialMapper.findMaterialById(record.getMid());
|
|
|
Integer depositoryManagerPass = (Integer) map.get("depositoryManagerPass"); |
|
|
Integer depositoryManagerPass = (Integer) map.get("depositoryManagerPass"); |
|
|
|
|
|
if(depositoryManagerPass == null){ |
|
|
|
|
|
depositoryManagerPass = (Integer) map.get("departmentheadPass"); |
|
|
|
|
|
} |
|
|
if (depositoryManagerPass == 1) { |
|
|
if (depositoryManagerPass == 1) { |
|
|
// 如果审核通过
|
|
|
// 如果审核通过
|
|
|
result = "通过"; |
|
|
result = "通过"; |
|
|
@ -2303,7 +2309,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
}).start(); |
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
/*for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
if (o != null) { |
|
|
if (o != null) { |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
@ -2330,7 +2336,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} else { |
|
|
} else { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
|
|
|
|
|
|
// 开启流程通知其他人忽略审批流程
|
|
|
// 开启流程通知其他人忽略审批流程
|
|
|
new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
|