立体库
This commit is contained in:
parent
36dd02f46d
commit
fc40e4af1f
|
|
@ -1653,23 +1653,23 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
//String url = MaterialConstants.TEST_CREATE_OUT_URL;
|
//String url = MaterialConstants.TEST_CREATE_OUT_URL;
|
||||||
String data = AutomaticHttpHelper.sendHttpPostPushCost(url, body);
|
String data = AutomaticHttpHelper.sendHttpPostPushCost(url, body);
|
||||||
if (StringUtils.isEmpty(data)) {
|
if (StringUtils.isEmpty(data)) {
|
||||||
|
System.err.println("立体仓出库单创建失败");
|
||||||
throw new RuntimeException("立体仓出库单创建失败");
|
throw new RuntimeException("立体仓出库单创建失败");
|
||||||
}
|
}
|
||||||
JSONObject object = JSONObject.parseObject(data);
|
JSONObject object = JSONObject.parseObject(data);
|
||||||
String code = object.getString("code");
|
String code = object.getString("code");
|
||||||
if (!"0".equals(code)) {
|
if (!"0".equals(code)) {
|
||||||
|
System.err.println("立体仓出库单创建失败");
|
||||||
throw new RuntimeException("立体仓出库单创建失败");
|
throw new RuntimeException("立体仓出库单创建失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success("发布成功");
|
} catch (Exception e) {
|
||||||
} catch (DataAccessException e) {
|
|
||||||
// 抛出异常、回滚数据
|
// 抛出异常、回滚数据
|
||||||
throw new RuntimeException("发布失败:" + e.getMessage());
|
throw new RuntimeException("发布失败:" + e.getMessage());
|
||||||
} catch (Exception e) {
|
|
||||||
return AjaxResult.error("发布失败");
|
|
||||||
}
|
}
|
||||||
|
return AjaxResult.success("发布成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1141,7 +1141,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
monthMaxOrder = value;
|
monthMaxOrder = value;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ServiceException("保存失败,请联系管理员");
|
throw new RuntimeException("保存失败,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1158,7 +1158,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
||||||
result = mapper.updatePublish(leaseApplyDetailsList.get(i));
|
result = mapper.updatePublish(leaseApplyDetailsList.get(i));
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
throw new ServiceException("发布失败,请联系管理员");
|
throw new RuntimeException("发布失败,请联系管理员");
|
||||||
}
|
}
|
||||||
leaseApplyDetailsList.get(i).setUnitId(leaseApplyInfo.getUnitId());
|
leaseApplyDetailsList.get(i).setUnitId(leaseApplyInfo.getUnitId());
|
||||||
leaseApplyDetailsList.get(i).setProjectId(leaseApplyInfo.getProjectId());
|
leaseApplyDetailsList.get(i).setProjectId(leaseApplyInfo.getProjectId());
|
||||||
|
|
@ -1173,18 +1173,18 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
leaseApplyDetailsList.get(i).setCompanyId(leaseApplyInfo.getCompanyId());
|
leaseApplyDetailsList.get(i).setCompanyId(leaseApplyInfo.getCompanyId());
|
||||||
result = mapper.addPublish(leaseApplyDetailsList.get(i));
|
result = mapper.addPublish(leaseApplyDetailsList.get(i));
|
||||||
if (result == 0) {
|
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查询是否属于立体库
|
// 根据newTypeId查询是否属于立体库
|
||||||
Type type = mapper.isRs(leaseApplyDetailsList.get(i).getNewTypeId());
|
Type type = mapper.isRs(leaseApplyDetailsList.get(i).getNewTypeId());
|
||||||
if (type != null && type.getIsRs() == 1) {
|
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);
|
list.add(automaticOutPutDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1205,7 +1205,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
tmTask.setTaskStatus(3);
|
tmTask.setTaskStatus(3);
|
||||||
result = tmTaskMapper.updateTmTask(tmTask);
|
result = tmTaskMapper.updateTmTask(tmTask);
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
throw new ServiceException("发布失败,请联系管理员");
|
throw new RuntimeException("发布失败,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
|
@ -1232,11 +1232,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
throw new RuntimeException("立体仓出库单创建失败");
|
throw new RuntimeException("立体仓出库单创建失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success("发布成功");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
return AjaxResult.error("发布失败,请联系管理员");
|
throw new RuntimeException("发布失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
|
return AjaxResult.success("发布成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue