立体库

This commit is contained in:
mashuai 2026-01-10 21:23:53 +08:00
parent 36dd02f46d
commit fc40e4af1f
2 changed files with 18 additions and 18 deletions

View File

@ -1653,23 +1653,23 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
//String url = MaterialConstants.TEST_CREATE_OUT_URL;
String data = AutomaticHttpHelper.sendHttpPostPushCost(url, body);
if (StringUtils.isEmpty(data)) {
System.err.println("立体仓出库单创建失败");
throw new RuntimeException("立体仓出库单创建失败");
}
JSONObject object = JSONObject.parseObject(data);
String code = object.getString("code");
if (!"0".equals(code)) {
System.err.println("立体仓出库单创建失败");
throw new RuntimeException("立体仓出库单创建失败");
}
}
}
}
return AjaxResult.success("发布成功");
} catch (DataAccessException e) {
} catch (Exception e) {
// 抛出异常回滚数据
throw new RuntimeException("发布失败:" + e.getMessage());
} catch (Exception e) {
return AjaxResult.error("发布失败");
}
return AjaxResult.success("发布成功");
}
/**

View File

@ -1141,7 +1141,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
monthMaxOrder = value;
}
} catch (NumberFormatException e) {
throw new ServiceException("保存失败,请联系管理员");
throw new RuntimeException("保存失败,请联系管理员");
}
}
}
@ -1158,7 +1158,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
// 根据parentId及typeId更新lease_apply_details表的发布数量
result = mapper.updatePublish(leaseApplyDetailsList.get(i));
if (result == 0) {
throw new ServiceException("发布失败,请联系管理员");
throw new RuntimeException("发布失败,请联系管理员");
}
leaseApplyDetailsList.get(i).setUnitId(leaseApplyInfo.getUnitId());
leaseApplyDetailsList.get(i).setProjectId(leaseApplyInfo.getProjectId());
@ -1173,18 +1173,18 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
leaseApplyDetailsList.get(i).setCompanyId(leaseApplyInfo.getCompanyId());
result = mapper.addPublish(leaseApplyDetailsList.get(i));
if (result == 0) {
throw new ServiceException("发布失败,请联系管理员");
throw new RuntimeException("发布失败,请联系管理员");
}
AutomaticOutPutDto automaticOutPutDto = new AutomaticOutPutDto();
automaticOutPutDto.setMaterialName(leaseApplyDetailsList.get(i).getMaTypeName());
automaticOutPutDto.setUnitCode(leaseApplyDetailsList.get(i).getUnitName());
automaticOutPutDto.setOutQty(leaseApplyDetailsList.get(i).getNum());
automaticOutPutDto.setLineNum(i + 1);
automaticOutPutDto.setTypeId(leaseApplyDetailsList.get(i).getNewTypeId());
automaticOutPutDto.setSpecification(leaseApplyDetailsList.get(i).getTypeName());
// 根据newTypeId查询是否属于立体库
Type type = mapper.isRs(leaseApplyDetailsList.get(i).getNewTypeId());
Type type = mapper.isRs(leaseApplyDetailsList.get(i).getNewTypeId());
if (type != null && type.getIsRs() == 1) {
AutomaticOutPutDto automaticOutPutDto = new AutomaticOutPutDto();
automaticOutPutDto.setMaterialName(leaseApplyDetailsList.get(i).getMaTypeName());
automaticOutPutDto.setUnitCode(leaseApplyDetailsList.get(i).getUnitName());
automaticOutPutDto.setOutQty(leaseApplyDetailsList.get(i).getNum());
automaticOutPutDto.setLineNum(i + 1);
automaticOutPutDto.setTypeId(leaseApplyDetailsList.get(i).getNewTypeId());
automaticOutPutDto.setSpecification(leaseApplyDetailsList.get(i).getTypeName());
list.add(automaticOutPutDto);
}
}
@ -1205,7 +1205,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
tmTask.setTaskStatus(3);
result = tmTaskMapper.updateTmTask(tmTask);
if (result == 0) {
throw new ServiceException("发布失败,请联系管理员");
throw new RuntimeException("发布失败,请联系管理员");
}
}
if (!CollectionUtils.isEmpty(list)) {
@ -1232,11 +1232,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
throw new RuntimeException("立体仓出库单创建失败");
}
}
return AjaxResult.success("发布成功");
} catch (Exception e) {
log.error(e.getMessage());
return AjaxResult.error("发布失败,请联系管理员");
throw new RuntimeException("发布失败,请联系管理员");
}
return AjaxResult.success("发布成功");
}