|
@ -89,9 +89,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository, |
|
|
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository, |
|
|
WMSEfCoreRepository<TB_BILL> wmstbRespository, |
|
|
WMSEfCoreRepository<TB_BILL> wmstbRespository, |
|
|
IDistributedCache<WmsJitOutPutDetial> cache, |
|
|
IDistributedCache<WmsJitOutPutDetial> cache, |
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
ICommonManager commonManager, |
|
|
ICommonManager commonManager, |
|
|
|
|
|
|
|
|
ErpPartDapperRepository repository, |
|
|
ErpPartDapperRepository repository, |
|
|
TaskJobService service |
|
|
TaskJobService service |
|
|
|
|
|
|
|
@ -513,7 +512,19 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
|
public async Task<bool> WmsJitOutPutPass(WmsJitRequestDto input) |
|
|
public async Task<bool> WmsJitOutPutPass(WmsJitRequestDto input) |
|
|
{ |
|
|
{ |
|
|
List<CustomCondition> customConditionList = new List<CustomCondition>(); |
|
|
var list= _wmsRepository.Where(p => p.BillNum == input.BillNum ).ToList(); |
|
|
|
|
|
var alreay=list.FirstOrDefault(p => p.BillNum == input.BillNum && p.State==1); |
|
|
|
|
|
if (alreay.State == 1) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new UserFriendlyException("单据中有申请状态记录不能重复提交","8989"); |
|
|
|
|
|
} |
|
|
|
|
|
var updatelist=list.Where(p => p.State != 4 && p.State != 2).ToList(); |
|
|
|
|
|
foreach (var itm in updatelist) |
|
|
|
|
|
{ |
|
|
|
|
|
itm.State = 1; |
|
|
|
|
|
} |
|
|
|
|
|
await _wmsRepository.GetDbContext().BulkUpdateAsync(updatelist); |
|
|
|
|
|
List <CustomCondition> customConditionList = new List<CustomCondition>(); |
|
|
customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = input.BillNum ?? string.Empty }); |
|
|
customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = input.BillNum ?? string.Empty }); |
|
|
customConditionList.Add(new CustomCondition() { Name = "Date", Value = input.AccountDate.ToString() }); |
|
|
customConditionList.Add(new CustomCondition() { Name = "Date", Value = input.AccountDate.ToString() }); |
|
|
var _taskid = await _service.ExportEnqueueAsync("准时化出库服务"+input.BillNum, ExportExtentsion.Excel, input.Version, string.Empty, CurrentUser, typeof(FisOutputService), customConditionList, (rs) => |
|
|
var _taskid = await _service.ExportEnqueueAsync("准时化出库服务"+input.BillNum, ExportExtentsion.Excel, input.Version, string.Empty, CurrentUser, typeof(FisOutputService), customConditionList, (rs) => |
|
@ -526,13 +537,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
// " @type = 0,\n" +
|
|
|
// " @type = 0,\n" +
|
|
|
// " @date = N'{1}'\n"+
|
|
|
// " @date = N'{1}'\n"+
|
|
|
// "SELECT 'Return Value' = @return_value";
|
|
|
// "SELECT 'Return Value' = @return_value";
|
|
|
// await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
|
|
|
// await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
|
|
|
// string.Format(sql,input.BillNum,input.AccountDate.ToShortDateString())
|
|
|
// string.Format(sql,input.BillNum,input.AccountDate.ToShortDateString())
|
|
|
// );
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -715,4 +722,4 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|