add:调拨出库单(委外接口)
This commit is contained in:
@@ -10,7 +10,8 @@ public enum OutboundDeliveryBillType {
|
||||
SUBCONTRACT_OUT("SUBCONTRACT_OUT", "委外交货出库", "LB", "其他出库", false),
|
||||
TRANSFER_IN("TRANSFER_IN", "公司间调拨收货", "NLCC", null, true),
|
||||
SALES_OUT("SALES_OUT", "原材料销售出库", "ZLF4", "销售出库", false),
|
||||
SALES_RETURN_IN("SALES_RETURN_IN", "原材料销售退货", "ZLR1", null, true);
|
||||
SALES_RETURN_IN("SALES_RETURN_IN", "原材料销售退货", "ZLR1", null, true),
|
||||
TRANSFER_OUT("TRANSFER_OUT", "SAP公司间调拨出货", "NL", null, false);
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
|
||||
@@ -648,49 +648,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
|
||||
String iostorinv_id = whereJson.getString("iostorinv_id");
|
||||
String regionCode = whereJson.getString("region_code");
|
||||
// if (SpringContextHolder.getBean(org.nl.wms.welding_manage.service.work_order.impl.WorkOrderOutboundService.class).isWorkOrderBill(whereJson.getString("iostorinv_id"))) {
|
||||
// List<IOStorInvDis> ioStorInvDisList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
||||
// .eq(IOStorInvDis::getIostorinv_id, iostorinv_id)
|
||||
// .eq(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||
// .and(wrapper -> wrapper.isNotNull(IOStorInvDis::getStruct_code)
|
||||
// .ne(IOStorInvDis::getStruct_code, ""))
|
||||
// .select(IOStorInvDis::getIostorinvdis_id
|
||||
// , IOStorInvDis::getStruct_code
|
||||
// , IOStorInvDis::getStoragevehicle_code)
|
||||
// );
|
||||
// if (ObjectUtil.isEmpty(ioStorInvDisList)) {
|
||||
// throw new BadRequestException("当前没有可设置的分配明细");
|
||||
// }
|
||||
// //仓储出入任务
|
||||
// StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
|
||||
// //分配明细中同分配到同载具的进行合并
|
||||
// Map<String, List<IOStorInvDis>> groupDis = ioStorInvDisList.stream().collect(Collectors.groupingBy(dis -> dis.getStoragevehicle_code()));
|
||||
// for (String storageVehicleCode : groupDis.keySet()) {
|
||||
// List<IOStorInvDis> disList = groupDis.get(storageVehicleCode);
|
||||
// IOStorInvDis item = disList.get(0);
|
||||
// //创建任务
|
||||
// JSONObject task_form = new JSONObject();
|
||||
// task_form.put("task_type", "STOutTask");
|
||||
// task_form.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
||||
// task_form.put("PickingLocation", item.getStruct_code());
|
||||
// task_form.put("PlacedLocation", item.getPoint_code());
|
||||
// task_form.put("vehicle_code", item.getStoragevehicle_code());
|
||||
// String task_id = stOutTask.create(task_form);
|
||||
// ioStorInvDisMapper.update(null, new LambdaUpdateWrapper<IOStorInvDis>()
|
||||
// .set(IOStorInvDis::getTask_id, task_id)
|
||||
// .set(IOStorInvDis::getIs_issued, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
// .set(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("执行中"))
|
||||
// .in(IOStorInvDis::getIostorinvdis_id, disList.stream()
|
||||
// .map(IOStorInvDis::getIostorinvdis_id).collect(Collectors.toList())));
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
|
||||
//出库点
|
||||
// if (StrUtil.isBlank(whereJson.getString("point_code"))) {
|
||||
// throw new BadRequestException("未选择出库点");
|
||||
// }
|
||||
//----根据区域找点,特殊业务比如找空点位在这边----
|
||||
|
||||
List<SchBasePoint> pointList = schBasePointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getRegion_code, regionCode)
|
||||
@@ -722,10 +679,11 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
throw new BadRequestException("当前没有可设置的分配明细");
|
||||
}
|
||||
//仓储出入任务:部门领料单(SAP PP113)下发专属任务,任务完成后由 PDA 拣选确认按实际数量出库
|
||||
boolean deptPickingBill = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<IOStorInvDtl>()
|
||||
.eq(IOStorInvDtl::getIostorinv_id, iostorinv_id)
|
||||
.eq(IOStorInvDtl::getSource_bill_type, SourceBillTypeEnum.SAP_DEPT_PICKING.getBillType())) > 0;
|
||||
String taskBeanName = deptPickingBill ? "DeptPickingOutTask" : "STOutTask";
|
||||
// boolean deptPickingBill = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<IOStorInvDtl>()
|
||||
// .eq(IOStorInvDtl::getIostorinv_id, iostorinv_id)
|
||||
// .eq(IOStorInvDtl::getSource_bill_type, SourceBillTypeEnum.SAP_DEPT_PICKING.getBillType())) > 0;
|
||||
String taskBeanName = "DeptPickingOutTask";
|
||||
//所有出库都需要在PDA做出库确认
|
||||
AbstractTask outTask = SpringContextHolder.getBean(taskBeanName);
|
||||
//分配明细中同分配到同载具的进行合并
|
||||
Map<String, List<IOStorInvDis>> groupDis = ioStorInvDisList.stream().collect(Collectors.groupingBy(dis -> dis.getStoragevehicle_code()));
|
||||
|
||||
@@ -333,6 +333,7 @@ export default {
|
||||
{ value: 'SUBCONTRACT_OUT', label: '委外交货出库' },
|
||||
{ value: 'TRANSFER_IN', label: '公司间调拨收货' },
|
||||
{ value: 'SALES_OUT', label: '原材料销售出库' },
|
||||
{ value: 'TRANSFER_OUT', label: '原材料销售出库' },
|
||||
{ value: 'SALES_RETURN_IN', label: '原材料销售退货' }
|
||||
],
|
||||
storageOnlyBilltypes: ['TRANSFER_IN', 'SALES_RETURN_IN'],
|
||||
|
||||
Reference in New Issue
Block a user