edy 3 лет назад
Родитель
Сommit
e37d5c84e1
18 измененных файлов: 236 добавлений и 55 удалений
  1. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaMainController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs
  3. +35
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js
  5. +17
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs
  6. +23
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
  7. +18
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js
  8. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
  9. +14
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
  10. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs
  11. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs
  12. +14
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs
  13. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectBLL.cs
  14. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectIBLL.cs
  15. +27
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectService.cs
  16. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs
  17. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs
  18. +26
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaMainController.cs Просмотреть файл

@@ -16,6 +16,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
public class FormulaMainController : MvcControllerBase
{
private FormulaMainIBLL formulaMainIBLL = new FormulaMainBLL();
private CalculateProjectIBLL calculateProjectIBLL = new CalculateProjectBLL();

#region 视图功能

@@ -100,6 +101,18 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
return Success(list);
}
/// <summary>
/// 获取所有计算项目
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCalProject()
{
var list = calculateProjectIBLL.GetListForDataSource();

return Success(list);
}
#endregion



+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs Просмотреть файл

@@ -71,9 +71,9 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
public ActionResult GetTree(string queryJson)
{
var data = fillinFromIBLL.GetTree();
var data = fillinFromIBLL.GetTree(queryJson);
return Success(data);
}
/// <summary>


+ 35
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js Просмотреть файл

@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/GetFormChildList?keyValue=' + keyValue, function (data) {
$('#content1').html('');
var html = '';
if (data) {
if (data && data.length > 0) {
for (var i = 0; i < data.length; i++) {
var id = learun.newGuid();
var html = '';
@@ -76,10 +76,12 @@ var bootstrap = function ($, learun) {
html += '</div>';

$('#content1').append(html);
$('#pro' + id).lrDataSourceSelect({
code: 'CalculateProject',
value: 'id',
text: 'name',
$('#pro' + id).lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetCalProject',
param: { strWhere: "1=1 " },
value: "id",
text: "name",
select:
function (item) {
if (item) {
@@ -121,10 +123,13 @@ var bootstrap = function ($, learun) {
html += '</div>';
html += '</div>';
$('#content1').append(html);
$('#pro' + id).lrDataSourceSelect({
code: 'CalculateProject',
value: 'id',
text: 'name',

$('#pro' + id).lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetCalProject',
param: { strWhere: "1=1 " },
value: "id",
text: "name",
select:
function (item) {
if (item) {
@@ -141,6 +146,27 @@ var bootstrap = function ($, learun) {
}
}
});

//$('#pro' + id).lrDataSourceSelect({
// code: 'CalculateProject',
// value: 'id',
// text: 'name',
// select:
// function (item) {
// if (item) {
// var id = $(this).attr('id');
// var parId = id.replace('pro', '');
// if (arr.indexOf(parId) != -1) {
// //如果存在删除
// removeByValue(arr, 'iid', parId);
// }
// arr.push({ iid: parId, ProjectId: item.id, ProjectName: item.name, Sort: $('#Sort' + parId).val() });

// arr.sort(sortBy("Sort"));
// page.refreshRes();
// }
// }
//});
},
refreshRes: function () {
//页面显示公式结果


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js Просмотреть файл

@@ -185,7 +185,7 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.FillInFromId = FillInFromId;
param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
//param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 17
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs Просмотреть файл

@@ -47,7 +47,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
return View();
}
#endregion

#region 获取数据
@@ -73,17 +73,17 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
};
return Success(jsonData);
}/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson)
public ActionResult GetList(string queryJson)
{
var data = projectDataManageIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
@@ -131,14 +131,13 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
ProjectDataManageEntity entity = strEntity.ToObject<ProjectDataManageEntity>();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = LoginUserInfo.Get().userId;
projectDataManageIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// 上传项目资料
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
@@ -149,15 +148,20 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult SaveData(string keyValue, string strEntity)
{
ProjectDataManageEntity pentity = strEntity.ToObject<ProjectDataManageEntity>();
var entity= projectDataManageIBLL.GetProjectDataManageEntity(keyValue);
var entity = projectDataManageIBLL.GetProjectDataManageEntity(keyValue);
entity.Files = pentity.Files;
entity.Name = pentity.Name;
entity.Remark = pentity.Remark;
if (!string.IsNullOrEmpty(entity.Files))
{
entity.FileTime = DateTime.Now;
entity.FileStatus = 1;
}
projectDataManageIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}
#endregion

}


+ 23
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js Просмотреть файл

@@ -5,6 +5,7 @@
* 描 述:项目资料管理
*/
var refreshGirdData;
var acceptClick;
var PPId;
var PId = request("PId");//项目Id
var type = request("type");//type==2,上传项目资料
@@ -72,6 +73,13 @@ var bootstrap = function ($, learun) {
});
}
});
if (type == 2) {
$('#lr_add').hide();
//$('#lr_edit').html('<i class="fa fa-pencil-square-o"></i>&nbsp;上传');
} else {
$('#lr_add').show();
//$('#lr_edit').html('<i class="fa fa-pencil-square-o"></i>&nbsp;编辑');
}
},
inittree: function () {
// 初始化左侧树形数据
@@ -87,7 +95,7 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetPageList',
headData: [
{ label: "项目资料名称", name: "Name", width: 200, align: "left" },
@@ -115,7 +123,13 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "时间", name: "CreateTime", width: 130, align: "left" },
{
label: "是否上传", name: "FileStatus", width: 130, align: "left",
formatter: function (value) {
return value == '1' ? '<span class=\"label label-success\">是</span>' : '<span class=\"label label-warning\">否</span>';
}
},
{ label: "上传时间", name: "FileTime", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
@@ -134,5 +148,12 @@ var bootstrap = function ($, learun) {
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
// 保存数据
acceptClick = function (callBack) {
if (!!callBack) {
callBack();
}
learun.layerClose(window.name);
};
page.init();
}

+ 18
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js Просмотреть файл

@@ -35,7 +35,10 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Index?PId=' + keyValue + '&type=2',
width: 1000,
height: 800,
btn: null
btn: ['确定'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
@@ -86,9 +89,13 @@ var bootstrap = function ($, learun) {
{
label: "项目状态", name: "Status", width: 100, align: "left",
formatter: function (value) {
return value == 0
? '<span class=\"label label-warning\">草稿</span>'
: '<span class=\"label label-success\">完成</span>';
if (value == 0) {
return '<span class=\"label label-default\">草稿</span>';
} else if (value == 1) {
return '<span class=\"label label-warning\">进行中</span>';
} else if (value == 2) {
return '<span class=\"label label-success\">完成</span>';
}
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
@@ -138,7 +145,13 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "时间", name: "CreateTime", width: 130, align: "left" },
{
label: "是否上传", name: "FileStatus", width: 130, align: "left",
formatter: function (value) {
return value == '1' ? '<span class=\"label label-success\">是</span>' : '<span class=\"label label-warning\">否</span>';
}
},
{ label: "上传时间", name: "FileTime", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml Просмотреть файл

@@ -42,7 +42,7 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;项目上报</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>


+ 14
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js Просмотреть файл

@@ -170,9 +170,13 @@ var bootstrap = function ($, learun) {
{
label: "项目状态", name: "Status", width: 100, align: "left",
formatter: function (value) {
return value == 0
? '<span class=\"label label-warning\">草稿</span>'
: '<span class=\"label label-success\">完成</span>';
if (value == 0) {
return '<span class=\"label label-default\">草稿</span>';
} else if (value == 1) {
return '<span class=\"label label-warning\">进行中</span>';
} else if (value == 2) {
return '<span class=\"label label-success\">完成</span>';
}
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
@@ -222,7 +226,13 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "时间", name: "CreateTime", width: 130, align: "left" },
{
label: "是否上传", name: "FileStatus", width: 130, align: "left",
formatter: function (value) {
return value == '1' ? '<span class=\"label label-success\">是</span>' : '<span class=\"label label-warning\">否</span>';
}
},
{ label: "上传时间", name: "FileTime", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs Просмотреть файл

@@ -96,12 +96,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 获取树形数据
/// </summary>
/// <returns></returns>
public IEnumerable<TreeModel> GetTree()
public IEnumerable<TreeModel> GetTree(string queryJson)
{
try
{
List<TreeModel> treeList = new List<TreeModel>();
var list = fillinFromService.GetSqlTree();
var list = fillinFromService.GetSqlTree(queryJson);
foreach (var item in list)
{
TreeModel node = new TreeModel


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs Просмотреть файл

@@ -48,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 获取树形数据
/// </summary>
/// <returns></returns>
IEnumerable<TreeModel> GetTree();
IEnumerable<TreeModel> GetTree(string queryJson);
#endregion

#region 提交数据


+ 14
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs Просмотреть файл

@@ -218,11 +218,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
/// </summary>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetSqlTree()
public IEnumerable<FillinFromEntity> GetSqlTree(string queryJson)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(x => x.IsFlag == 0 && x.State == 2);
var strSql = new StringBuilder("select t.* FROM FillinFrom t where IsFlag=0 ");
var queryParam = queryJson.ToJObject();
if (!queryParam["FillingDept"].IsEmpty())
{
strSql.Append($" AND t.FillingDept='{queryParam["FillingDept"].ToString()}'");
}
if (!queryParam["FillingPeople"].IsEmpty())
{
strSql.Append($" AND t.FillingPeople='{queryParam["FillingPeople"].ToString()}'");
}

strSql.Append($" and (t.[State]=2 or t.[State]=3 )");
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(strSql.ToString());
}
catch (Exception ex)
{


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectBLL.cs Просмотреть файл

@@ -67,6 +67,26 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}


public DataTable GetListForDataSource()
{
try
{
return calculateProjectService.GetListForDataSource();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectIBLL.cs Просмотреть файл

@@ -27,6 +27,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <returns></returns>
CalculateProjectEntity GetCalculateProjectEntity(string keyValue);
/// <summary>
///
/// </summary>
/// <returns></returns>
DataTable GetListForDataSource();
#endregion

#region 提交数据


+ 27
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectService.cs Просмотреть файл

@@ -50,10 +50,10 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
if (!queryParam["Type"].IsEmpty())
{
dp.Add("Type",queryParam["Type"].ToString(), DbType.String);
dp.Add("Type", queryParam["Type"].ToString(), DbType.String);
strSql.Append(" AND t.Type = @Type ");
}
return this.BaseRepository("CollegeMIS").FindList<CalculateProjectEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<CalculateProjectEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -92,6 +92,30 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
///
/// </summary>
/// <returns></returns>
public DataTable GetListForDataSource()
{
try
{
string sql = $"select Id,Name from CalculateProject where IsEnable=1 ";
return this.BaseRepository("CollegeMIS").FindTable(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据
@@ -104,7 +128,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
try
{
this.BaseRepository("CollegeMIS").Delete<CalculateProjectEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<CalculateProjectEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs Просмотреть файл

@@ -46,6 +46,10 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
strSql.Append($" AND a.CreateUserId='{queryParam["CreateUserId"].ToString()}' ");
}
if (!queryParam["FillingDept"].IsEmpty())
{
strSql.Append($" AND b.FillingDept='{queryParam["FillingDept"].ToString()}' ");
}

return this.BaseRepository("CollegeMIS").FindList<QualityReportMainEntity>(strSql.ToString(), dp, pagination);
}


+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs Просмотреть файл

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// 日 期:2021-06-21 15:49
/// 描 述:项目资料管理
/// </summary>
public class ProjectDataManageEntity
public class ProjectDataManageEntity
{
#region 实体成员
/// <summary>
@@ -64,6 +64,17 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// </summary>
[Column("FILES")]
public string Files { get; set; }
/// <summary>
/// 资料文件编辑时间
/// </summary>
[Column("FILETIME")]
public DateTime? FileTime { get; set; }
/// <summary>
/// 上传状态
/// </summary>
[Column("FILESTATUS")]
public int? FileStatus { get; set; }

#endregion

#region 扩展操作
@@ -75,6 +86,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
this.Id = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
this.FileStatus = 0;
}
/// <summary>
/// 编辑调用


+ 26
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs Просмотреть файл

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
@@ -43,17 +44,17 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
if (!queryParam["DepartmentId"].IsEmpty())
{
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId ");
}
if (!queryParam["ManagerId"].IsEmpty())
{
dp.Add("ManagerId",queryParam["ManagerId"].ToString(), DbType.String);
dp.Add("ManagerId", queryParam["ManagerId"].ToString(), DbType.String);
strSql.Append(" AND t.ManagerId = @ManagerId ");
}
if (!queryParam["PId"].IsEmpty())
{
dp.Add("PId",queryParam["PId"].ToString(), DbType.String);
dp.Add("PId", queryParam["PId"].ToString(), DbType.String);
strSql.Append(" AND t.PId = @PId ");
}
if (!queryParam["PPId"].IsEmpty())
@@ -61,7 +62,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
dp.Add("PPId", queryParam["PPId"].ToString(), DbType.String);
strSql.Append(" AND t.PPId = @PPId ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectDataManageEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<ProjectDataManageEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -75,7 +76,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
@@ -154,7 +155,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}
#endregion

#region 提交数据
@@ -167,7 +168,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<ProjectDataManageEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<ProjectDataManageEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -189,21 +190,37 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, ProjectDataManageEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
db.Update(entity);
if (!string.IsNullOrEmpty(entity.Files))
{
//判断当前项目各阶段是否已全部上传
var list = db.FindList<ProjectDataManageEntity>(x => x.PId == entity.PId && !string.IsNullOrEmpty(x.Files) && x.Id != keyValue);
if (list.Count() <= 0)
{
//如果全部已上传,将项目状态改为已完成
var projectManageEntity = db.FindEntity<ProjectManageEntity>(x => x.Id == entity.PId);
projectManageEntity.Status = "2";
db.Update(projectManageEntity);
}
}

}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
db.Insert(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


Загрузка…
Отмена
Сохранить