opt:优化二楼CTU出库记录单据号,过滤非立库单据
This commit is contained in:
@@ -82,7 +82,7 @@ public class ErpServiceUtils {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("当前同步操作正在执行,稍后再试");
|
||||
throw new BadRequestException("系统正在自动同步ERP单据,正占用接口资源,请稍后再试");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
@@ -115,7 +115,7 @@ public class ErpServiceUtils {
|
||||
result.add(jsonObject);
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("当前同步操作正在执行,稍后再试");
|
||||
throw new BadRequestException("系统正在自动同步ERP单据,正占用接口资源,请稍后再试");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
|
||||
@@ -109,6 +109,9 @@ public class StrucFormActivityBehavior extends FlowNodeActivityBehavior<JSONObje
|
||||
String dels = dtl.toString();
|
||||
PmFormData iostorinvdtl = JSONObject.parseObject(dels, PmFormData.class, Feature.OrderedField);
|
||||
item.put("form_id",iostorinvdtl.getId());
|
||||
JSONObject formData =new JSONObject();
|
||||
formData.put("prd_ppbom_no",dtl.getString("prd_ppbom_no"));
|
||||
iostorinvdtl.setForm_data(formData);
|
||||
iPmFormDataService.save(iostorinvdtl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PickTask {
|
||||
*/
|
||||
private String vehicle_id;
|
||||
/**
|
||||
* 拣选工位
|
||||
* 拣选工位·
|
||||
*/
|
||||
private String point_code;
|
||||
/**
|
||||
|
||||
@@ -320,6 +320,11 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
private void handleFormDatas(List<PmFormDataDto> pmFormDataDtos) {
|
||||
List<String> parents = pmFormDataDtos.stream().map(PmFormDataDto::getId).collect(Collectors.toList());
|
||||
List<PmFormDataDto> childs = this.baseMapper.selectChilds(parents);
|
||||
//过滤非料箱与托盘库
|
||||
childs.removeIf(r ->
|
||||
!new HashSet<>(Arrays.asList("1233925", "1233926"))
|
||||
.contains(r.getForm_data().getString("stock_Id"))
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(childs)) {
|
||||
Map<String, List<PmFormDataDto>> childMap = childs.stream().collect(Collectors.groupingBy(PmFormDataDto::getParent_id));
|
||||
for (PmFormDataDto dataDto : pmFormDataDtos) {
|
||||
@@ -348,6 +353,11 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
}
|
||||
PmFormDataDto pmFormDataDto = pmFormDataDtos.get(0);
|
||||
List<PmFormDataDto> childs = this.baseMapper.selectChilds(ListOf.of(pmFormDataDto.getId()));
|
||||
//过滤非料箱与托盘库
|
||||
childs.removeIf(r ->
|
||||
!new HashSet<>(Arrays.asList("1233925", "1233926"))
|
||||
.contains(r.getForm_data().getString("stock_Id"))
|
||||
);
|
||||
if (CollectionUtils.isEmpty(childs)){
|
||||
throw new BadRequestException(code+"单据明细数据为空");
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class PickingService {
|
||||
int mCode = iMdPbVehicleMaterService.count(new QueryWrapper<MdPbVehicleMater>()
|
||||
.in("vehicle_code", vehicleCodes).eq("is_delete",false));
|
||||
if (mCode > 0) {
|
||||
throw new BadRequestException("当前载具" + vehicleCodes + "以存在载具物料信息");
|
||||
throw new BadRequestException("当前载具" + vehicleCodes + "已存在载具物料信息");
|
||||
}
|
||||
String now = DateUtil.now();
|
||||
String user = SecurityUtils.getCurrentNickName();
|
||||
@@ -238,6 +238,7 @@ public class PickingService {
|
||||
mater.setMaterial_id(one.getMaterial_id());
|
||||
mater.setPcsn(one.getPcsn());
|
||||
mater.setQty(data.getQty());
|
||||
mater.setPrd_ppbom_no(dtl.getForm_data().getString("prd_ppbom_no"));
|
||||
mater.setUnit_id(data.getUnit_id());
|
||||
mater.setVehicle_code(vehicle_code);
|
||||
//设置目标仓库
|
||||
|
||||
@@ -211,7 +211,7 @@ public class SyncErpBillsScheduleService {
|
||||
return "同步成功,共计" + result.size() + "条";
|
||||
}
|
||||
}else {
|
||||
throw new BadRequestException("当前同步操作正在执行,稍后再试");
|
||||
throw new BadRequestException("系统正在自动同步ERP单据,正占用接口资源,请稍后再试");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
@@ -308,7 +308,7 @@ public class SyncErpBillsScheduleService {
|
||||
.set(PmFormData::getMaterial_id, f.getMaterial_id())
|
||||
.set(PmFormData::getQty, f.getQty())
|
||||
//todo 确认分配数量是多少
|
||||
.set(PmFormData::getAssign_qty, f.getQty())
|
||||
.set(PmFormData::getAssign_qty,BigDecimal.ZERO)
|
||||
.set(PmFormData::getUnit_id, f.getUnit_id())
|
||||
.set(PmFormData::getForm_data, JSON.toJSONString(f.getForm_data()))
|
||||
.set(PmFormData::getPlan_qty, f.getPlan_qty())
|
||||
|
||||
Reference in New Issue
Block a user