| | |
| | | trackCode: "trackCode", |
| | | unit: "unit", |
| | | anfme: "anfme", |
| | | qty: 'Qty', |
| | | workQty: 'Work Qty', |
| | | batch: "batch", |
| | | splrBatch: "splrBatch", |
| | | spec: "spec", |
| | |
| | | matnrCode: "物料编码", |
| | | trackCode: "跟踪码", |
| | | workQty: '执行数', |
| | | qty: '完成数', |
| | | batch: "批次", |
| | | splrBatch: "供应商批次", |
| | | spec: "规格", |
| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.asnOrderLog"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='asnOrderLog' /> |
| | | <MyExportButton /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='asnOrderLog' |
| | | bulkActionButtons={ |
| | | <> |
| | | <MyExportButton /> |
| | | </> |
| | | } |
| | | bulkActionButtons={false} |
| | | rowClick={'edit'} |
| | | expand={false} |
| | | expandSingle={true} |
| | |
| | | <TextField source="trackCode" label="table.field.locItem.trackCode" />, |
| | | <TextField source="unit" label="table.field.locItem.unit" />, |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" />, |
| | | <NumberField source="workQty" label="table.field.locItem.workQty" />, |
| | | <NumberField source="qty" label="table.field.locItem.qty" />, |
| | | <TextField source="splrBatch" label="table.field.locItem.splrBatch" />, |
| | | <TextField source="fieldsIndex" label="table.field.locItem.fieldsIndex" />, |
| | | ] |
| | |
| | | rowClick={false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'locId', 'orderId', 'orderItemId', 'matnrId', 'splrBatch', 'workQty', 'qty', 'createBy', 'memo', 'fieldsIndex']} |
| | | omit={['id', 'createTime','spec', 'model', 'locId', 'orderId', 'trackCode', 'orderItemId', 'matnrId', 'splrBatch','createBy', 'memo', 'fieldsIndex']} |
| | | > |
| | | {columns.map((column) => column)} |
| | | </StyledDatagrid>} |
| | |
| | | @ApiModelProperty(value= "主单ID") |
| | | private Long locId; |
| | | |
| | | @ApiModelProperty("任务明细ID") |
| | | @ApiModelProperty("任务ID") |
| | | private Long taskId; |
| | | |
| | | @ApiModelProperty("库位明细ID") |
| | | private Long locItemId; |
| | | |
| | | /** |
| | | * 库位 |
| | | */ |
| | |
| | | } |
| | | |
| | | Double orgQty = locItems.stream().mapToDouble(LocItem::getAnfme).sum(); |
| | | Double workQty = locItems.stream().mapToDouble(LocItem::getWorkQty).sum(); |
| | | List<LocItem> locItemList = listMap.get(key); |
| | | Double outQty = locItemList.stream().mapToDouble(LocItem::getOutQty).sum(); |
| | | |
| | |
| | | if (!Objects.isNull(serviceOne)) { |
| | | throw new CoolException("托盘任务执行中,不能重复创建!"); |
| | | } |
| | | |
| | | if (orgQty.compareTo(outQty) > 0) { |
| | | Double useQty = Math.round((outQty + workQty) * 10000) / 10000.0; |
| | | if (orgQty.compareTo(useQty) > 0) { |
| | | //拣料出库 |
| | | task.setTaskType(TaskType.TASK_TYPE_PICK_AGAIN_IN.type); |
| | | } else { |
| | |
| | | for (TaskItem taskItem : taskItems) { |
| | | LocItem locItem = new LocItem(); |
| | | LocItemWorking locWorking = locItemWorkingService.getOne(new LambdaQueryWrapper<LocItemWorking>() |
| | | .eq(LocItemWorking::getTaskId, taskItem.getTaskId())); |
| | | .eq(LocItemWorking::getTaskId, taskItem.getTaskId()) |
| | | .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItemWorking::getBatch, taskItem.getBatch()) |
| | | .eq(StringUtils.isNotBlank(taskItem.getFieldsIndex()), LocItemWorking::getFieldsIndex, taskItem.getFieldsIndex()) |
| | | .eq(LocItemWorking::getMatnrId, taskItem.getMatnrId())); |
| | | if (Objects.isNull(locWorking)) { |
| | | throw new CoolException("数据错误,作业中库存数据丢失!!"); |
| | | } |
| | |
| | | items.add(locItem); |
| | | } |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | |
| | | saveStockItems(taskItems, null, null, taskItem.getWkType(), taskItem.getOrderType()); |
| | | |
| | | if (!locItemService.saveBatch(items)) { |
| | | throw new CoolException("作业库存回写失败!!"); |
| | | } |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | //保存入出库流水 |
| | | saveStockItems(taskItems, null, null, taskItem.getWkType(), taskItem.getOrderType()); |
| | | |
| | | |
| | | if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) { |
| | | throw new CoolException("作业中库存删除失败!!"); |
| | |
| | | for (LocItem item : locItems) { |
| | | LocItemWorking working = new LocItemWorking(); |
| | | BeanUtils.copyProperties(item, working); |
| | | working.setId(null).setTaskId(task.getId()); |
| | | working.setId(null).setTaskId(task.getId()).setLocItemId(item.getId()); |
| | | workings.add(working); |
| | | } |
| | | |
| | |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | # url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | url: jdbc:mysql://192.168.4.50:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: rsf |
| | | password: 34821015 |
| | | type: com.alibaba.druid.pool.DruidDataSource |