Bladeren bron

内控指标项管理功能

master
zhangli 3 jaren geleden
bovenliggende
commit
cbff471988
68 gewijzigde bestanden met toevoegingen van 7641 en 0 verwijderingen
  1. +295
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs
  2. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.cshtml
  3. +99
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js
  4. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml
  5. +228
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js
  6. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.cshtml
  7. +116
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js
  8. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml
  9. +317
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js
  10. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/CalculateProjectController.cs
  11. +124
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaChildController.cs
  12. +166
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaMainController.cs
  13. +215
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs
  14. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Form.cshtml
  15. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Form.js
  16. +41
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.cshtml
  17. +110
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.js
  18. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Form.cshtml
  19. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Form.js
  20. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Index.cshtml
  21. +136
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Index.js
  22. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Form.cshtml
  23. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Form.js
  24. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.cshtml
  25. +217
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js
  26. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.cshtml
  27. +118
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js
  28. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.cshtml
  29. +104
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js
  30. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.cshtml
  31. +106
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.js
  32. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml
  33. +228
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js
  34. +83
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml
  35. +196
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js
  36. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  37. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/FillinFromMap.cs
  38. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/CalculateProjectMap.cs
  39. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/FormulaChildMap.cs
  40. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/FormulaMainMap.cs
  41. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/QualityReportChildMap.cs
  42. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/QualityReportMainMap.cs
  43. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  44. +214
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs
  45. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromEntity.cs
  46. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs
  47. +342
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs
  48. +145
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectBLL.cs
  49. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectEntity.cs
  50. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectIBLL.cs
  51. +182
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectService.cs
  52. +191
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildBLL.cs
  53. +85
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildEntity.cs
  54. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildIBLL.cs
  55. +217
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildService.cs
  56. +176
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainBLL.cs
  57. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainEntity.cs
  58. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainIBLL.cs
  59. +218
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainService.cs
  60. +216
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs
  61. +76
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildEntity.cs
  62. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildIBLL.cs
  63. +428
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs
  64. +218
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs
  65. +104
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainEntity.cs
  66. +64
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs
  67. +281
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs
  68. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 295
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs Bestand weergeven

@@ -0,0 +1,295 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromController : MvcControllerBase
{
private FillinFromIBLL fillinFromIBLL = new FillinFromBLL();
private DepartmentBLL departmentIBLL = new DepartmentBLL();
private QualityReportMainIBLL qualityReportMainIBLL = new QualityReportMainBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
var logininfo = LoginUserInfo.Get();
ViewBag.isSystem = logininfo.isSystem;
ViewBag.departmentId = "";
var Model = departmentIBLL.GetEntity(logininfo.companyId, logininfo.departmentId);
if (Model.F_Manager == logininfo.realName)
{
ViewBag.departmentId = logininfo.departmentId;
}
return View();
}
/// <summary>
///
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormIndex()
{
var logininfo = LoginUserInfo.Get();
ViewBag.isSystem = logininfo.isSystem;
ViewBag.departmentId = "";
var Model = departmentIBLL.GetEntity(logininfo.companyId, logininfo.departmentId);
if (Model.F_Manager == logininfo.realName)
{
ViewBag.departmentId = logininfo.departmentId;
}
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 设置填报人
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormPeople()
{
return View();
}

#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = fillinFromIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FillinFromData = fillinFromIBLL.GetFillinFromEntity(keyValue);
if (FillinFromData.FillingCycle == "2")
{
FillinFromData.FillingTime2 = FillinFromData.FillingTime;
}
else
{
FillinFromData.FillingTime1 = FillinFromData.FillingTime;
}
var jsonData = new
{
FillinFrom = FillinFromData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
{
Model.State = -1;
qualityReportMainIBLL.DelProjectByFId(keyValue);
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("作废成功!");
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
FillinFromEntity entity = strEntity.ToObject<FillinFromEntity>();
if (!string.IsNullOrEmpty(keyValue))
{
#region 修改状态
if (entity.State == 1)
{
entity.State = 2;
}
#endregion
qualityReportMainIBLL.EditProjectByFId(keyValue);

}
#region 处理填报日期

if (entity.FillingCycle == "1")
{
entity.FillingTime = "";
}
else if (entity.FillingCycle == "2")
{
entity.FillingTime = entity.FillingTime2;
}
else if (entity.FillingCycle == "3")
{
entity.FillingTime = entity.FillingTime1;
}
#endregion

fillinFromIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 扩展数据

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Submit(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
{
//重新填写
Model.State = 1;
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("保存成功!");
}

/// <summary>
/// 隐藏/显示
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult HideList(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
{
if (Model.IsFlag == 0)
{
Model.IsFlag = 1;
}
else
{
Model.IsFlag = 0;
}
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("保存成功!");
}

/// <summary>
/// 撤回
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoCanCel(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
{
//重新填写
Model.State = 0;
Model.FillingPeople = "";
}
qualityReportMainIBLL.EditProjectByFId(keyValue);
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("保存成功!");
}

/// <summary>
/// 归档
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
public ActionResult IsFile(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
{
var ModeList = qualityReportMainIBLL.IsFinish(keyValue);
if (ModeList != null)
{
if (ModeList.Status == 1)
{
Model.State = 3;
}
else
{
return Success("归档失败!");
}
}
else
{
return Success("归档失败!");
}
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("归档成功!");
}
#endregion
}
}

+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.cshtml Bestand weergeven

@@ -0,0 +1,56 @@
@{
ViewBag.Title = "质量目标管理体系指标模块";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">工作模块<font face="宋体">*</font></div>
<input id="WorderModule" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div>
<input id="ProjectName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">序&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号<font face="宋体">*</font></div>
<input id="SerialNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报部门<font face="宋体">*</font></div>
<div id="FillingDept" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报周期<font face="宋体">*</font></div>
<div id="FillingCycle" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom" id="TimeHide">
<div class="lr-form-item-title">填报时间</div>
<div id="FillingTime1"></div>
<div id="FillingTime2"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;式<font face="宋体">*</font></div>
<div id="Formula" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</div>
<textarea id="Demo" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="State" type="text" class="form-control" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">当前用户</div>
<input id="lrPeople" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">当前时间</div>
<input id="lrTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">隐藏/显示</div>
<input id="IsFlag" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/Form.js")

+ 99
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js Bestand weergeven

@@ -0,0 +1,99 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#Formula').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' });
$('#Formula').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain',
selectWord: 'name',
value: 'id',
text: 'name',
headData:
[
{ label: "公式", name: "result", width: 300, align: "left" },
{ label: "公式名称", name: "name", width: 300, align: "left" }
],
select: function (item) {
}
});
$('#lrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#lrPeople').val(learun.clientdata.get(['userinfo']).realName);
$('#lrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#FillingCycle').lrDataItemSelect({
code: 'ThisCycle',
select: function (item) {
var Cycles = $("#FillingCycle").lrselectGet();
if (Cycles == 3) {
$('#TimeHide').show();
$('#FillingTime1').show();
$('#FillingTime2').hide();
$('#FillingTime1').lrDataItemSelect({
code: 'CycleTime'
});
} else if (Cycles == 2) {
$('#TimeHide').show();
$('#FillingTime1').hide();
$('#FillingTime2').show();
} else if (Cycles == 1) {
//$('#FillingTime1').hide();
//$('#FillingTime2').hide();
//$('#FillingTime1').lrDataItemSelect({ code: 'undefined' });
$('#TimeHide').hide();
}
}
});
$('#FillingTime1').lrselect();
$('#FillingTime2').lrDataItemSelect({
type: 'multiple',
code: 'CycleTime'
});
$('#FillingTime2').hide();
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
$('#State').val('0');
$('#IsFlag').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml Bestand weergeven

@@ -0,0 +1,46 @@
@{
ViewBag.Title = "质量目标管理体系指标模块";
Layout = "~/Views/Shared/_Index.cshtml";
}
<script type="text/javascript">
var isSystem = '@ViewBag.isSystem';
var departmentId= '@ViewBag.departmentId'
</script>
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">工作模块</div>
<input id="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报周期</div>
<div id="FillingCycle"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_people" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;设置填报人</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js")

+ 228
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js Bestand weergeven

@@ -0,0 +1,228 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' });
//$('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form',
width: 500,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项目已提交不能修改!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//撤回
$('#lr_cancel').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus == 1) {
learun.alert.warning("已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//设置填报人
$('#lr_people').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus !== 1) {
learun.alert.warning("当前项不能设置填报人!");
return false;
}
learun.layerForm({
id: 'form',
title: '设置填报人',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/FormPeople?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
////隐藏显示
//$('#lr_hide').on('click', function () {
// var keyValue = $('#gridtable').jfGridValue('Id');
// if (learun.checkrow(keyValue)) {
// var RStatus = $('#gridtable').jfGridValue('State');
// if (RStatus == 1) {
// learun.alert.warning("已提交!");
// return false;
// }
// learun.layerConfirm('是否确认提交该项!', function (res) {
// if (res) {
// learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
// refreshGirdData();
// });
// }
// });
// }
//});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "center" },
{ label: "序号", name: "SerialNo", width: 100, align: "center" },
{ label: "项目名称", name: "ProjectName", width: 300, align: "center" },
{
label: "填报周期", name: "FillingCycle", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ThisCycle',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "填报时间", name: "FillingTime", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'CycleTime',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "填报部门", name: "FillingDept", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报人", name: "FillingPeople", width: 150, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "状态", name: "State", width: 150, align: "center",
formatter: function (cellvalue) {
if (cellvalue === -1) {
return '<span class=\"label label-danger\">作废</span>';
} else if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">待设置填报人</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">待填报</span>';
} else if (cellvalue === 3) {
return '<span class=\"label label-default\">已完成<pan>';
}
}
},
{ label: "备注", name: "Demo", width: 300, align: "center" },
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.IsFlag = 0;
param.isSystem = isSystem;
param.departmentId = departmentId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.cshtml Bestand weergeven

@@ -0,0 +1,60 @@
@{
ViewBag.Title = "质量目标管理体系指标模块";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">工作模块<font face="宋体">*</font></div>
<input id="WorderModule" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div>
<input id="ProjectName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">序&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号<font face="宋体">*</font></div>
<input id="SerialNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报部门<font face="宋体">*</font></div>
<div id="FillingDept" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报周期<font face="宋体">*</font></div>
<div id="FillingCycle" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom" id="TimeHide">
<div class="lr-form-item-title">填报时间</div>
<div id="FillingTime1" readonly="readonly"></div>
<div id="FillingTime2" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填&nbsp;&nbsp;报&nbsp;&nbsp;人<font face="宋体">*</font></div>
<div id="FillingPeople" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;式<font face="宋体">*</font></div>
<div id="Formula" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</div>
<textarea id="Demo" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="State" type="text" class="form-control" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">当前用户</div>
<input id="lrPeople" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">当前时间</div>
<input id="lrTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-4 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">隐藏/撤下</div>
<input id="IsFlag" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js")

+ 116
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js Bestand weergeven

@@ -0,0 +1,116 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#Formula').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' });
//$('#Formula').lrGirdSelect({
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain',
// selectWord: 'name',
// value: 'id',
// text: 'name',
// headData:
// [
// { label: "公式", name: "result", width: 300, align: "left" },
// { label: "公式名称", name: "name", width: 300, align: "left" }
// ],
// select: function (item) {
// }
//});
$('#lrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#lrPeople').val(learun.clientdata.get(['userinfo']).realName);
$('#lrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#FillingDept').lrDataSourceSelect({
code: 'classdata',
value: 'id',
text: 'name',
select: function (item) {
var DeptCode = $('#FillingDept').lrselectGet();
if (DeptCode != null && DeptCode != "" && DeptCode != undefined) {
$('#FillingPeople').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=teacheruserdata',
value: 'f_userid',
text: 'f_realname',
param: { strWhere: " 1=1 and f_departmentid in ('" + DeptCode + "')" },
maxHeight: 200,
});
}
}
});
$("#FillingPeople").lrselect();
//设置周期
$('#FillingCycle').lrDataItemSelect({
code: 'ThisCycle',
select: function (item) {
var Cycles = $("#FillingCycle").lrselectGet();
if (Cycles == 3) {
$('#TimeHide').show();
$('#FillingTime1').show();
$('#FillingTime2').hide();
$('#FillingTime1').lrDataItemSelect({
code: 'CycleTime'
});
} else if (Cycles == 2) {
$('#TimeHide').show();
$('#FillingTime1').hide();
$('#FillingTime2').show();
} else if (Cycles == 1) {
$('#TimeHide').hide();
//$('#FillingTime1').hide();
//$('#FillingTime2').hide();
}
}
});
$('#FillingTime1').lrselect();
$('#FillingTime2').lrDataItemSelect({
type: 'multiple',
code: 'CycleTime'
});
$('#FillingTime2').hide();
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
$('#State').val('0');
$('#IsFlag').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml Bestand weergeven

@@ -0,0 +1,58 @@
@{
ViewBag.Title = "质量目标管理体系指标模块";
Layout = "~/Views/Shared/_Index.cshtml";
}
<script type="text/javascript">
var isSystem = '@ViewBag.isSystem';
var departmentId= '@ViewBag.departmentId'
</script>
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">工作模块</div>
<input id="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报周期</div>
<div id="FillingCycle"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_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>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;提交</a>
<a id="lr_file" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;归档</a>
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-reorder"></i>&nbsp;<span class="lrlt">更多</span><span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<li id="lr_cancel"><a><i></i>&nbsp;<span class="lrlt">撤回</span></a></li>
<li id="lr_people"><a><i></i>&nbsp;<span class="lrlt">设置填报人</span></a></li>
<li id="lr_hide"><a><i></i>&nbsp;<span class="lrlt">隐藏/显示</span></a></li>
</ul>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/Index.js")

+ 317
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js Bestand weergeven

@@ -0,0 +1,317 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' });
//$('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
var IsFlag = $('#gridtable').jfGridValue('IsFlag');
if (State >= 1) {
learun.alert.warning("当前项已提交,请勿重复提交!");
return false;
} else if (State == -1) {
learun.alert.warning("当前项已作废,不能提交!");
return false;
}
if (IsFlag == 1) {
learun.alert.warning("当前项已隐藏,不能提交!");
return false;
}
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/Submit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项不能修改!");
return;
}
learun.layerConfirm('是否确认修改该项,修改成后会影响数据!', function (res) {
if (res) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
learun.layerConfirm('确定要修改当前项吗!', function (res) {
if (res) {
return top[id].acceptClick(refreshGirdData);
}
})
}
});
}
})
}
});
//作废
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State == -1) {
learun.alert.warning("当前项已作废,请勿重复操作 !");
return false;
}
learun.layerConfirm('是否确认作废该项,此操作将改变数据!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//撤回
$('#lr_cancel').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State <= 0) {
learun.alert.warning("当前项已撤回或作废,请勿重复操作!");
return;
}
learun.layerConfirm('是否确认撤回该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/DoCancel', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//设置填报人
$('#lr_people').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus !== 1) {
learun.alert.warning("当前项不能设置填报人!");
return false;
}
learun.layerForm({
id: 'form',
title: '设置填报人',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/FormPeople?keyValue=' + keyValue,
width: 600,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});

//隐藏显示
$('#lr_hide').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认隐藏/显示该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/HideList', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//归档
$('#lr_file').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('State');
if (Status !== 2) {
learun.alert.warning("当前项未执行到此处,暂不能归档!");
return false;
}
learun.layerConfirm('确定要归档么!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/IsFile', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 250, align: "center" },
{ label: "序号", name: "SerialNo", width: 100, align: "center" },
{ label: "项目名称", name: "ProjectName", width: 250, align: "center" },
{
label: "填报周期", name: "FillingCycle", width: 80, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ThisCycle',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "公式", name: "Formula", width: 200, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'FormulaMain',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报时间", name: "FillingTime", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value.indexOf(',') != -1) {
var content = '';
var timearr = value.split(',');
for (var i = 0; i < timearr.length; i++) {
learun.clientdata.getAsync('dataItem',
{
key: timearr[i],
code: 'CycleTime',
callback: function (_data) {
content += _data.text + ',';

}
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('dataItem',
{
key: value,
code: 'CycleTime',
callback: function (_data) {
callback(_data.text);
}
});
}
}
},
{
label: "填报部门", name: "FillingDept", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报人", name: "FillingPeople", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "状态", name: "State", width: 150, align: "center",
formatter: function (cellvalue) {
if (cellvalue === -1) {
return '<span class=\"label label-danger\">作废</span>';
} else if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">待设置填报人</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">待填报</span>';
} else if (cellvalue === 3) {
return '<span class=\"label label-default\">已完成<pan>';
}
}
},
{ label: "备注", name: "Demo", width: 240, align: "center" },
{
label: "隐藏/显示", name: "IsFlag", width: 100, align: "center",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-success\">显示</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-default\">隐藏</span>';
}
}
},
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.isSystem = isSystem;
param.departmentId = departmentId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/CalculateProjectController.cs Bestand weergeven

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public class CalculateProjectController : MvcControllerBase
{
private CalculateProjectIBLL calculateProjectIBLL = new CalculateProjectBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = calculateProjectIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var CalculateProjectData = calculateProjectIBLL.GetCalculateProjectEntity( keyValue );
var jsonData = new {
CalculateProject = CalculateProjectData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
calculateProjectIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
CalculateProjectEntity entity = strEntity.ToObject<CalculateProjectEntity>();
calculateProjectIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 124
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaChildController.cs Bestand weergeven

@@ -0,0 +1,124 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public class FormulaChildController : MvcControllerBase
{
private FormulaChildIBLL formulaChildIBLL = new FormulaChildBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据
/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = formulaChildIBLL.GetTree();
return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = formulaChildIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FormulaChildData = formulaChildIBLL.GetFormulaChildEntity(keyValue);
var jsonData = new
{
FormulaChild = FormulaChildData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
formulaChildIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveList(string MainId, List<FormulaChildEntity> strEntity)
{
formulaChildIBLL.SaveList(MainId, strEntity);
return Success("保存成功!");
}
#endregion

}
}

+ 166
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaMainController.cs Bestand weergeven

@@ -0,0 +1,166 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public class FormulaMainController : MvcControllerBase
{
private FormulaMainIBLL formulaMainIBLL = new FormulaMainBLL();
private CalculateProjectIBLL calculateProjectIBLL = new CalculateProjectBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormChild()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = formulaMainIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

/// <summary>
/// 获取
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var list = formulaMainIBLL.GetList(queryJson);

return Success(list);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FormulaMainData = formulaMainIBLL.GetFormulaMainEntity( keyValue );
var jsonData = new {
FormulaMain = FormulaMainData,
};
return Success(jsonData);
}
/// <summary>
/// 获取子表数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormChildList(string keyValue)
{
var list = formulaMainIBLL.GetFormChildList(keyValue);
return Success(list);
}
/// <summary>
/// 获取所有计算项目
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCalProject()
{
var list = calculateProjectIBLL.GetListForDataSource();

return Success(list);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
formulaMainIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
FormulaMainEntity entity = strEntity.ToObject<FormulaMainEntity>();
formulaMainIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 215
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs Bestand weergeven

@@ -0,0 +1,215 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Web.Mvc;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:上报
/// </summary>
public class QualityReportController : MvcControllerBase
{
private QualityReportMainIBLL fualityReportMainIBLL = new QualityReportMainBLL();
private QualityReportChildIBLL fualityReportChildIBLL = new QualityReportChildBLL();
private FillinFromIBLL fillinFromIBLL = new FillinFromBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}

/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 上报数据管理
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexReport()
{
return View();
}

/// <summary>
/// 上报数据管理
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}

#endregion

#region 获取数据

/// <summary>
/// 获取树形结构数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree(string queryJson)
{
var data = fillinFromIBLL.GetTree(queryJson);
return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForReport(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = fillinFromIBLL.GetPageListForReport(paginationobj, queryJson);

var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = fualityReportMainIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = fualityReportMainIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 判断是否可以上报
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult IsCanReport(string keyValue)
{
var str = fualityReportChildIBLL.IsCanReport(keyValue);
if (!string.IsNullOrEmpty(str))
{
return Fail(str);
}

return Success("");
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue,string mainId)
{
var ReportData = fualityReportChildIBLL.GetListByFillId(keyValue, mainId);

return Success(ReportData);
}


#endregion

#region 提交数据
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveList(string keyValue, List<QualityReportChildEntity> list)
{
fualityReportChildIBLL.SaveList(keyValue, list);

return Success("保存成功!");
}
/// <summary>
/// 提交
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateState(string keyValue, int Status)
{
fualityReportChildIBLL.UpdateState(keyValue, Status);

return Success("操作成功!");
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
fualityReportChildIBLL.DeleteEntity(keyValue);

return Success("删除成功!");
}
#endregion

}
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Form.cshtml Bestand weergeven

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "计算项目管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="CalculateProject">
<div class="lr-form-item-title">计算项<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="CalculateProject">
<div class="lr-form-item-title">类型<font face="宋体">*</font></div>
<div id="Type" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="CalculateProject" id="valueDiv" style="display: none">
<div class="lr-form-item-title">值<font face="宋体">*</font></div>
<input id="Value" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="CalculateProject" >
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>
<input id="Sort" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/>
</div>
<div class="col-xs-12 lr-form-item" data-table="CalculateProject">
<div class="lr-form-item-title">选项<font face="宋体">*</font></div>
<div id="IsEnable"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/CalculateProject/Form.js")

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Form.js Bestand weergeven

@@ -0,0 +1,70 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 10:04
* 描 述:计算项目管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#Type').lrDataItemSelect({
code: 'projectType', select: function (item) {
if (item) {
if (item.id == '常量') {
$("#valueDiv").attr("style", "display:block;");
} else {
$("#valueDiv").attr("style", "display:none;");
}
}
}
});
$('#IsEnable').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/CalculateProject/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = JSON.stringify($('body').lrGetFormData());
if (strEntity.type == '常量' && !strEntity.value) {
return learun.alert.warning('值不能为空!');
}
var postData = {
strEntity: strEntity
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/CalculateProject/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 41
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.cshtml Bestand weergeven

@@ -0,0 +1,41 @@
@{
ViewBag.Title = "计算项目管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">计算项</div>
<input id="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类型</div>
<div id="Type"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_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>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/CalculateProject/Index.js")

+ 110
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.js Bestand weergeven

@@ -0,0 +1,110 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 10:04
* 描 述:计算项目管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#Type').lrDataItemSelect({ code: 'projectType' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LR_Desktop/CalculateProject/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/CalculateProject/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/CalculateProject/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/CalculateProject/GetPageList',
headData: [
{ label: "计算项", name: "Name", width: 150, align: "left"},
{ label: "类型", name: "Type", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'projectType',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "值", name: "Value", width: 100, align: "left"},
{ label: "排序", name: "Sort", width: 100, align: "left"},
{ label: "是否启用", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}},
],
mainId:'Id',
isPage: true,
sidx: 'Sort',
sord: 'ASC',
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Form.cshtml Bestand weergeven

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "公式子表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="FormulaChild" >
<div class="lr-form-item-title">上级<font face="宋体">*</font></div>
<div id="MainId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FormulaChild" >
<div class="lr-form-item-title">计算项目<font face="宋体">*</font></div>
<div id="ProjectId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FormulaChild" >
<div class="lr-form-item-title">顺序<font face="宋体">*</font></div>
<input id="Sort" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/FormulaChild/Form.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Form.js Bestand weergeven

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:26
* 描 述:公式子表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#MainId').lrDataSourceSelect({ code: 'FormulaMain',value: 'id',text: 'name' });
$('#ProjectId').lrDataSourceSelect({ code: 'CalculateProject',value: 'id',text: 'name' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Index.cshtml Bestand weergeven

@@ -0,0 +1,37 @@
@{
ViewBag.Title = "公式子表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlg ">树形列表</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlg">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_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>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_main" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;分类管理</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/FormulaChild/Index.js")

+ 136
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaChild/Index.js Bestand weergeven

@@ -0,0 +1,136 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:26
* 描 述:公式子表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LR_Desktop/FormulaChild/GetTree',
nodeClick: function (item) {
page.search({ MainId: item.value });
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LR_Desktop/FormulaChild/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/FormulaChild/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//分类管理
$('#lr_main').on('click', function () {
learun.layerForm({
id: 'index',
title: '分类管理',
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/Index',
width: 1000,
height: 700,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});

});

// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LR_Desktop/FormulaChild/GetPageList',
headData: [
{
label: "上级", name: "MainId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'FormulaMain',
key: value,
keyId: '',
callback: function (_data) {
callback(_data['']);
}
});
}
},
{
label: "计算项目", name: "ProjectId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CalculateProject',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{ label: "顺序", name: "Sort", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Form.cshtml Bestand weergeven

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "公式管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="FormulaMain" >
<div class="lr-form-item-title">名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FormulaMain" >
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>
<input id="Sort" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FormulaMain" >
<div class="lr-form-item-title">选项<font face="宋体">*</font></div>
<div id="IsEnable"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FormulaMain" >
<div class="lr-form-item-title">描述</div>
<textarea id="Desc" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/FormulaMain/Form.js")

+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Form.js Bestand weergeven

@@ -0,0 +1,54 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:公式管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#IsEnable').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.cshtml Bestand weergeven

@@ -0,0 +1,18 @@
@{
ViewBag.Title = "公式子表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">上级<font face="宋体">*</font></div>
<div id="MainId" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div><a id="lr_add" class="btn" style="position: relative;margin: -48px 0 0 -67px;"><i class="fa fa-plus"></i>&nbsp;</a>
</div>
<div id="content1">
</div>
<div class="col-xs-12 lr-form-item" style="color: red; margin-top: 20px;">
<div class="lr-form-item-title">公式:</div>
<div id="result" style="margin-top: 5px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/FormulaMain/FormChild.js")

+ 217
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js Bestand weergeven

@@ -0,0 +1,217 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:26
* 描 述:公式子表
*/
var acceptClick;
var keyValue = request('keyValue');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
page.addcontent();
},
bind: function () {
$('#MainId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetList',
value: "Id",
text: "Name"
});
//$('#MainId').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' });
$('#ProjectId').lrDataSourceSelect({ code: 'CalculateProject', value: 'id', text: 'name' });
$('#MainId').lrselectSet(keyValue);
// 新增
$('#lr_add').on('click', function () {
page.addcontent();
});
// 删除
$('#form').on('click',
'.child_delete',
function () {
var id = $(this).attr("id");
//删除当前行
$('#' + id).remove();
arr.forEach(item => {
if (item.iid == id) {
//如果存在删除
removeByValue(arr, 'iid', id);
}
});
////从数组删除
////如果存在删除
//removeByValue(arr, 'iid', id);

//重新排序并显示
arr.sort(sortBy("Sort"));
page.refreshRes();
});

//失去焦点,重新排序并显示
$('#form').on('blur',
'.sort',
function () {
var id = $(this)[0].id;
var parId = id.replace('Sort', '');
arr.forEach(m => {
if (m.iid == parId) {
return m.Sort = $('#' + id).val();
}
});
arr.sort(sortBy("Sort"));
page.refreshRes();
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/GetFormChildList?keyValue=' + keyValue, function (data) {
$('#content1').html('');
var html = '';
if (data && data.length > 0) {
for (var i = 0; i < data.length; i++) {
var id = learun.newGuid();
var html = '';
html += '<div id="' + id + '">';
html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>计算项目<font face="宋体">*</font></div>';
html += '<div id="pro' + id + '" class="project" isvalid="yes" checkexpession="NotNull"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
html += '<div class="lr-form-item-title">顺序<font face="宋体">*</font></div>';
html += '<input id="Sort' + id + '" type="number" class="form-control sort" isvalid="yes" checkexpession="NotNull" value="' + data[i].Sort + '"/>';
html += '</div>';
html += '</div>';

$('#content1').append(html);
$('#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) {
var id = $(this).attr('id');
var parId = id.replace('pro', '');

arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
});
arr.push({ iid: parId, ProjectId: item.id, ProjectName: item.name, Sort: $('#Sort' + parId).val() });

arr.sort(sortBy("Sort"));
page.refreshRes();
}
}
});

$('#pro' + id).lrselectSet(data[i].ProjectId);
}

} else {
page.addcontent();
}
});
}
},
addcontent: function () {
var id = learun.newGuid();
var html = '';
html += '<div id="' + id + '">';
html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>计算项目<font face="宋体">*</font></div>';
html += '<div id="pro' + id + '" class="project" isvalid="yes" checkexpession="NotNull"></div>';

html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
html += '<div class="lr-form-item-title">顺序<font face="宋体">*</font></div>';
html += '<input id="Sort' + id + '" type="number" class="form-control sort" isvalid="yes" checkexpession="NotNull" />';
html += '</div>';
html += '</div>';
$('#content1').append(html);

$('#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) {
var id = $(this).attr('id');
var parId = id.replace('pro', '');
arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
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 () {
//页面显示公式结果
var text = '';
arr.forEach(m => {
text += m.ProjectName;
});
$('#result').html(text);
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = JSON.stringify($('body').lrGetFormData());
if (arr.length == 0) {
return learun.alert.warning('请选择计算项目!');
}
var postData = {
//mainEntity: strEntity,
strEntity: arr
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/SaveList?MainId=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
//删除数组元素
function removeByValue(arr, attr, value) {
var index = 0;
for (var i in arr) {
if (arr[i][attr] == value) {
index = i;
break;
}
}
arr.splice(index, 1);
}

//数组排序
function sortBy(props) {
return function (a, b) {
return a[props] - b[props];
}
}
}

+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.cshtml Bestand weergeven

@@ -0,0 +1,38 @@
@{
ViewBag.Title = "公式管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">名称</div>
<input id="Name" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_editgs" 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>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/FormulaMain/Index.js")

+ 118
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js Bestand weergeven

@@ -0,0 +1,118 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:公式管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 设置公式
$('#lr_editgs').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '设置公式',
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/FormChild?keyValue=' + keyValue,
width: 600,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 150, align: "left" },
{ label: "公式", name: "Result", width: 350, align: "left" },
{ label: "排序", name: "Sort", width: 100, align: "left" },
{ label: "描述", name: "Desc", width: 200, align: "left" },
{
label: "启用", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
}
],
mainId: 'Id',
isPage: true,
sidx: 'Sort',
sord: 'ASC',
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.cshtml Bestand weergeven

@@ -0,0 +1,12 @@
@{
ViewBag.Title = "数据上报";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div id="content"></div>
<div class="col-xs-12 lr-form-item" style="color: red; margin-top: 20px;">
<div class="lr-form-item-title">公式:</div>
<div id="result" style="margin-top: 5px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/Form.js")

+ 104
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js Bestand weergeven

@@ -0,0 +1,104 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:数据上报
*/
var acceptClick;
var keyValue = request('keyValue');
var mainId = request('mainId');
var ProjectName = request('ProjectName');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//文本框失去焦点,计算结果
$('#form').on('blur',
'.value',
function () {
var id = $(this)[0].id;
arr.forEach(m => {
if (m.Id == id) {
return m.Value = $('#' + id).val();
}
});
page.refreshRes();
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/QualityReport/GetFormData?keyValue=' + keyValue + '&mainId=' + mainId, function (data) {

$('#content').html('');
for (var i = 0; i < data.length; i++) {
var id = data[i].Id;
arr.push({ Id: id, Value: data[i].Value, Sort: data[i].Sort, ProjectId: data[i].ProjectId });
var html = '';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">计算项<font face="宋体">*</font></div>';
html += '<div id="pro' + id + '" readonly="readonly"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">值<font face="宋体">*</font></div>';
if (data[i].CalName.indexOf('文字描述') != -1) {
html +=
'<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull"/>';
} else if (data[i].CalType != '变量') {
html +=
'<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
} else {
html +=
'<input id="' + id + '" type="number" class="form-control value" isvalid="yes" checkexpession="NotNull" />';
}
html += '</div>';

$('#content').append(html);
$('#' + id).val(data[i].Value);
//CalType CalName
$('#pro' + id).lrDataSourceSelect({
code: 'CalculateProject',
value: 'id',
text: 'name'
});
$('#pro' + id).lrselectSet(data[i].ProjectId);
}
page.refreshRes();
});
}
},
refreshRes: function () {
//页面显示计算结果
var text = '';
arr.forEach(m => {
text += m.Value;
});
$('#result').html(text);
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
if (arr.count <= 0) {
return learun.alert.warning('请设置上报数据!');
}

var postData = {
list: arr //JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/QualityReport/SaveList?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.cshtml Bestand weergeven

@@ -0,0 +1,12 @@
@{
ViewBag.Title = "数据上报";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div id="content"></div>
<div class="col-xs-12 lr-form-item" style="color: red; margin-top: 20px;">
<div class="lr-form-item-title">公式:</div>
<div id="result" style="margin-top: 5px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/FormView.js")

+ 106
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.js Bestand weergeven

@@ -0,0 +1,106 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:数据上报
*/
var acceptClick;
var keyValue = request('keyValue');
var mainId = request('mainId');
var ProjectName = request('ProjectName');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//文本框失去焦点,计算结果
$('#form').on('blur',
'.value',
function () {
var id = $(this)[0].id;
arr.forEach(m => {
if (m.Id == id) {
return m.Value = $('#' + id).val();
}
});

page.refreshRes();

});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/QualityReport/GetFormData?keyValue=' + keyValue + '&mainId=' + mainId, function (data) {
$('#content').html('');
for (var i = 0; i < data.length; i++) {
var id = data[i].Id;
arr.push({ Id: id, Value: data[i].Value, Sort: data[i].Sort, ProjectId: data[i].ProjectId });
var html = '';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">计算项<font face="宋体">*</font></div>';
html += '<div id="pro' + id + '" readonly="readonly"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">值<font face="宋体">*</font></div>';
html +=
'<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//if (data[i].CalName.indexOf('文字描述') != -1) {
// html +=
// '<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//} else if (data[i].CalType != '变量') {
// html +=
// '<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//} else {
// html +=
// '<input id="' + id + '" type="number" class="form-control value" isvalid="yes" checkexpession="NotNull" />';
//}
html += '</div>';

$('#content').append(html);
$('#' + id).val(data[i].Value);
//CalType CalName
$('#pro' + id).lrDataSourceSelect({
code: 'CalculateProject',
value: 'id',
text: 'name'
});
$('#pro' + id).lrselectSet(data[i].ProjectId);
}
page.refreshRes();
});
}
},
refreshRes: function () {
//页面显示计算结果
var text = '';
arr.forEach(m => {
text += m.Value;
});
$('#result').html(text);
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
console.log('save', arr);
//return;
var postData = {
list: arr //JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/QualityReport/SaveList?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml Bestand weergeven

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "数据上报";
Layout = "~/Views/Shared/_Index.cshtml";
}

<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">核心工作模块</div>
<input id="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看上报信息</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;提交</a>*@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/Index.js")

+ 228
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js Bestand weergeven

@@ -0,0 +1,228 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-28 11:07
* 描 述:数据上报
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 填报
$('#lr_add').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var ProjectName = $('#gridtable').jfGridValue('ProjectName');
learun.httpAsyncGet(top.$.rootUrl + '/LR_Desktop/QualityReport/IsCanReport?keyValue=' + keyValue, function (res) {
if (res.code == 200) {
learun.layerForm({
id: 'form',
title: ProjectName + '填报',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue + '&ProjectName=' + ProjectName,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
else {
learun.alert.error(res.info);
}
});

}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/FormulaMain/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetPageListForReport',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "left" },
{ label: "项目名称", name: "ProjectName", width: 300, align: "left" },
{
label: "填报周期", name: "FillingCycle", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ThisCycle',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "填报时间", name: "FillingTime", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value.indexOf(',') != -1) {
var content = '';
var timearr = value.split(',');
for (var i = 0; i < timearr.length; i++) {
learun.clientdata.getAsync('dataItem',
{
key: timearr[i],
code: 'CycleTime',
callback: function (_data) {
content += _data.text + ',';
}
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('dataItem',
{
key: value,
code: 'CycleTime',
callback: function (_data) {
callback(_data.text);
}
});
}
}
},
{
label: "填报部门", name: "FillingDept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报人", name: "FillingPeople", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
//{
// label: "状态", name: "State", width: 150, align: "center",
// formatter: function (cellvalue) {
// if (cellvalue === 0) {
// return '<span class=\"label label-warning\">草稿</span>';
// } else if (cellvalue === 1) {
// return '<span class=\"label label-success\">待设置填报人</span>';
// } else if (cellvalue === 2) {
// return '<span class=\"label label-success\">待设置公式</span>';
// } else {
// return '<span class=\"label label-default\">已完成</span>';
// }
// }
//},
{ label: "备注", name: "Demo", width: 300, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'FillingTime',
sord: 'DESC',
isSubGrid: true, // 是否有子表单
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetList',
headData: [
//{ label: "核心工作模块", name: "WorderModule", width: 300, align: "left" },
//{ label: "项目名称", name: "ProjectName", width: 300, align: "left" },
{
label: "填报部门", name: "FillingDept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报人", name: "CreateUserName", width: 150, align: "left"
},
{
label: "公式计算结果", name: "Result", width: 150, align: "left"
},
{
label: "填报时间", name: "ReportTime", width: 150, align: "left", formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM');
}
},
{
label: "状态", name: "Status", width: 150, align: "left",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">完成</span>';
} else if (cellvalue === 99) {
return '<span class=\"label label-default\">作废</span>';
}
}
},
],
mainId: 'Id',
isPage: false,
});
var param;
param = param || {};
param.FillInFromId = rowItem.Id;
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = ' AND (FillingPeople is not null and len(FillingPeople)>0) and (Formula is not null and len(Formula)>0) and IsFlag=0 and [State]=2';
param.FillingPeople = learun.clientdata.get(['userinfo']).userId;

$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 83
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml Bestand weergeven

@@ -0,0 +1,83 @@
@{
ViewBag.Title = "上报数据管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">类型</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择类型</span> - <span class="lrlt">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">名称</div>
<input id="Name" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_nosubmit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;撤回</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>

@*<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">名称</div>
<input id="Name" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_nosubmit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;撤回</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>*@
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/IndexReport.js")

+ 196
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js Bestand weergeven

@@ -0,0 +1,196 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-25 11:07
* 描 述:上报数据管理
*/
var refreshGirdData;
var FillInFromId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.inittree();
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
var mainId = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交,不可编辑!');
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue + '&mainId=' + mainId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
var mainId = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '查看',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/FormView?keyValue=' + keyValue + '&mainId=' + mainId,
width: 600,
height: 400,
btn: null
});
}
});

//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交!');
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_Desktop/QualityReport/UpdateState', { keyValue: keyValue, Status: 1 }, function () {
refreshGirdData();
});
}
});
}
});

//撤回
$('#lr_nosubmit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
//var Status = $('#gridtable').jfGridValue('Status');
//if (Status == 0) {
// return learun.alert.warning('该项已提交!');
//}
learun.layerConfirm('是否确认撤回该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_Desktop/QualityReport/UpdateState', { keyValue: keyValue, Status: 0 }, function () {
refreshGirdData();
});
}
});
}
});
//删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交,不可删除!');
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/QualityReport/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
inittree: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetTree',
nodeClick: page.treeNodeClick
});
},
treeNodeClick: function (item) {
FillInFromId = item.id;
$('#titleinfo').text(item.text);
page.search();
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetPageList',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "left" },
{ label: "项目名称", name: "ProjectName", width: 300, align: "left" },
{
label: "填报部门", name: "FillingDept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "填报人", name: "CreateUserName", width: 150, align: "left"
},
{
label: "公式计算结果", name: "Result", width: 150, align: "left"
},
{
label: "填报时间", name: "ReportTime", width: 150, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM');
}
},
{
label: "状态", name: "Status", width: 150, align: "left",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">已提交</span>';
} else if (cellvalue === 99) {
return '<span class=\"label label-default\">作废</span>';
}
}
},
],
mainId: 'Id',
isPage: true,
sidx: 'ReportTime',
sord: 'DESC',
});
page.search();
},
search: function (param) {
param = param || {};
param.FillInFromId = FillInFromId;
//param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Bestand weergeven

@@ -324,6 +324,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\PracticeBaseController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterBuildingController.cs" />
@@ -388,11 +389,15 @@
<Compile Include="Areas\LR_CRMModule\Controllers\ReceivableController.cs" />
<Compile Include="Areas\LR_CRMModule\Controllers\TrailRecordController.cs" />
<Compile Include="Areas\LR_CRMModule\LR_CRMModuleAreaRegistration.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\CalculateProjectController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\DTChartController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\DTListController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\DTSettingController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\DTTargetController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\FormulaChildController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\FormulaMainController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\MessageRindController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\QualityReportController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\SSO_Drag_CardSortManageController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\SSO_Drag_DesktopManageController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\WeChatDevelopController.cs" />
@@ -965,6 +970,10 @@
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\JournalSend\FormOfDC.js" />
<Content Include="Areas\EducationalAdministration\Views\JournalSend\IndexOfDC.js" />
<Content Include="Areas\EducationalAdministration\Views\LeaveSchoolA\Form.js" />
@@ -1278,12 +1287,23 @@
<Content Include="Areas\LR_CRMModule\Views\Receivable\ReceiptForm.js" />
<Content Include="Areas\LR_CRMModule\Views\Receivable\ReportIndex.js" />
<Content Include="Areas\LR_CRMModule\Views\TrailRecord\Index.js" />
<Content Include="Areas\LR_Desktop\Views\CalculateProject\Form.js" />
<Content Include="Areas\LR_Desktop\Views\CalculateProject\Index.js" />
<Content Include="Areas\LR_Desktop\Views\DTSetting\App\AppIndex.css" />
<Content Include="Areas\LR_Desktop\Views\DTSetting\App\AppIndex.js" />
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.css" />
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Form.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Index.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\Form.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\FormChild.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\Index.js" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.js" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CardSortManage\Form.js" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CardSortManage\Index.js" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_DesktopManage\Form.js" />
@@ -7265,6 +7285,21 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaderLeaveFilingMonitor.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveFiling.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveFilingMonitor.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\CalculateProject\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\CalculateProject\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\FormChild.cshtml" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/FillinFromMap.cs Bestand weergeven

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromMap : EntityTypeConfiguration<FillinFromEntity>
{
public FillinFromMap()
{
#region 表、主键
//表
this.ToTable("FILLINFROM");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/CalculateProjectMap.cs Bestand weergeven

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public class CalculateProjectMap : EntityTypeConfiguration<CalculateProjectEntity>
{
public CalculateProjectMap()
{
#region 表、主键
//表
this.ToTable("CALCULATEPROJECT");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/FormulaChildMap.cs Bestand weergeven

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public class FormulaChildMap : EntityTypeConfiguration<FormulaChildEntity>
{
public FormulaChildMap()
{
#region 表、主键
//表
this.ToTable("FORMULACHILD");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/FormulaMainMap.cs Bestand weergeven

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public class FormulaMainMap : EntityTypeConfiguration<FormulaMainEntity>
{
public FormulaMainMap()
{
#region 表、主键
//表
this.ToTable("FORMULAMAIN");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/QualityReportChildMap.cs Bestand weergeven

@@ -0,0 +1,28 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:26
/// 描 述:上报子表
/// </summary>
public class QualityReportChildMap : EntityTypeConfiguration<QualityReportChildEntity>
{
public QualityReportChildMap()
{
#region 表、主键
//表
this.ToTable("QUALITYREPORTCHILD");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}

+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/QualityReportMainMap.cs Bestand weergeven

@@ -0,0 +1,28 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:12
/// 描 述:上报主表
/// </summary>
public class QualityReportMainMap : EntityTypeConfiguration<QualityReportMainEntity>
{
public QualityReportMainMap()
{
#region 表、主键
//表
this.ToTable("QUALITYREPORTMAIN");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}

+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Bestand weergeven

@@ -78,6 +78,7 @@
<Compile Include="EducationalAdministration\CertificateManageMap.cs" />
<Compile Include="EducationalAdministration\CertificateResultMap.cs" />
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" />
<Compile Include="EducationalAdministration\FillinFromMap.cs" />
<Compile Include="EducationalAdministration\LeaveSchoolMap.cs" />
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" />
<Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" />
@@ -113,8 +114,13 @@
<Compile Include="LR_CodeDemo\LR_OA_ProjectMap.cs" />
<Compile Include="LR_CRM\CrmCustomerContactMap.cs" />
<Compile Include="LR_CRM\CrmChanceMap.cs" />
<Compile Include="LR_Desktop\CalculateProjectMap.cs" />
<Compile Include="LR_Desktop\FormulaChildMap.cs" />
<Compile Include="LR_Desktop\FormulaMainMap.cs" />
<Compile Include="LR_Desktop\LostArticleInfoMap.cs" />
<Compile Include="LR_Desktop\MessageRemindMap.cs" />
<Compile Include="LR_Desktop\QualityReportChildMap.cs" />
<Compile Include="LR_Desktop\QualityReportMainMap.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CardSortManageMap.cs" />
<Compile Include="LR_Desktop\SSO_Drag_DesktopManageMap.cs" />
<Compile Include="LR_Desktop\WeChatDevelopMap.cs" />


+ 214
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs Bestand weergeven

@@ -0,0 +1,214 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromBLL : FillinFromIBLL
{
private FillinFromService fillinFromService = new FillinFromService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return fillinFromService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 获取页面显示列表数据--数据上报用
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson)
{
try
{
return fillinFromService.GetPageListForReport(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FillinFromEntity GetFillinFromEntity(string keyValue)
{
try
{
return fillinFromService.GetFillinFromEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取树形数据
/// </summary>
/// <returns></returns>
public IEnumerable<TreeModel> GetTree(string queryJson)
{
try
{
List<TreeModel> treeList = new List<TreeModel>();
var list = fillinFromService.GetSqlTree(queryJson);
foreach (var item in list)
{
TreeModel node = new TreeModel
{
id = item.Id,
text = item.WorderModule + "--" + item.ProjectName,
value = item.Id,
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
fillinFromService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, FillinFromEntity entity)
{
try
{
fillinFromService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion


#region 扩展数据
/// <summary>
/// 获取CdMajor表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public FillinFromEntity GetFillInNo(string keyValue)
{
try
{
return fillinFromService.GetFillInNo(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}

+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromEntity.cs Bestand weergeven

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 工作模块
/// </summary>
[Column("WORDERMODULE")]
public string WorderModule { get; set; }
/// <summary>
/// 序号
/// </summary>
[Column("SERIALNO")]
public string SerialNo { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[Column("PROJECTNAME")]
public string ProjectName { get; set; }
/// <summary>
/// 数1
/// </summary>
[Column("FORMULA")]
public string Formula { get; set; }
/// <summary>
/// 结果
/// </summary>
[Column("LASTRESULT")]
public string LastResult { get; set; }
/// <summary>
/// 填报周期
/// </summary>
[Column("FILLINGCYCLE")]
public string FillingCycle { get; set; }
/// <summary>
/// 填报时间
/// </summary>
[Column("FILLINGTIME")]
public string FillingTime { get; set; }
/// <summary>
/// 填报部门
/// </summary>
[Column("FILLINGDEPT")]
public string FillingDept { get; set; }
/// <summary>
/// 填报人
/// </summary>
[Column("FILLINGPEOPLE")]
public string FillingPeople { get; set; }
/// <summary>
/// 提交人
/// </summary>
[Column("LRPEOPLE")]
public string lrPeople { get; set; }
/// <summary>
/// 录入时间
/// </summary>
[Column("LRTIME")]
public DateTime? lrTime { get; set; }
/// <summary>
/// 状态 0:草稿 1待指派部门 2待填写公式 3 已完成
/// </summary>
[Column("STATE")]
public int? State { get; set; }
/// <summary>
/// Demo
/// </summary>
[Column("DEMO")]
public string Demo { get; set; }
/// <summary>
/// 隐藏/显示
/// </summary>
[Column("ISFLAG")]
public int? IsFlag { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
/// <summary>
/// 填报时间
/// </summary>
[NotMapped]
public string FillingTime1 { get; set; }
/// <summary>
/// 填报时间
/// </summary>
[NotMapped]
public string FillingTime2 { get; set; }
#endregion
}
}


+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs Bestand weergeven

@@ -0,0 +1,70 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public interface FillinFromIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取页面显示列表数据--数据上报用
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson);
/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FillinFromEntity GetFillinFromEntity(string keyValue);


/// <summary>
/// 获取表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
FillinFromEntity GetFillInNo(string keyValue);

/// <summary>
/// 获取树形数据
/// </summary>
/// <returns></returns>
IEnumerable<TreeModel> GetTree(string queryJson);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FillinFromEntity entity);
#endregion

}
}

+ 342
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs Bestand weergeven

@@ -0,0 +1,342 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.WorderModule,
t.SerialNo,
t.ProjectName,
t.Formula,
t.LastResult,
t.FillingCycle,
t.FillingTime,
t.FillingDept,
t.FillingPeople,
t.Demo,
t.State,
t.lrPeople,
t.lrTime,
t.IsFlag
");
strSql.Append(" FROM FillinFrom t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["WorderModule"].IsEmpty())
{
dp.Add("WorderModule", "%" + queryParam["WorderModule"].ToString() + "%", DbType.String);
strSql.Append(" AND t.WorderModule Like @WorderModule ");
}
if (!queryParam["ProjectName"].IsEmpty())
{
dp.Add("ProjectName", "%" + queryParam["ProjectName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ProjectName Like @ProjectName ");
}
if (!queryParam["FillingCycle"].IsEmpty())
{
dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String);
strSql.Append(" AND t.FillingCycle = @FillingCycle ");
}
if (!queryParam["FillingPeople"].IsEmpty() && queryParam["FillingPeople"].ToString() != "System")
{
dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String);
strSql.Append(" AND t.FillingPeople = @FillingPeople ");
}
if (!queryParam["IsFlag"].IsEmpty())
{
dp.Add("IsFlag", queryParam["IsFlag"].ToString(), DbType.String);
strSql.Append(" AND t.IsFlag = @IsFlag ");
}
if (queryParam["isSystem"].ToBool() == false)
{
if (!queryParam["departmentId"].IsEmpty())
{
dp.Add("FillingDept", queryParam["departmentId"].ToString(), DbType.String);
strSql.Append(" AND t.FillingDept = @FillingDept ");
}
else
{
dp.Add("FillingDept", "undefined11", DbType.String);
strSql.Append(" AND t.FillingDept = @FillingDept ");
}
}
//sql条件
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
/// 获取页面显示列表数据--数据上报用
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.WorderModule,
t.SerialNo,
t.ProjectName,
t.Formula,
t.LastResult,
t.FillingCycle,
t.FillingTime,
t.FillingDept,
t.FillingPeople,
t.Demo,
t.State,
t.lrPeople,
t.lrTime,
t.IsFlag
");
strSql.Append(" FROM FillinFrom t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["WorderModule"].IsEmpty())
{
dp.Add("WorderModule", "%" + queryParam["WorderModule"].ToString() + "%", DbType.String);
strSql.Append(" AND t.WorderModule Like @WorderModule ");
}
if (!queryParam["ProjectName"].IsEmpty())
{
dp.Add("ProjectName", "%" + queryParam["ProjectName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ProjectName Like @ProjectName ");
}
if (!queryParam["FillingCycle"].IsEmpty())
{
dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String);
strSql.Append(" AND t.FillingCycle = @FillingCycle ");
}
if (!queryParam["FillingPeople"].IsEmpty() && queryParam["FillingPeople"].ToString() != "System")
{
dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String);
strSql.Append(" AND t.FillingPeople = @FillingPeople ");
}
if (!queryParam["IsFlag"].IsEmpty())
{
dp.Add("IsFlag", queryParam["IsFlag"].ToString(), DbType.String);
strSql.Append(" AND t.IsFlag = @IsFlag ");
}
//sql条件
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FillinFromEntity GetFillinFromEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FillinFromEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
///
/// </summary>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetSqlTree(string queryJson)
{
try
{
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)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FillinFromEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FillinFromEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 扩展数据

/// <summary>
/// 获取CdMajor表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public FillinFromEntity GetFillInNo(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FillinFromEntity>(x => x.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion
}
}

+ 145
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectBLL.cs Bestand weergeven

@@ -0,0 +1,145 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public class CalculateProjectBLL : CalculateProjectIBLL
{
private CalculateProjectService calculateProjectService = new CalculateProjectService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<CalculateProjectEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return calculateProjectService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取CalculateProject表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public CalculateProjectEntity GetCalculateProjectEntity(string keyValue)
{
try
{
return calculateProjectService.GetCalculateProjectEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


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

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
calculateProjectService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, CalculateProjectEntity entity)
{
try
{
calculateProjectService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectEntity.cs Bestand weergeven

@@ -0,0 +1,90 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public class CalculateProjectEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 计算项名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 类型(常量、变量)
/// </summary>
[Column("TYPE")]
public string Type { get; set; }
/// <summary>
/// 常量值
/// </summary>
[Column("VALUE")]
public string Value { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLE")]
public int? IsEnable { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.CreateTime=DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.CreateUserId = userinfo.userId;
this.CreateUserName = userinfo.realName;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectIBLL.cs Bestand weergeven

@@ -0,0 +1,53 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public interface CalculateProjectIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<CalculateProjectEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取CalculateProject表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
CalculateProjectEntity GetCalculateProjectEntity(string keyValue);
/// <summary>
///
/// </summary>
/// <returns></returns>
DataTable GetListForDataSource();
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, CalculateProjectEntity entity);
#endregion

}
}

+ 182
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/CalculateProject/CalculateProjectService.cs Bestand weergeven

@@ -0,0 +1,182 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 10:04
/// 描 述:计算项目管理
/// </summary>
public class CalculateProjectService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<CalculateProjectEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Name,
t.Type,
t.Value,
t.IsEnable,t.Sort
");
strSql.Append(" FROM CalculateProject t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["Type"].IsEmpty())
{
dp.Add("Type", queryParam["Type"].ToString(), DbType.String);
strSql.Append(" AND t.Type = @Type ");
}
return this.BaseRepository("CollegeMIS").FindList<CalculateProjectEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取CalculateProject表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public CalculateProjectEntity GetCalculateProjectEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<CalculateProjectEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <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 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<CalculateProjectEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, CalculateProjectEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 191
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildBLL.cs Bestand weergeven

@@ -0,0 +1,191 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public class FormulaChildBLL : FormulaChildIBLL
{
private FormulaChildService formulaChildService = new FormulaChildService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaChildEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return formulaChildService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取FormulaChild表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FormulaChildEntity GetFormulaChildEntity(string keyValue)
{
try
{
return formulaChildService.GetFormulaChildEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}



/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
public List<TreeModel> GetTree()
{
try
{
DataTable list = formulaChildService.GetSqlTree();
List<TreeModel> treeList = new List<TreeModel>();
foreach (DataRow item in list.Rows)
{
TreeModel node = new TreeModel
{
id = item["Id"].ToString(),
text = item["Name"].ToString(),
value = item["Id"].ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = "0",
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
formulaChildService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, FormulaChildEntity entity)
{
try
{
formulaChildService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveList(string MainId, List<FormulaChildEntity> strEntity)
{
try
{
formulaChildService.SaveList(MainId, strEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 85
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildEntity.cs Bestand weergeven

@@ -0,0 +1,85 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public class FormulaChildEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 主表Id
/// </summary>
[Column("MAINID")]
public string MainId { get; set; }
/// <summary>
/// 计算项目Id
/// </summary>
[Column("PROJECTID")]
public string ProjectId { get; set; }
/// <summary>
/// 顺序
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.CreateUserId = userinfo.userId;
this.CreateUserName = userinfo.realName;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
/// <summary>
/// 计算项名称
/// </summary>
[NotMapped]
public string ProjectName { get; set; }
#endregion
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildIBLL.cs Bestand weergeven

@@ -0,0 +1,55 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public interface FormulaChildIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FormulaChildEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取FormulaChild表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FormulaChildEntity GetFormulaChildEntity(string keyValue);

/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
List<TreeModel> GetTree();
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FormulaChildEntity entity);
void SaveList(string MainId, List<FormulaChildEntity> strEntity);
#endregion

}
}

+ 217
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaChild/FormulaChildService.cs Bestand weergeven

@@ -0,0 +1,217 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:26
/// 描 述:公式子表
/// </summary>
public class FormulaChildService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaChildEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.MainId,
t.ProjectId,
t.Sort
");
strSql.Append(" FROM FormulaChild t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["MainId"].IsEmpty())
{
dp.Add("MainId", queryParam["MainId"].ToString(), DbType.String);
strSql.Append(" AND t.MainId=@MainId ");
}
return this.BaseRepository("CollegeMIS").FindList<FormulaChildEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取FormulaChild表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FormulaChildEntity GetFormulaChildEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FormulaChildEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
/// 获取树形数据
/// </summary>
/// <returns></returns>
public DataTable GetSqlTree()
{
try
{
return this.BaseRepository("CollegeMIS").FindTable(" SELECT Id,Name FROM FormulaMain where IsEnable=1 order by Sort");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FormulaChildEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FormulaChildEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 添加子表
/// </summary>
/// <param name="MainId"></param>
/// <param name="strEntity"></param>
public void SaveList(string MainId, List<FormulaChildEntity> strEntity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var delSql = $"delete from FormulaChild where MainId='{MainId}'";
db.ExecuteBySql(delSql);
var projectNames= strEntity.OrderBy(x => x.Sort).Select(x=>x.ProjectName).ToList();
var result = string.Join("", projectNames.ToArray());
string updSql = $"update FormulaMain set Result='{result}' where Id='{MainId}'";
db.ExecuteBySql(updSql);
foreach (var item in strEntity)
{
FormulaChildEntity entity = new FormulaChildEntity();
entity.Create();
entity.MainId = MainId;
entity.ProjectId = item.ProjectId;
entity.Sort = item.Sort;
db.Insert(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 176
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainBLL.cs Bestand weergeven

@@ -0,0 +1,176 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public class FormulaMainBLL : FormulaMainIBLL
{
private FormulaMainService formulaMainService = new FormulaMainService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaMainEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return formulaMainService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaMainEntity> GetList(string queryJson)
{
try
{
return formulaMainService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取FormulaMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FormulaMainEntity GetFormulaMainEntity(string keyValue)
{
try
{
return formulaMainService.GetFormulaMainEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 获取FormulaMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<FormulaChildEntity> GetFormChildList(string keyValue)
{
try
{
return formulaMainService.GetFormChildList(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
formulaMainService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, FormulaMainEntity entity)
{
try
{
formulaMainService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainEntity.cs Bestand weergeven

@@ -0,0 +1,90 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public class FormulaMainEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
[Column("DESC")]
public string Desc { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLE")]
public int? IsEnable { get; set; }
/// <summary>
/// 公式
/// </summary>
[Column("RESULT")]
public string Result { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.CreateUserId = userinfo.userId;
this.CreateUserName = userinfo.realName;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainIBLL.cs Bestand weergeven

@@ -0,0 +1,51 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public interface FormulaMainIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FormulaMainEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<FormulaMainEntity> GetList(string queryJson);
/// <summary>
/// 获取FormulaMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FormulaMainEntity GetFormulaMainEntity(string keyValue);

IEnumerable<FormulaChildEntity> GetFormChildList(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FormulaMainEntity entity);
#endregion

}
}

+ 218
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/FormulaMain/FormulaMainService.cs Bestand weergeven

@@ -0,0 +1,218 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-22 11:07
/// 描 述:公式管理
/// </summary>
public class FormulaMainService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaMainEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Name,
t.Sort,
t.IsEnable,
t.[Desc],
t.[Result]
");
strSql.Append(" FROM FormulaMain t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
return this.BaseRepository("CollegeMIS").FindList<FormulaMainEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FormulaMainEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Name
");
strSql.Append(" FROM FormulaMain t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
return this.BaseRepository("CollegeMIS").FindList<FormulaMainEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取FormulaMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FormulaMainEntity GetFormulaMainEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FormulaMainEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取子表数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<FormulaChildEntity> GetFormChildList(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<FormulaChildEntity>(x => x.MainId == keyValue).OrderBy(x => x.Sort);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FormulaMainEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FormulaMainEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 216
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs Bestand weergeven

@@ -0,0 +1,216 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
    /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
    /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
    /// 创 建:超级管理员
    /// 日 期:2021-06-23 17:26
    /// 描 述:上报子表
    /// </summary>
public class QualityReportChildBLL : QualityReportChildIBLL
{
private QualityReportChildService qualityReportChildService = new QualityReportChildService();

#region 获取数据

/// <summary>
        /// 获取页面显示列表数据
        /// </summary>
        /// <param name="pagination">分页参数</param>
        /// <param name="queryJson">查询参数</param>
        /// <returns></returns>
public IEnumerable<QualityReportChildEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return qualityReportChildService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
public IEnumerable<QualityReportChildEntity> GetListByFillId(string keyValue, string mainId)
{
try
{
return qualityReportChildService.GetListByFillId(keyValue, mainId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 获取QualityReportChild表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public QualityReportChildEntity GetQualityReportChildEntity(string keyValue)
{
try
{
return qualityReportChildService.GetQualityReportChildEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 判断是否可以上报
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
public string IsCanReport(string keyValue)
{
try
{
return qualityReportChildService.IsCanReport(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
        /// 删除实体数据
        /// </summary>
        /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
qualityReportChildService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, QualityReportChildEntity entity)
{
try
{
qualityReportChildService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveList(string keyValue, List<QualityReportChildEntity> list)
{
try
{
qualityReportChildService.SaveList(keyValue, list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public void UpdateState(string keyValue, int Status)
{
try
{
qualityReportChildService.UpdateState(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 76
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildEntity.cs Bestand weergeven

@@ -0,0 +1,76 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:26
/// 描 述:上报子表
/// </summary>
public class QualityReportChildEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 主表Id
/// </summary>
[Column("MAINID")]
public string MainId { get; set; }
/// <summary>
/// 计算项目Id
/// </summary>
[Column("PROJECTID")]
public string ProjectId { get; set; }
/// <summary>
/// 值
/// </summary>
[Column("VALUE")]
public string Value { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
/// <summary>
/// 计算项类型(变量、常量、符号)
/// </summary>
[NotMapped]
public string CalType { get; set; }

/// <summary>
/// 计算项名称
/// </summary>
[NotMapped]
public string CalName { get; set; }

#endregion
}
}

+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildIBLL.cs Bestand weergeven

@@ -0,0 +1,73 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:26
/// 描 述:上报子表
/// </summary>
public interface QualityReportChildIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<QualityReportChildEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
IEnumerable<QualityReportChildEntity> GetListByFillId(string keyValue, string mainId);
/// <summary>
/// 获取QualityReportChild表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
QualityReportChildEntity GetQualityReportChildEntity(string keyValue);
/// <summary>
/// 判断是否可以上报
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
string IsCanReport(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, QualityReportChildEntity entity);
/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="list"></param>
void SaveList(string keyValue, List<QualityReportChildEntity> list);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateState(string keyValue, int Status);

#endregion

}
}

+ 428
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs Bestand weergeven

@@ -0,0 +1,428 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
    /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
    /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
    /// 创 建:超级管理员
    /// 日 期:2021-06-23 17:26
    /// 描 述:上报子表
    /// </summary>
public class QualityReportChildService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportChildEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
                t.Id,
                t.ProjectId
                ");
strSql.Append("  FROM QualityReportChild t ");
strSql.Append("  WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<QualityReportChildEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
public IEnumerable<QualityReportChildEntity> GetListByFillId(string keyValue, string mainId)
{
try
{
var month = DateTime.Now.Month - 1;
var strSql = new StringBuilder();
strSql.Append(@" select t.*,c.[type] as CalType,c.Name as CalName from QualityReportChild t join QualityReportMain m on t.Mainid=m.id
join QualityReportMain a on t.MainId = a.Id join CalculateProject c on t.ProjectId=c.id ");
strSql.Append($"  WHERE 1=1 and a.FillinFromId='{keyValue}' ");

if (!string.IsNullOrEmpty(mainId))
{
strSql.Append($" and t.MainId='{mainId}'");
}
else
{
strSql.Append($" and year(m.ReportTime)=year(getdate()) and month(m.ReportTime)='{month}'");
}

strSql.Append(" order by t.Sort ");
// 虚拟参数
var dp = new DynamicParameters(new { });
var list = this.BaseRepository("CollegeMIS").FindList<QualityReportChildEntity>(strSql.ToString());
if (list == null || list.Count() <= 0)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var sql =
$@"select c.Id,c.Name,c.[Type],(case c.[Type] when '变量' then '' when '常量' then c.Value when '符号' then c.Name end) as value,b.Sort
from FillinFrom a join FormulaChild b on a.Formula=b.MainId
join CalculateProject c on b.ProjectId=c.id
where a.Id='{keyValue}' order by b.Sort";
var dt = db.FindTable(sql);
QualityReportMainEntity main = new QualityReportMainEntity();
main.Create();
main.FillinFromId = keyValue;
main.ReportTime = DateTime.Now.AddMonths(-1);
main.Status = 0;
db.Insert(main);
for (int i = 0; i < dt.Rows.Count; i++)
{
QualityReportChildEntity entity = new QualityReportChildEntity();
entity.Create();
entity.MainId = main.Id;
entity.ProjectId = dt.Rows[i]["Id"].ToString();
entity.Value = dt.Rows[i]["value"].ToString();
entity.Sort = Convert.ToInt32(dt.Rows[i]["Sort"]);
db.Insert(entity);
}
db.Commit();
return this.BaseRepository("CollegeMIS").FindList<QualityReportChildEntity>(strSql.ToString());
}
else
{
return list;
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
        /// 获取QualityReportChild表实体数据
        /// </summary>
        /// <param name="keyValue">主键</param>
        /// <returns></returns>
public QualityReportChildEntity GetQualityReportChildEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<QualityReportChildEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}



/// <summary>
/// 判断是否允许上报
/// </summary>
/// <param name="keyValue">项目Id</param>
/// <returns></returns>
public string IsCanReport(string keyValue)
{
try
{
if (DateTime.Now.Day >= 15)
{
return "每月1-15日才可填报!";
}

int mouth = DateTime.Now.Month - 1;
var entity = this.BaseRepository("CollegeMIS").FindEntity<FillinFromEntity>(x => x.Id == keyValue);
if (string.IsNullOrEmpty(entity.Formula))
{
return "请先设置公式!";
}

if (entity.FillingCycle == "1")
{
//填报周期--月(每月)
}
else if (entity.FillingCycle == "2")
{
//填报周期--学期((3月、9月))
var fillingTime = entity.FillingTime.Split(',').ToList();
if (!fillingTime.Any(x => Convert.ToInt32(x) + 1 == DateTime.Now.Month))
{
return "当前日期不可进行填报!";
}
}
else if (entity.FillingCycle == "2")
{
//填报周期--年(每年7月)
if (Convert.ToInt32(entity.FillingTime) != DateTime.Now.Month - 1)
{
return "当前日期不可进行填报!";
}
}

var qualityReportMainEntity = this.BaseRepository("CollegeMIS").FindEntity<QualityReportMainEntity>(x => x.FillinFromId == keyValue && x.ReportTime.Value.Month == mouth);
if (qualityReportMainEntity == null)
{
return "";
}
else if (qualityReportMainEntity.Status == 1)
{
return "上报数据已提交,不可重复上报!";
}

return "";
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
        /// 删除实体数据
        /// </summary>
        /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
db.Delete<QualityReportMainEntity>(t => t.Id == keyValue);
var sql = $"delete from QualityReportChild where MainId='{keyValue}'";
db.ExecuteBySql(sql);

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, QualityReportChildEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="list"></param>
public void SaveList(string keyValue, List<QualityReportChildEntity> list)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
var mainId = "";
list = list.OrderBy(x => x.Sort).ToList();
var projectIds = list.Select(x => x.ProjectId).ToList();
var gs = "";
var result = "";
var calculateProjectList = db.FindList<CalculateProjectEntity>(x => projectIds.Contains(x.Id));
foreach (var entity in list)
{
QualityReportChildEntity
model = db.FindEntity<QualityReportChildEntity>(x => x.Id == entity.Id);
model.Value = entity.Value;
db.Update(model);
mainId = model.MainId;

//保存运算结果
//计算项目
var calculateProject = calculateProjectList.Where(x => x.Id == entity.ProjectId).FirstOrDefault();
if (calculateProject.Type == "变量")
{
var value = ToDecimal(entity.Value);
if (value == 0)
{
gs += entity.Value;
}
else
{
gs += value;
}
}
else
{
gs += entity.Value;
}


}

if (!string.IsNullOrEmpty(mainId))
{

//公式运算结果
if (list.Count == 1)
{
result = list.FirstOrDefault().Value;
}
else
{
gs = gs.Replace("(", "(").Replace(")", ")");
if (gs.Contains("%"))
{
gs = gs.Replace("%", "");
var dt = db.FindTable($"select convert(varchar,convert(decimal(18,0),{gs}))+'%' as num ");
result = dt.Rows[0][0].ToString();
}
else
{
var dt = db.FindTable($"select convert(decimal(18,2),{gs}) as num ");
result = dt.Rows[0][0].ToString();
}
}
QualityReportMainEntity main = db.FindEntity<QualityReportMainEntity>(x => x.Id == mainId);
main.Result = result;
db.Update(main);
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


public void UpdateState(string keyValue, int Status)
{
try
{
string sql = $"update QualityReportMain set [Status]='{Status}' where Id='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


#endregion
/// <summary>
///
/// </summary>
/// <returns></returns>
private decimal ToDecimal(string value)
{
try
{
return Convert.ToDecimal(Convert.ToDecimal(value).ToString("f2"));
}
catch
{
return 0;
}
}

}
}

+ 218
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs Bestand weergeven

@@ -0,0 +1,218 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
    /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
    /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
    /// 创 建:超级管理员
    /// 日 期:2021-06-23 17:12
    /// 描 述:上报主表
    /// </summary>
public class QualityReportMainBLL : QualityReportMainIBLL
{
private QualityReportMainService qualityReportMainService = new QualityReportMainService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return qualityReportMainService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportMainEntity> GetList(string queryJson)
{
try
{
return qualityReportMainService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取QualityReportMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public QualityReportMainEntity GetQualityReportMainEntity(string keyValue)
{
try
{
return qualityReportMainService.GetQualityReportMainEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
        /// 删除实体数据
        /// </summary>
        /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
qualityReportMainService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
        /// 保存实体数据(新增、修改)
        /// </summary>
        /// <param name="keyValue">主键</param>
        /// <param name="entity">实体</param>
        /// <returns></returns>
public void SaveEntity(string keyValue, QualityReportMainEntity entity)
{
try
{
qualityReportMainService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void DelProjectByFId(string FillinFromId)
{
try
{
qualityReportMainService.DelProjectByFId(FillinFromId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void EditProjectByFId(string FillinFromId)
{
try
{
qualityReportMainService.EditProjectByFId(FillinFromId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
public QualityReportMainEntity IsFinish(string keyValue)
{
try
{
return qualityReportMainService.IsFinish(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


}
}

+ 104
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainEntity.cs Bestand weergeven

@@ -0,0 +1,104 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:12
/// 描 述:上报主表
/// </summary>
public class QualityReportMainEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 选择上报的项目Id
/// </summary>
[Column("FILLINFROMID")]
public string FillinFromId { get; set; }
/// <summary>
/// 上报时间
/// </summary>
[Column("REPORTTIME")]
public DateTime? ReportTime { get; set; }
/// <summary>
/// 状态 0 草稿,1提交
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// 公式运算结果
/// </summary>
[Column("RESULT")]
public string Result { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.CreateTime=DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.CreateUserId = userinfo.userId;
this.CreateUserName = userinfo.realName;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
/// <summary>
/// 核心模块
/// </summary>
[NotMapped]
public string WorderModule { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[NotMapped]
public string ProjectName { get; set; }
/// <summary>
/// 部门
/// </summary>
[NotMapped]
public string FillingDept { get; set; }
/// <summary>
/// 项目表Id
/// </summary>
[NotMapped]
public string fid { get; set; }
#endregion
}
}

+ 64
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs Bestand weergeven

@@ -0,0 +1,64 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:12
/// 描 述:QualityReportMain
/// </summary>
public interface QualityReportMainIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<QualityReportMainEntity> GetList(string queryJson);
/// <summary>
/// 获取QualityReportMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
QualityReportMainEntity GetQualityReportMainEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, QualityReportMainEntity entity);

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId"></param>
void DelProjectByFId(string FillinFromId);

/// <summary>
/// 项目编辑,将状态改为草稿
/// </summary>
/// <param name="FillinFromId"></param>
void EditProjectByFId(string FillinFromId);

QualityReportMainEntity IsFinish(string keyValue);

#endregion

}
}

+ 281
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs Bestand weergeven

@@ -0,0 +1,281 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-23 17:12
/// 描 述:上报主表
/// </summary>
public class QualityReportMainService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append(@"select b.WorderModule,b.ProjectName,b.FillingDept,b.Id as fid,a.Id,a.ReportTime,a.Status,a.Result,a.CreateUserName from QualityReportMain a join FillinFrom b on a.FillinFromId=b.Id
");

strSql.Append("  WHERE 1=1 and b.[State]=2 and b.IsFlag=0");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["FillInFromId"].IsEmpty())
{
strSql.Append($" AND a.FillInFromId='{queryParam["FillInFromId"].ToString()}' ");
}
if (!queryParam["CreateUserId"].IsEmpty() && queryParam["CreateUserId"].ToString() != "System")
{
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);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportMainEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append(@"select b.WorderModule,b.ProjectName,b.FillingDept,b.Id as fid,a.Id,a.ReportTime,a.Status,a.Result,a.CreateUserName from QualityReportMain a join FillinFrom b on a.FillinFromId=b.Id
");
strSql.Append("  WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["FillInFromId"].IsEmpty())
{
strSql.Append($" AND a.FillInFromId='{queryParam["FillInFromId"].ToString()}' ");
}

return this.BaseRepository("CollegeMIS").FindList<QualityReportMainEntity>(strSql.ToString(), dp).OrderByDescending(x => x.ReportTime);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取QualityReportMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public QualityReportMainEntity GetQualityReportMainEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<QualityReportMainEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<QualityReportMainEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, QualityReportMainEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void DelProjectByFId(string FillinFromId)
{
try
{
UpdateStatusByFId(FillinFromId, 99);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 项目编辑,将状态改为草稿
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void EditProjectByFId(string FillinFromId)
{
try
{
UpdateStatusByFId(FillinFromId, 0);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 修改上报记录为作废状态
/// </summary>
/// <param name="FillinFromId">项目Id</param>
private void UpdateStatusByFId(string FillinFromId, int Status)
{
try
{
string sql = $"update QualityReportMain set [Status]='{Status}' where FillinFromId='{FillinFromId}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

public QualityReportMainEntity IsFinish(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<QualityReportMainEntity>(x => x.FillinFromId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Bestand weergeven

@@ -136,6 +136,10 @@
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" />
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" />
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" />
<Compile Include="EducationalAdministration\FillinFrom\FillinFromBLL.cs" />
<Compile Include="EducationalAdministration\FillinFrom\FillinFromEntity.cs" />
<Compile Include="EducationalAdministration\FillinFrom\FillinFromIBLL.cs" />
<Compile Include="EducationalAdministration\FillinFrom\FillinFromService.cs" />
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolABLL.cs" />
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" />
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.cs" />
@@ -265,10 +269,30 @@
<Compile Include="LR_CodeDemo\WorkOrder\WorkOrderBLL.cs" />
<Compile Include="LR_CodeDemo\WorkOrder\WorkOrderIBLL.cs" />
<Compile Include="LR_CodeDemo\WorkOrder\WorkOrderService.cs" />
<Compile Include="LR_Desktop\CalculateProject\CalculateProjectBLL.cs" />
<Compile Include="LR_Desktop\CalculateProject\CalculateProjectEntity.cs" />
<Compile Include="LR_Desktop\CalculateProject\CalculateProjectIBLL.cs" />
<Compile Include="LR_Desktop\CalculateProject\CalculateProjectService.cs" />
<Compile Include="LR_Desktop\FormulaChild\FormulaChildBLL.cs" />
<Compile Include="LR_Desktop\FormulaChild\FormulaChildEntity.cs" />
<Compile Include="LR_Desktop\FormulaChild\FormulaChildIBLL.cs" />
<Compile Include="LR_Desktop\FormulaChild\FormulaChildService.cs" />
<Compile Include="LR_Desktop\FormulaMain\FormulaMainBLL.cs" />
<Compile Include="LR_Desktop\FormulaMain\FormulaMainEntity.cs" />
<Compile Include="LR_Desktop\FormulaMain\FormulaMainIBLL.cs" />
<Compile Include="LR_Desktop\FormulaMain\FormulaMainService.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRemindEntity.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindBLL.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindIBLL.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindService.cs" />
<Compile Include="LR_Desktop\QualityReportChild\QualityReportChildBLL.cs" />
<Compile Include="LR_Desktop\QualityReportChild\QualityReportChildEntity.cs" />
<Compile Include="LR_Desktop\QualityReportChild\QualityReportChildIBLL.cs" />
<Compile Include="LR_Desktop\QualityReportChild\QualityReportChildService.cs" />
<Compile Include="LR_Desktop\QualityReportMain\QualityReportMainBLL.cs" />
<Compile Include="LR_Desktop\QualityReportMain\QualityReportMainEntity.cs" />
<Compile Include="LR_Desktop\QualityReportMain\QualityReportMainIBLL.cs" />
<Compile Include="LR_Desktop\QualityReportMain\QualityReportMainService.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CardSortManage\SSO_Drag_CardSortManageBLL.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CardSortManage\SSO_Drag_CardSortManageEntity.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CardSortManage\SSO_Drag_CardSortManageIBLL.cs" />


Laden…
Annuleren
Opslaan