| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | using Volo.Abp.ObjectMapping; |
| | | using CmsQueryExtensions.Entitys; |
| | | |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | |
| | | return whereConditions; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ°å»ºç©æåºç¡ä¿¡æ¯è¡¨ |
| | | /// </summary> |
| | |
| | | insertObj.Sort = sort; |
| | | input.MapExtraPropertiesTo(insertObj, MappingPropertyDefinitionChecks.None); |
| | | |
| | | insertObj.CreatorName = input.CreatorName;//å建人 |
| | | await wmsMaterialRepository.InsertAsync(insertObj); |
| | | |
| | | //if (input.Sort.HasValue && insertObj.Sort != maxSort) |
| | |
| | | updateObj.RedundantField3 = input.RedundantField3; |
| | | updateObj.Remark = input.Remark; |
| | | |
| | | updateObj.LastModifierName = input.LastModifierName;//ä¿®æ¹äºº |
| | | |
| | | await wmsMaterialRepository.UpdateAsync(updateObj); |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©çå é¤ç©æåºç¡ä¿¡æ¯è¡¨ |
| | | /// </summary> |
| | | /// <param name="id">ç©æID</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default) |
| | | { |
| | | wmsMaterialRepository.DeletePermanentlyAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éç©çå é¤ç©æåºç¡ä¿¡æ¯è¡¨ï¼ç´æ¥å é¤ï¼ä¸è½¯å é¤ï¼ |
| | | /// </summary> |
| | | /// <param name="ids">è¦å é¤çç©æIDå表</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task BatchDeletePermanentlyAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default) |
| | | { |
| | | wmsMaterialRepository.BatchDeletePermanentlyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåºç©æåºç¡ä¿¡æ¯è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public async Task ImportAsync(WmsMaterialsImportModel input) |
| | | public async Task ImportAsync(WmsMaterialsImportModel input, MyCurrentUser myCurrentUser) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | wmsMaterialDto.Item.CreatorName = myCurrentUser.UserAccount;//å建人 |
| | | await CreateAsync(wmsMaterialDto.Item); |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | wmsMaterialDto.Item.LastModifierName = myCurrentUser.UserAccount;//ä¿®æ¹äºº |
| | | await UpdateAsync(wmsMaterialDto.Id, wmsMaterialDto.Item); |
| | | } |
| | | catch (Exception e) |