Browse Source

Merge branch '黑龙江艺术高中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 黑龙江艺术高中职

黑艺新账号
hwh2023 1 year ago
parent
commit
d206636acd
2 changed files with 19 additions and 23 deletions
  1. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs
  2. +16
    -23
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs View File

@@ -504,6 +504,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
try
{
if (string.IsNullOrWhiteSpace(entity.ADYear)) entity.ADYear = entity.ADTime.Value.Year.ToString();
if (string.IsNullOrWhiteSpace(entity.ADMonth)) entity.ADMonth = entity.ADTime.Value.Month.ToString();
if (string.IsNullOrWhiteSpace(entity.ADDay)) entity.ADDay = entity.ADTime.Value.Day.ToString().PadLeft(2,'0');
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);


+ 16
- 23
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs View File

@@ -106,18 +106,21 @@ namespace Learun.Application.WorkFlow
{
try
{
var expression = LinqExtensions.True<NWFProcessEntity>();
var strSql = new StringBuilder();
strSql.Append("select p.*,u.F_DepartmentId from LR_NWF_Process p ");
strSql.Append("left join LR_Base_User u on p.F_CreateUserId=u.F_UserId ");
strSql.Append("where 1=1 ");
var queryParam = queryJson.ToJObject();
// 分类
if (!queryParam["categoryId"].IsEmpty()) // 1:未完成 2:已完成
{
if (queryParam["categoryId"].ToString() == "1")
{
expression = expression.And(t => t.F_IsFinished == 0);
strSql.Append("and p.F_IsFinished=0 ");
}
else
{
expression = expression.And(t => t.F_IsFinished == 1);
strSql.Append("and p.F_IsFinished=1 ");
}
}
//流程类别
@@ -128,7 +131,7 @@ namespace Learun.Application.WorkFlow

if (codeList.Count() > 0)
{
expression = expression.And(a => codeList.Contains(a.F_SchemeCode));
strSql.Append($"and p.F_SchemeCode in ('{String.Join("','", codeList.ToArray())}') ");
}
}
// 操作时间
@@ -136,13 +139,13 @@ namespace Learun.Application.WorkFlow
{
DateTime startTime = queryParam["StartTime"].ToDate();
DateTime endTime = queryParam["EndTime"].ToDate();
expression = expression.And(t => t.F_CreateDate >= startTime && t.F_CreateDate <= endTime);
strSql.Append($"and p.F_CreateDate>='{startTime}' and p.F_CreateDate<='{endTime}' ");
}
// 关键字
if (!queryParam["keyword"].IsEmpty())
{
string keyword = queryParam["keyword"].ToString();
expression = expression.And(t => t.F_Title.Contains(keyword) || t.F_SchemeName.Contains(keyword) || t.F_CreateUserName.Contains(keyword));
strSql.Append($"and (p.F_Title like '%{keyword}%' or p.F_SchemeName like '%{keyword}%' or p.F_CreateUserName like '%{keyword}%' ) ");
}
// 状态
if (!queryParam["F_EnabledMark"].IsEmpty()) // 1:未完成 2:已完成
@@ -150,35 +153,25 @@ namespace Learun.Application.WorkFlow
if (queryParam["F_EnabledMark"].ToString() == "1")
{
//运行中
expression = expression.And(t => t.F_EnabledMark == 1);
strSql.Append("and p.F_EnabledMark=1 ");
}
else if (queryParam["F_EnabledMark"].ToString() == "2")
{
//作废
expression = expression.And(t => t.F_EnabledMark != 1);
strSql.Append("and p.F_EnabledMark<>1 ");
}
else if (queryParam["F_EnabledMark"].ToString() == "3")
{
//结束 已完成
expression = expression.And(t => t.F_IsFinished == 1);
strSql.Append("and p.F_IsFinished=1 ");
}
}
expression = expression.And(t => t.F_EnabledMark != 2);
strSql.Append("and p.F_EnabledMark<>2 ");
////20221125增加作废不显示liang
//expression = expression.And(t => t.F_EnabledMark != 3);
expression = expression.And(t => t.F_IsChild == 0);
//expression = expression.And(t => p.F_EnabledMark != 3);
strSql.Append("and p.F_IsChild=0 ");

var result = this.BaseRepository().FindList<NWFProcessEntity>(expression, pagination);
if (result.Count() > 0)
{
foreach (var item in result)
{
if (!string.IsNullOrEmpty(item.F_CreateUserName))
{
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId;
}
}
}
var result = this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), pagination);

return result;
}


Loading…
Cancel
Save