Browse Source

修改

master
shenzhouyu 2 months ago
parent
commit
a049f128c1
  1. 7
      src/main/java/com/gaotao/modules/notify/service/impl/IssureNotifyServiceImpl.java

7
src/main/java/com/gaotao/modules/notify/service/impl/IssureNotifyServiceImpl.java

@ -871,21 +871,21 @@ public class IssureNotifyServiceImpl implements IssureNotifyService {
// 用于存储最终结果父集合和子集合
List<SOIssueNotifyOrderList> parentList = new ArrayList<>();
List<SOIssueNotifyOrderMaterialList> childList = new ArrayList<>();
int num = 0;
BigDecimal nextItem=BigDecimal.ZERO;
// 步骤2遍历每个分组生成父对象和子对象
List<ShoporderAndMaterialDto> groupDtos = data.getMaterialList();
// 2.1 生成父对象的唯一 itemNo确保全局唯一这里用 UUID 简化
if(num == 0){
SOIssueNotifyOrderList parentData = new SOIssueNotifyOrderList();
parentData.setSite(data.getSite());
parentData.setNotifyNo(data.getNotifyNo());
nextItem = issureNotifyMapper.getNextItemForSOIssueNotifyOrderList(parentData);
}else{
if(nextItem == null) {
nextItem = nextItem.add(BigDecimal.ONE);
}
String transType = Consts.VR;
// 获取流水号,出错不回滚
TransNoControl transNo = transNoService.getTransNo(data.getSite(),transType,8);
@ -893,6 +893,7 @@ public class IssureNotifyServiceImpl implements IssureNotifyService {
// 2.2 构建SOIssueNotifyOrderList
SOIssueNotifyOrderList parent = buildOnOrderParent(data.getNotifyNo(),data.getSite(),newOrderNo, data.getOrderType(), nextItem);
parentList.add(parent);
if("shoporder".equals(parent.getOrderType())){
parent.setProductionArea("Z301");
}else if ("shipment".equals(parent.getOrderType())){

Loading…
Cancel
Save