|
@@ -287,15 +287,15 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
}
|
|
|
// 工序作业明细ID
|
|
|
List<String> detailIds = changingWiresVos.stream().map(ChangingWiresVo::getId).collect(Collectors.toList());
|
|
|
-// SysUserVo nowWorkUser = CXCommonUtils.getCurrentUser();
|
|
|
-// for (String equId:detailIds){
|
|
|
-// if (changeWiresLock.containsKey(equId)) {
|
|
|
-// log.error("该作业明细已被:{}其他操作员换线", changeWiresLock.get(equId));
|
|
|
-// return R.error("该作业明细已被其他操作员换线");
|
|
|
-// }
|
|
|
-// changeWiresLock.put(equId, nowWorkUser.getId());
|
|
|
-// }
|
|
|
-// try {
|
|
|
+ SysUserVo nowWorkUser = CXCommonUtils.getCurrentUser();
|
|
|
+ for (String equId:detailIds){
|
|
|
+ if (changeWiresLock.containsKey(equId)) {
|
|
|
+ log.error("该作业明细已被:{}其他操作员换线", changeWiresLock.get(equId));
|
|
|
+ return R.error("该作业明细已被其他操作员换线");
|
|
|
+ }
|
|
|
+ changeWiresLock.put(equId, nowWorkUser.getId());
|
|
|
+ }
|
|
|
+ try {
|
|
|
// 需要返回的相关ID
|
|
|
List<String> returnAboutIds = changingWiresVos.stream().map(ChangingWiresVo::getReturnAboutIds).flatMap(Collection::stream).collect(Collectors.toList());
|
|
|
if (detailIds.isEmpty()) {
|
|
@@ -567,11 +567,11 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
|
|
|
// 重新获取甘特图数据并返回前段
|
|
|
return R.ok(ganttService.getListById(aboutIds));
|
|
|
-// }finally {
|
|
|
-// for (String equId:detailIds){
|
|
|
-// changeWiresLock.remove(equId);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ }finally {
|
|
|
+ for (String equId:detailIds){
|
|
|
+ changeWiresLock.remove(equId);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -854,15 +854,15 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
log.error("无法找到对应工序作业明细");
|
|
|
throw new CustomException("参数异常,工序作业明细ID为空");
|
|
|
}
|
|
|
-// SysUserVo nowWorkUser = CXCommonUtils.getCurrentUser();
|
|
|
-// for (String equId:ids){
|
|
|
-// if (splitLock.containsKey(equId)) {
|
|
|
-// log.error("该作业明细已被:{}其他操作员拆分", splitLock.get(equId));
|
|
|
-// throw new CustomException("该作业明细已被其他操作员拆分");
|
|
|
-// }
|
|
|
-// splitLock.put(equId, nowWorkUser.getId());
|
|
|
-// }
|
|
|
-// try {
|
|
|
+ SysUserVo nowWorkUser = CXCommonUtils.getCurrentUser();
|
|
|
+ for (String equId:ids){
|
|
|
+ if (splitLock.containsKey(equId)) {
|
|
|
+ log.error("该作业明细已被:{}其他操作员拆分", splitLock.get(equId));
|
|
|
+ throw new CustomException("该作业明细已被其他操作员拆分");
|
|
|
+ }
|
|
|
+ splitLock.put(equId, nowWorkUser.getId());
|
|
|
+ }
|
|
|
+ try {
|
|
|
// 所有的工序作业明细
|
|
|
List<ApsProcessOperationProcessEquDo> apsProcessOperationProcessEquDos = (List<ApsProcessOperationProcessEquDo>) this.listByIds(ids);
|
|
|
// 前一个工序作业明细Id
|
|
@@ -1118,11 +1118,11 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
|
|
|
.set(ApsProcessOperationProcessEquDo::getNextprocessesids, strAppendListConvertStr(apsProcessOperationProcessEquDo.getNextprocessesids(), collect1)));
|
|
|
});
|
|
|
return R.ok(this.ganttService.getListById(aboutIds));
|
|
|
-// }finally {
|
|
|
-// for (String equId:ids){
|
|
|
-// splitLock.remove(equId);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ }finally {
|
|
|
+ for (String equId:ids){
|
|
|
+ splitLock.remove(equId);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void updateBlank(String processOperationId) {
|