Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -1600,6 +1600,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
splitStep.put("child_coils", allNewCoilNos);
|
splitStep.put("child_coils", allNewCoilNos);
|
||||||
// 分卷产生的子钢卷ID将在后续步骤中设置
|
// 分卷产生的子钢卷ID将在后续步骤中设置
|
||||||
splitStep.put("operator", LoginHelper.getUsername()); // 操作者
|
splitStep.put("operator", LoginHelper.getUsername()); // 操作者
|
||||||
|
// 分卷的操作时间
|
||||||
|
splitStep.put("create_time", DateUtils.getNowDate());
|
||||||
steps.add(splitStep);
|
steps.add(splitStep);
|
||||||
|
|
||||||
contentMap.put("steps", steps);
|
contentMap.put("steps", steps);
|
||||||
@@ -1902,7 +1904,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3103,17 +3105,17 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
* 回滚合卷操作
|
* 回滚合卷操作
|
||||||
* 获取所有被合并的钢卷ID,将这些钢卷还原(dataType改为1),并删除当前合卷的钢卷
|
* 获取所有被合并的钢卷ID,将这些钢卷还原(dataType改为1),并删除当前合卷的钢卷
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> rollbackMergeOperation(WmsMaterialCoil currentCoil, WmsGenerateRecordVo qrcodeRecord,
|
private Map<String, Object> rollbackMergeOperation(WmsMaterialCoil currentCoil, WmsGenerateRecordVo qrcodeRecord,
|
||||||
Map<String, Object> rollbackInfo, Map<String, Object> result) {
|
Map<String, Object> rollbackInfo, Map<String, Object> result) {
|
||||||
List<Long> parentCoilIds = (List<Long>) rollbackInfo.get("parentCoilIds");
|
List<Long> parentCoilIds = (List<Long>) rollbackInfo.get("parentCoilIds");
|
||||||
|
|
||||||
if (parentCoilIds == null || parentCoilIds.isEmpty()) {
|
if (parentCoilIds == null || parentCoilIds.isEmpty()) {
|
||||||
throw new RuntimeException("无法获取合卷的原始钢卷ID,无法回滚");
|
throw new RuntimeException("无法获取合卷的原始钢卷ID,无法回滚");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询所有原始钢卷
|
// 查询所有原始钢卷
|
||||||
List<WmsMaterialCoil> originalCoils = baseMapper.selectBatchIds(parentCoilIds);
|
List<WmsMaterialCoil> originalCoils = baseMapper.selectBatchIds(parentCoilIds);
|
||||||
|
|
||||||
// 检查所有原始钢卷是否存在
|
// 检查所有原始钢卷是否存在
|
||||||
if (originalCoils.size() != parentCoilIds.size()) {
|
if (originalCoils.size() != parentCoilIds.size()) {
|
||||||
throw new RuntimeException("部分原始钢卷不存在,无法回滚");
|
throw new RuntimeException("部分原始钢卷不存在,无法回滚");
|
||||||
@@ -3160,9 +3162,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
result.put("message", "合卷回滚成功,已恢复 " + parentCoilIds.size() + " 个原始钢卷,删除了合卷钢卷");
|
result.put("message", "合卷回滚成功,已恢复 " + parentCoilIds.size() + " 个原始钢卷,删除了合卷钢卷");
|
||||||
result.put("restoredCoilCount", parentCoilIds.size());
|
result.put("restoredCoilCount", parentCoilIds.size());
|
||||||
result.put("deletedCoilId", currentCoil.getCoilId());
|
result.put("deletedCoilId", currentCoil.getCoilId());
|
||||||
|
|
||||||
log.info("合卷回滚操作成功:删除的合卷钢卷ID={}, 恢复的原始钢卷ID={}", currentCoil.getCoilId(), parentCoilIds);
|
log.info("合卷回滚操作成功:删除的合卷钢卷ID={}, 恢复的原始钢卷ID={}", currentCoil.getCoilId(), parentCoilIds);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3170,17 +3172,17 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
* 回滚分卷操作
|
* 回滚分卷操作
|
||||||
* 删除所有母卷生成的子钢卷,恢复母卷为当前数据
|
* 删除所有母卷生成的子钢卷,恢复母卷为当前数据
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> rollbackSplitOperation(WmsMaterialCoil currentCoil, WmsGenerateRecordVo qrcodeRecord,
|
private Map<String, Object> rollbackSplitOperation(WmsMaterialCoil currentCoil, WmsGenerateRecordVo qrcodeRecord,
|
||||||
Map<String, Object> rollbackInfo, Map<String, Object> result) {
|
Map<String, Object> rollbackInfo, Map<String, Object> result) {
|
||||||
List<Long> childCoilIds = (List<Long>) rollbackInfo.get("childCoilIds");
|
List<Long> childCoilIds = (List<Long>) rollbackInfo.get("childCoilIds");
|
||||||
|
|
||||||
if (childCoilIds == null || childCoilIds.isEmpty()) {
|
if (childCoilIds == null || childCoilIds.isEmpty()) {
|
||||||
throw new RuntimeException("无法获取分卷的子钢卷ID,无法回滚");
|
throw new RuntimeException("无法获取分卷的子钢卷ID,无法回滚");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询所有子钢卷
|
// 查询所有子钢卷
|
||||||
List<WmsMaterialCoil> childCoils = baseMapper.selectBatchIds(childCoilIds);
|
List<WmsMaterialCoil> childCoils = baseMapper.selectBatchIds(childCoilIds);
|
||||||
|
|
||||||
// 检查所有子钢卷是否存在
|
// 检查所有子钢卷是否存在
|
||||||
if (childCoils.size() != childCoilIds.size()) {
|
if (childCoils.size() != childCoilIds.size()) {
|
||||||
throw new RuntimeException("部分子钢卷不存在,无法回滚");
|
throw new RuntimeException("部分子钢卷不存在,无法回滚");
|
||||||
@@ -3262,9 +3264,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
result.put("message", "分卷回滚成功,已恢复母卷,删除了 " + childCoilIds.size() + " 个子钢卷");
|
result.put("message", "分卷回滚成功,已恢复母卷,删除了 " + childCoilIds.size() + " 个子钢卷");
|
||||||
result.put("deletedCoilIds", childCoilIds);
|
result.put("deletedCoilIds", childCoilIds);
|
||||||
result.put("restoredCoilId", motherCoilId);
|
result.put("restoredCoilId", motherCoilId);
|
||||||
|
|
||||||
log.info("分卷回滚操作成功:删除的子卷ID={}, 恢复的母卷ID={}", childCoilIds, motherCoilId);
|
log.info("分卷回滚操作成功:删除的子卷ID={}, 恢复的母卷ID={}", childCoilIds, motherCoilId);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user