From 557c2711a3e103ebc3d0492344eca9730d5e92b2 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期一, 17 二月 2025 10:47:47 +0800
Subject: [PATCH] 增加司机配送单超时处理任务,防止一直不停手机定位信息,
---
CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs b/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs
index 57497e6..1523bf6 100644
--- a/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs
+++ b/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs
@@ -23,6 +23,7 @@
using CoreCms.Net.Model.Entities.baifenbingfa.Promote.OffLineDistributor;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
+using NPOI.POIFS.Macros;
using SqlSugar;
@@ -66,6 +67,15 @@
/// <returns></returns>
public async Task<AdminUiCallBack> UserInsertAsync(OfflineDistributor entity)
{
+ var b= await _unitOfWork.GetDbClient().Queryable<OfflineDistributor>().Where(x=>x.CollectionTime==entity.CollectionTime&&x.DealerName==entity.DealerName&&x.Adder==entity.Adder).CountAsync();
+ if(b>0)
+ return new AdminUiCallBack()
+ {
+ code = 1,
+ msg = "璇峰嬁閲嶅鎻愪氦鏁版嵁"
+
+ };
+
entity.createTime = DateTime.Now;
entity.createBy = $"{_contextUser.Name}";
var bol = await _unitOfWork.GetDbClient().InsertNav(entity).Include(x => x.meetings).ExecuteCommandAsync();
@@ -141,7 +151,7 @@
oldmod.Adder = entity.Adder;
oldmod.ContactPerson = entity.ContactPerson;
oldmod.Category = entity.Category;
-
+ oldmod.CooperationIntent = entity.CooperationIntent;
oldmod.School = entity.School;
var oldMeetings = await db.Queryable<OfflineDistributorMeeting>().Where(x => x.OfflineDistributorID == oldmod.Id).OrderBy(x => x.id).ToListAsync();
var oldIntentions = await db.Queryable<OfflineDistributorOder>().Where(x => x.OfflineDistributorID == oldmod.Id).OrderBy(x => x.Id).ToListAsync();
@@ -168,7 +178,7 @@
}
oldmod.Oders = entity.Oders;
- foreach (var meetin in entity.meetings)
+ foreach (OfflineDistributorMeeting meetin in entity.meetings)
{
if (meetin.id == 9999999)
{
--
Gitblit v1.9.1