|
|
|
|
@@ -14,6 +14,7 @@ namespace Appointment.Repository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 江南春模式
|
|
|
|
|
/// 2025-05-12 现在使用的审核流程模式
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ApptRepoJNC : DbContext, IApptRepoJNC
|
|
|
|
|
{
|
|
|
|
|
@@ -1167,9 +1168,9 @@ namespace Appointment.Repository
|
|
|
|
|
{
|
|
|
|
|
DateTime now = DateTime.Now;
|
|
|
|
|
req = req.Replace();
|
|
|
|
|
if (req.RemarkPics != null && req.RemarkPics.Count > 5)
|
|
|
|
|
if (req.RemarkPics != null && req.RemarkPics.Count > 10)
|
|
|
|
|
{
|
|
|
|
|
return ApiResult.Failed("操作失败,最多只可上传5张图片!");
|
|
|
|
|
return ApiResult.Failed("操作失败,最多只可上传10张图片!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var loginUserRes = BaseRepo.DECLoginInfo(req.AccountDes);
|
|
|
|
|
@@ -1217,6 +1218,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
|
|
|
|
|
@@ -1270,6 +1276,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
}
|
|
|
|
|
@@ -1320,6 +1331,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
|
|
|
|
|
@@ -1424,14 +1440,26 @@ namespace Appointment.Repository
|
|
|
|
|
DateTime now = DateTime.Now;
|
|
|
|
|
if (JncAuditor.Length != 5) return ApiResult.Failed("审核配置无效!");
|
|
|
|
|
|
|
|
|
|
var loginUserRes = BaseRepo.DECLoginInfo(req.AccountDes);
|
|
|
|
|
if (!loginUserRes.IsSuccess) return ApiResult.Failed(loginUserRes.Msg);
|
|
|
|
|
ApiResult<LoginUserRes> loginUserRes = null;
|
|
|
|
|
if (req.AccountDes == "@@@自动@@@") // 2025-05-14 总经理审核通过后,自动完成发起人的 生成完成单操作流程
|
|
|
|
|
{
|
|
|
|
|
loginUserRes = ApiResult<LoginUserRes>.Success();
|
|
|
|
|
loginUserRes.Info = new LoginUserRes
|
|
|
|
|
{
|
|
|
|
|
UserAccount = "自动"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
loginUserRes = BaseRepo.DECLoginInfo(req.AccountDes);
|
|
|
|
|
if (!loginUserRes.IsSuccess) return ApiResult.Failed(loginUserRes.Msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断权限
|
|
|
|
|
EnumAuditorJncStatus nextStatus = EnumAuditorJncStatus.全部;
|
|
|
|
|
string descript = "";
|
|
|
|
|
switch ((EnumAuditorJncStatus)summaryM.AuditorStatus)
|
|
|
|
|
EnumAuditorJncStatus nextStatus = EnumAuditorJncStatus.全部;// 下一级审核枚举
|
|
|
|
|
string descript = "";// 下一级审核角色名称
|
|
|
|
|
switch ((EnumAuditorJncStatus)summaryM.AuditorStatus) // 本次审批前的订单状态
|
|
|
|
|
{
|
|
|
|
|
case EnumAuditorJncStatus.审核单预定部:
|
|
|
|
|
descript = JncAuditor[1];
|
|
|
|
|
@@ -1450,10 +1478,10 @@ namespace Appointment.Repository
|
|
|
|
|
nextStatus = EnumAuditorJncStatus.确定单;
|
|
|
|
|
break;
|
|
|
|
|
case EnumAuditorJncStatus.确定单:
|
|
|
|
|
if (summaryM.UserId != loginUserRes.Info.UserAccount)
|
|
|
|
|
{
|
|
|
|
|
return ApiResult.Failed("没有操作权限!");
|
|
|
|
|
}
|
|
|
|
|
//if (summaryM.UserId != loginUserRes.Info.UserAccount) // 2025-05-14 屏蔽
|
|
|
|
|
//{
|
|
|
|
|
// return ApiResult.Failed("没有操作权限!");
|
|
|
|
|
//}
|
|
|
|
|
descript = "本人";
|
|
|
|
|
nextStatus = EnumAuditorJncStatus.完成单;
|
|
|
|
|
break;
|
|
|
|
|
@@ -1494,6 +1522,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
|
|
|
|
|
@@ -1503,6 +1536,19 @@ namespace Appointment.Repository
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PostMsg(summaryM);
|
|
|
|
|
|
|
|
|
|
//2025-05-14 确定单(总经理审核通过)后 直接变成完成单(销售员已确定完成,已群发,自动抄送) 省去 销售员再次 确定
|
|
|
|
|
if (nextStatus == EnumAuditorJncStatus.确定单)
|
|
|
|
|
{
|
|
|
|
|
AuditorSummary(new ApplyOrderReq
|
|
|
|
|
{
|
|
|
|
|
AccountDes = "@@@自动@@@",
|
|
|
|
|
Id = summaryM.Id.Value,
|
|
|
|
|
Remark = null,
|
|
|
|
|
RemarkPics = new List<string>()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ApiResult.Success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1582,6 +1628,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var inRe = InsertReturnId(apptAuditLog);
|
|
|
|
|
@@ -1676,12 +1727,6 @@ namespace Appointment.Repository
|
|
|
|
|
|
|
|
|
|
AuditorStatus = 0,
|
|
|
|
|
Remark = req.Remark,
|
|
|
|
|
Pic0 = null,
|
|
|
|
|
Pic1 = null,
|
|
|
|
|
Pic2 = null,
|
|
|
|
|
|
|
|
|
|
Pic3 = null,
|
|
|
|
|
Pic4 = null,
|
|
|
|
|
Source = null,
|
|
|
|
|
PId = req.Id,
|
|
|
|
|
};
|
|
|
|
|
@@ -1692,6 +1737,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.PicList.Count > 2) apptAuditLog.Pic2 = req.PicList[2];
|
|
|
|
|
if (req.PicList.Count > 3) apptAuditLog.Pic3 = req.PicList[3];
|
|
|
|
|
if (req.PicList.Count > 4) apptAuditLog.Pic4 = req.PicList[4];
|
|
|
|
|
//if (req.PicList.Count > 5) apptAuditLog.Pic5 = req.PicList[5];
|
|
|
|
|
//if (req.PicList.Count > 6) apptAuditLog.Pic6 = req.PicList[6];
|
|
|
|
|
//if (req.PicList.Count > 7) apptAuditLog.Pic7 = req.PicList[7];
|
|
|
|
|
//if (req.PicList.Count > 8) apptAuditLog.Pic8 = req.PicList[8];
|
|
|
|
|
//if (req.PicList.Count > 9) apptAuditLog.Pic9 = req.PicList[9];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var inRe = InsertReturnId(apptAuditLog);
|
|
|
|
|
@@ -2070,6 +2120,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic2)) picList.Add(item.Pic2);
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic3)) picList.Add(item.Pic3);
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic4)) picList.Add(item.Pic4);
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic5)) picList.Add(item.Pic5);
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic6)) picList.Add(item.Pic6);
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic7)) picList.Add(item.Pic7);
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic8)) picList.Add(item.Pic8);
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic9)) picList.Add(item.Pic9);
|
|
|
|
|
|
|
|
|
|
// 组装回复贪睡
|
|
|
|
|
List<ReplyResp> replyList = GetReplyList(userL, item.Id);
|
|
|
|
|
@@ -3013,6 +3068,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (!string.IsNullOrEmpty(apptAuditLogM.Pic2)) list.Add(apptAuditLogM.Pic2);
|
|
|
|
|
if (!string.IsNullOrEmpty(apptAuditLogM.Pic3)) list.Add(apptAuditLogM.Pic3);
|
|
|
|
|
if (!string.IsNullOrEmpty(apptAuditLogM.Pic4)) list.Add(apptAuditLogM.Pic4);
|
|
|
|
|
//if (!string.IsNullOrEmpty(apptAuditLogM.Pic5)) list.Add(apptAuditLogM.Pic5);
|
|
|
|
|
//if (!string.IsNullOrEmpty(apptAuditLogM.Pic6)) list.Add(apptAuditLogM.Pic6);
|
|
|
|
|
//if (!string.IsNullOrEmpty(apptAuditLogM.Pic7)) list.Add(apptAuditLogM.Pic7);
|
|
|
|
|
//if (!string.IsNullOrEmpty(apptAuditLogM.Pic8)) list.Add(apptAuditLogM.Pic8);
|
|
|
|
|
//if (!string.IsNullOrEmpty(apptAuditLogM.Pic9)) list.Add(apptAuditLogM.Pic9);
|
|
|
|
|
|
|
|
|
|
return ApiResult<List<string>>.Success(info: list);
|
|
|
|
|
}
|
|
|
|
|
@@ -3304,6 +3364,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
|
|
|
|
|
@@ -3520,6 +3585,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (req.RemarkPics.Count > 2) apptAuditLog.Pic2 = req.RemarkPics[2];
|
|
|
|
|
if (req.RemarkPics.Count > 3) apptAuditLog.Pic3 = req.RemarkPics[3];
|
|
|
|
|
if (req.RemarkPics.Count > 4) apptAuditLog.Pic4 = req.RemarkPics[4];
|
|
|
|
|
//if (req.RemarkPics.Count > 5) apptAuditLog.Pic5 = req.RemarkPics[5];
|
|
|
|
|
//if (req.RemarkPics.Count > 6) apptAuditLog.Pic6 = req.RemarkPics[6];
|
|
|
|
|
//if (req.RemarkPics.Count > 7) apptAuditLog.Pic7 = req.RemarkPics[7];
|
|
|
|
|
//if (req.RemarkPics.Count > 8) apptAuditLog.Pic8 = req.RemarkPics[8];
|
|
|
|
|
//if (req.RemarkPics.Count > 9) apptAuditLog.Pic9 = req.RemarkPics[9];
|
|
|
|
|
}
|
|
|
|
|
InsertReturnId(apptAuditLog);
|
|
|
|
|
|
|
|
|
|
@@ -4483,6 +4553,11 @@ namespace Appointment.Repository
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic2)) picNum += 1;
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic3)) picNum += 1;
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Pic4)) picNum += 1;
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic5)) picNum += 1;
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic6)) picNum += 1;
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic7)) picNum += 1;
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic8)) picNum += 1;
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.Pic9)) picNum += 1;
|
|
|
|
|
|
|
|
|
|
list.Add(new ReplyResp()
|
|
|
|
|
{
|
|
|
|
|
|