Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
| | |
| | | * 添加的form字段 |
| | | */ |
| | | const formItems = reactive([ |
| | | // { |
| | | // label: '单据编号', |
| | | // prop: 'orderNo', |
| | | // el: 'input', |
| | | // disabled: disabled, |
| | | // placeholder: '请输入单据编号', |
| | | // rules: [{ required: true, message: '单据编号不能为空', trigger: 'blur' }], |
| | | // }, |
| | | // { |
| | | // label: '单据状态', |
| | | // prop: 'orderStatus', |
| | | // el: 'select', |
| | | // disabled: disabled, |
| | | // placeholder: '请输入单据状态', |
| | | // rules: [{ required: true, message: '单据状态不能为空', trigger: 'blur' }], |
| | | // }, |
| | | |
| | | { |
| | | label: '单据编号', |
| | | prop: 'orderNo', |
| | | el: 'input', |
| | | disabled: disabled, |
| | | placeholder: '请输入单据编号', |
| | | rules: [{ required: true, message: '单据编号不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '单据状态', |
| | | prop: 'orderStatus', |
| | | label: '单据类型', |
| | | prop: 'orderType', |
| | | el: 'select', |
| | | disabled: disabled, |
| | | placeholder: '请输入单据状态', |
| | | rules: [{ required: true, message: '单据状态不能为空', trigger: 'blur' }], |
| | | placeholder: '请输入单据类型', |
| | | rules: [{ required: true, message: '单据类型不能为空', trigger: 'blur' }], |
| | | }, |
| | | // { |
| | | // label: '操作类型', |
| | | // prop: 'stockType', |
| | | // el: 'select', |
| | | // disabled: disabled, |
| | | // placeholder: '请输入操作类型', |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: '操作类型不能为空', |
| | | // trigger: 'blur', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: '物料编号', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | disabled: disabled, |
| | | placeholder: '请输入物料编号', |
| | | rules: [{ required: true, message: '物料编号不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '物料名称', |
| | |
| | | placeholder: '请输入物料名称', |
| | | }, |
| | | { |
| | | label: '物料件号', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | disabled: disabled, |
| | | placeholder: '请输入物料件号', |
| | | rules: [{ required: true, message: '物料件号不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '型号', |
| | | prop: 'materialModel', |
| | | el: 'input', |
| | | disabled: disabled, |
| | | placeholder: '请输入型号', |
| | | }, |
| | | { |
| | | label: '批次号', |
| | | prop: 'materialBatch', |
| | | el: 'input', |
| | | disabled: disabled, |
| | | placeholder: '请输入批次号', |
| | | rules: [{ required: true, message: '批次号不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '单据类型', |
| | | prop: 'orderType', |
| | | el: 'select', |
| | | disabled: disabled, |
| | | placeholder: '请输入单据类型', |
| | | rules: [{ required: true, message: '单据类型不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '操作类型', |
| | | prop: 'stockType', |
| | | el: 'select', |
| | | disabled: disabled, |
| | | placeholder: '请输入操作类型', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '操作类型不能为空', |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '单据数量', |
| | |
| | | placeholder: '请输入单据数量', |
| | | rules: [{ required: true, message: '单据数量不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '下发数量', |
| | | prop: 'distributeNumber', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | disabled: disabled, |
| | | placeholder: '请输入下发数量', |
| | | rules: [{ required: true, message: '下发数量不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '完成数量', |
| | | prop: 'completeNumber', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | disabled: disabled, |
| | | placeholder: '请输入完成数量', |
| | | rules: [{ required: true, message: '完成数量不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '优先级', |
| | | prop: 'priority', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | // { |
| | | // label: '下发数量', |
| | | // prop: 'distributeNumber', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(inputNumber, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // step: 1, |
| | | // precision: 0, |
| | | //disabled: disabled, |
| | | placeholder: '请输入优先级', |
| | | rules: [{ required: true, message: '优先级不能为空', trigger: 'blur' }], |
| | | }, |
| | | // placeholder: '请输入下发数量', |
| | | // rules: [{ required: true, message: '下发数量不能为空', trigger: 'blur' }], |
| | | // }, |
| | | // { |
| | | // label: '完成数量', |
| | | // prop: 'completeNumber', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(inputNumber, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // step: 1, |
| | | // precision: 0, |
| | | // disabled: disabled, |
| | | // placeholder: '请输入完成数量', |
| | | // rules: [{ required: true, message: '完成数量不能为空', trigger: 'blur' }], |
| | | // }, |
| | | // { |
| | | // label: '优先级', |
| | | // prop: 'priority', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(inputNumber, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // step: 1, |
| | | // precision: 0, |
| | | // //disabled: disabled, |
| | | // placeholder: '请输入优先级', |
| | | // rules: [{ required: true, message: '优先级不能为空', trigger: 'blur' }], |
| | | // }, |
| | | { |
| | | label: '关联计划编号', |
| | | prop: 'planNo', |
| | |
| | | disabled: disabled, |
| | | placeholder: '请输入关联计划编号', |
| | | }, |
| | | { |
| | | label: '操作时间', |
| | | prop: 'operateTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePicker, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请输入操作时间', |
| | | }, |
| | | // { |
| | | // label: '操作时间', |
| | | // prop: 'operateTime', |
| | | // el: (props: any, { attrs }: SetupContext) => { |
| | | // return h(dateTimePicker, { |
| | | // ...props, |
| | | // clearable: true, |
| | | // ...attrs, |
| | | // }) |
| | | // }, |
| | | // width: '100%', |
| | | // //disabled: disabled, |
| | | // placeholder: '请输入操作时间', |
| | | // }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | |
| | | index: number |
| | | } |
| | | export const useWmsInOutStockRecord = (props: any, ctx?: any) => { |
| | | const wmsInOutStockRecord = injectModel<WmsInOutStockRecord>('wmsInOutStockRecord') |
| | | const wmsInOutStockRecord = injectModel<WmsInOutStockRecord>( |
| | | 'wmsInOutStockRecord' |
| | | ) |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头部配置 |
| | |
| | | isAdd: false, |
| | | }) |
| | | |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: '展开详情', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | // { |
| | | // label: '展开详情', |
| | | // fn: (c: CurrentType) => { |
| | | // current.value = null |
| | | // sort.value = c.row.sort |
| | | // nextTick(() => openDetail(c.row)) |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'o', |
| | | // }, |
| | | // { |
| | | // label: '向上添加', |
| | | // fn: (c: CurrentType, pageNum: number) => { |
| | |
| | | label: '删除', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { id: string }) => item.id) |
| | | ConfirmBox( |
| | | `是否删除${names.length ? names.join(',') : c.row.id}` |
| | | ).then(async () => { |
| | | ConfirmBox(`是否删除${names.length ? names.join(',') : c.row.id}`).then( |
| | | async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsInOutStockRecord.deleteWmsInOutStockRecords(ids.length ? ids : [c.row.id]) |
| | | await wmsInOutStockRecord.deleteWmsInOutStockRecords( |
| | | ids.length ? ids : [c.row.id] |
| | | ) |
| | | ElMessage.success('删除成功') |
| | | tableRef.value.getList() |
| | | }) |
| | | } |
| | | ) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | |
| | | */ |
| | | const onExport = (data={}) => { |
| | | //const params = tableRef.value?.getParams() |
| | | exportFile('/api/v1/HIAWms/wmsInOutStockRecord/export', data, 'wmsInOutStockRecord') |
| | | exportFile( |
| | | '/api/v1/HIAWms/wmsInOutStockRecord/export', |
| | | data, |
| | | 'wmsInOutStockRecord' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | |
| | | onConfirmWmsInOutStockRecord, |
| | | onCheck, |
| | | onAddWmsInOutStockRecord, |
| | | onAdvancedQuery |
| | | onAdvancedQuery, |
| | | } |
| | | } |
| | |
| | | [styles.wmsMaterialContainerList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | {/* <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/HIAWms/wmsMaterialContainer/{id}/adjustsort/{sort}" |
| | |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | ></BaseTable> */} |
| | | <ElForm> |
| | | <ElFormItem label="物料码"> |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder="请输入" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="库位号"> |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder="请输入" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="数量"> |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder="请输入" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | </ElForm> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsMaterialContainerContent}> |
| | | <ElForm> |
| | | <ElFormItem label="关键字"> |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder="请输入" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | </ElForm> |
| | | {/* 添加/编辑 */} |
| | | <WmsMaterialContainerDrawer |
| | | {/* <WmsMaterialContainerDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsMaterialContainer} |
| | | /> |
| | | /> */} |
| | | {/* 高级查询 */} |
| | | <WmsMaterialContainerQueryDrawer |
| | | {/* <WmsMaterialContainerQueryDrawer |
| | | ref="wmsMaterialContainerQueryDrawerRef" |
| | | v-model={dialogConfigForQuery.visible} |
| | | title={dialogConfigForQuery.title} |
| | |
| | | onConfirmQuery={handleQuery} |
| | | onRestQuery={resetQuery} |
| | | onClose={closeQuery} |
| | | /> |
| | | /> */} |
| | | |
| | | <div class={styles.headerContent}> |
| | | {/* <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsMaterialContainer-add" |
| | |
| | | <el-divider direction="vertical" /> |
| | | |
| | | <el-divider direction="vertical" /> |
| | | {/* <el-upload |
| | | <el-upload |
| | | v-permission="wmsMaterialContainer-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | |
| | | onClick={handleExport} |
| | | > |
| | | 导出 |
| | | </IconButton> */} |
| | | </IconButton> |
| | | </div> |
| | | <ElFormItem style={{ marginTop: '15px' }}> |
| | | <ElFormItem label="关键字"> |
| | |
| | | > |
| | | 查询 |
| | | </IconButton> |
| | | {/* <IconButton style="" icon="refresh" onClick={resetQuery}> |
| | | 重置 |
| | | </IconButton> */} |
| | | |
| | | <IconButton |
| | | v-permission="wmsMaterialContainer-add" |
| | | icon="search" |
| | |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | /> */} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | prop: 'materialName', |
| | | el: 'input', |
| | | placeholder: '请输入物料名称', |
| | | rules: [ |
| | | { required: true, message: '物料名称不能为空', trigger: 'blur' }, |
| | | { max: 100, message: '长度不能超过100个字符', trigger: 'blur' }, |
| | | ], |
| | | }, |
| | | // 容器信息 |
| | | { |
| | |
| | | formData.value = { |
| | | isLock: 0, |
| | | emptyContainer: 0, |
| | | checkStatus: 2, |
| | | inStockTime: new Date(), |
| | | } |
| | | updateCheckData() |
| | |
| | | placeholder: '请输入来源单据号', |
| | | }, |
| | | { |
| | | label: '下个任务是否生成成功', |
| | | label: '下个任务是否生成', |
| | | prop: 'isNextTask', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | using Volo.Abp.ObjectMapping; |
| | | using CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | |
| | | public class WmsInOutStockOrderAppService : CMSPluginAppService, IWmsInOutStockOrderAppService |
| | | { |
| | | private readonly IWmsInOutStockOrderRepository wmsInOutStockOrderRepository; |
| | | private readonly IWmsMaterialRepository _wmsMaterialRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsInOutStockOrderAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="WmsInOutStockOrderRepository">The task job repository.</param> |
| | | public WmsInOutStockOrderAppService(IWmsInOutStockOrderRepository _WmsInOutStockOrderRepository) |
| | | public WmsInOutStockOrderAppService(IWmsInOutStockOrderRepository _WmsInOutStockOrderRepository, IWmsMaterialRepository wmsMaterialRepository) |
| | | { |
| | | wmsInOutStockOrderRepository = _WmsInOutStockOrderRepository; |
| | | _wmsMaterialRepository = wmsMaterialRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var material = await _wmsMaterialRepository.FindByNameAsync(input.MaterialNo); |
| | | if (material == null) |
| | | { |
| | | throw new UserFriendlyException("物料信息不存在"); |
| | | } |
| | | |
| | | var exist = await wmsInOutStockOrderRepository.NameExistAsync(input.OrderNo); |
| | | if (exist) |
| | | { |
| | |
| | | var maxSort = await wmsInOutStockOrderRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | |
| | | var maxPriority = await wmsInOutStockOrderRepository.GetMaxPriorityAsync(); |
| | | var priority = input.Priority > 0 ? input.Priority : maxPriority; |
| | | |
| | | var insertObj = ObjectMapper.Map<WmsInOutStockOrderCreateDto, WmsInOutStockOrder>(input); |
| | | insertObj.MaterialName = material.MaterialName; |
| | | insertObj.MaterialModel = material.MaterialModel; |
| | | insertObj.OrderStatus = Domain.Shared.Enums.OrderStatusEnum.NoStart; |
| | | |
| | | var type = "RK-"; |
| | | insertObj.StockType = Domain.Shared.Enums.StockTypeEnum.InBound; |
| | | if (input.OrderType == Domain.Shared.Enums.OrderTypeEnum.PRODUCTCALL || input.OrderType == Domain.Shared.Enums.OrderTypeEnum.PERSONOT) |
| | | { |
| | | type = "CK-"; |
| | | insertObj.StockType = Domain.Shared.Enums.StockTypeEnum.OutBound; |
| | | } |
| | | insertObj.OrderNo = type + DateTime.Now.ToString("yyyyMMddHHmmssfff"); |
| | | insertObj.Sort = sort; |
| | | insertObj.Priority = priority; |
| | | input.MapExtraPropertiesTo(insertObj, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await wmsInOutStockOrderRepository.InsertAsync(insertObj); |
| | |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | public virtual async Task DeleteAsync(Guid id) |
| | | { |
| | | return wmsInOutStockOrderRepository.DeleteAsync(id); |
| | | var order = await wmsInOutStockOrderRepository.GetAsync(id); |
| | | if(order != null && order.OrderStatus != Domain.Shared.Enums.OrderStatusEnum.NoStart) |
| | | { |
| | | throw new UserFriendlyException("只能删除未开始的单据"); |
| | | } |
| | | await wmsInOutStockOrderRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsInOutStockOrderCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.OrderNo, "单据编号", 50); |
| | | Check.NotNull(input.OrderStatus, "单据状态"); |
| | | Check.NotNullOrWhiteSpace(input.MaterialNo, "物料件号", 50); |
| | | Check.NotNullOrWhiteSpace(input.MaterialNo, "物料编号", 50); |
| | | Check.NotNullOrWhiteSpace(input.MaterialBatch, "批次号", 50); |
| | | Check.NotNull(input.OrderType, "单据类型"); |
| | | Check.NotNull(input.StockType, "操作类型(枚举值)"); |
| | | Check.NotNull(input.StockType, "操作类型"); |
| | | Check.NotNull(input.MaterialNumber, "单据数量"); |
| | | Check.NotNull(input.DistributeNumber, "下发数量"); |
| | | Check.NotNull(input.CompleteNumber, "完成数量"); |
| | | Check.NotNull(input.Priority, "优先级"); |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | |
| | | { |
| | | throw new UserFriendlyException("库位库区信息不存在"); |
| | | } |
| | | var wmsmaterialstockList = await _wmsmaterialstockRepository.GetStockListAsync(new WmsMaterialStock { PlaceNo = input.PlaceNo }); |
| | | if (wmsmaterialstockList.Count > 0) |
| | | { |
| | | if (wmsmaterialstockList[0].MaterialNo != input.MaterialNo) |
| | | { |
| | | throw new UserFriendlyException("当前库位已存放别的物料"); |
| | | } |
| | | } |
| | | |
| | | var maxSort = await _wmsmaterialstockRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsmaterialstock = ObjectMapper.Map<WmsMaterialStockCreateDto, WmsMaterialStock>(input); |
| | |
| | | await _wmscontainerRepository.UpdateAsync(container); |
| | | await _wmsplaceRepository.UpdateAsync(place); |
| | | |
| | | if (input.Sort.HasValue && wmsmaterialstock.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmsmaterialstock.Id, wmsmaterialstock.Sort); |
| | | } |
| | | //if (input.Sort.HasValue && wmsmaterialstock.Sort != maxSort) |
| | | //{ |
| | | // await AdjustSortAsync(wmsmaterialstock.Id, wmsmaterialstock.Sort); |
| | | //} |
| | | await uow.SaveChangesAsync(); |
| | | await uow.CompleteAsync(); |
| | | return ObjectMapper.Map<WmsMaterialStock, WmsMaterialStockDto>(wmsmaterialstock); |
| | |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// 获取最大优先级值 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxPriorityAsync(); |
| | | |
| | | /// <summary> |
| | | /// 获取分页列表出入库单据 |
| | | /// </summary> |
| | |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取最大优先级值 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<int> GetMaxPriorityAsync() |
| | | { |
| | | // 获取今天的日期(时间部分为00:00:00) |
| | | var today = DateTime.Today; |
| | | |
| | | var queryable = await GetQueryableAsync(); |
| | | var query = queryable |
| | | .Where(x => x.CreationTime > today) |
| | | .Where(x => !x.IsDeleted); |
| | | |
| | | var hasAny = await query.AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | // 获取最大Sort值并加1 |
| | | var maxSort = await query.MaxAsync(x => x.Sort); |
| | | return maxSort + 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取分页列表出入库单据 |
| | | /// </summary> |