Pārlūkot izejas kodu

党员自评接口

yanshi
zhangli pirms 3 gadiem
vecāks
revīzija
e0d84cb1a0
12 mainītis faili ar 4490 papildinājumiem un 4050 dzēšanām
  1. +17
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml
  2. +34
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_PartyMemberGroup/Form.js
  4. +25
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_PartyMemberGroup/Index.js
  5. +59
    -11
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs
  6. +4191
    -3984
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluatingIndicator/DT_EvaluatingIndicatorEntity.cs
  8. +1
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluatingIndicator/DT_EvaluatingIndicatorService.cs
  9. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataBLL.cs
  10. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs
  11. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataIBLL.cs
  12. +66
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs

+ 17
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml Parādīt failu

@@ -2,7 +2,7 @@
ViewBag.Title = "评价考核表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@@ -10,17 +10,26 @@
<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>
<div id="EvaluatingIndicatorId"></div>
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考核内容</div>
<div id="Assessment"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">行为标准</div>
<div id="ConductRequirements"></div>
</div>*@
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">被考核党员</div>
<div id="BeAssessed"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类型</div>
<input id="ScoreType" type="text" class="form-control" />
<select id="ScoreType" class="form-control">
<option value="">==请选择==</option>
<option value="1">党员自评</option>
<option value="2">党小组长评</option>
</select>
<div></div>
</div>
</div>
</div>
@@ -32,9 +41,9 @@
</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_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_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>


+ 34
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js Parādīt failu

@@ -16,8 +16,10 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#EvaluatingIndicatorId').lrDataSourceSelect({ code: 'PartyMember',value: 'id',text: 'name' });
$('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember',value: 'id',text: 'name' });
//$('#EvaluatingIndicatorId').lrDataSourceSelect({ code: 'PartyMember',value: 'id',text: 'name' });
$('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember', value: 'id', text: 'name' });
//$('#ScoreType').lrDataItemSelect({ code: 'ScoringPersonnel' });

// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -71,20 +73,25 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/GetPageList',
headData: [
{ label: "考核指标项", name: "EvaluatingIndicatorId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}},
{ label: "年度", name: "ScoreYear", width: 100, align: "left" },
{ label: "季度", name: "ScoreQuarter", width: 100, align: "left" },
{
label: "考核内容", name: "Assessment", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'EvaluationAssessment',
callback: function (_data) {
callback(_data.text);
}
});
}

},
{ label: "行为规范要求", name: "ConductRequirements", width: 200, align: "left" },
{ label: "被考核党员", name: "BeAssessed", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
@@ -108,12 +115,21 @@ var bootstrap = function ($, learun) {
});
}},
{ label: "分值", name: "Score", width: 100, align: "left"},
{ label: "类型", name: "ScoreType", width: 100, align: "left"},
{ label: "年度", name: "ScoreYear", width: 100, align: "left"},
{ label: "季度", name: "ScoreQuarter", width: 100, align: "left"},
{
label: "类型", name: "ScoreType", width: 100, align: "left",
formatter: function(value, row) {
if (value == '1') {
return '党员自评';
}
else if (value == '2') {
return '党小组长评';
}
}
},
],
mainId:'Id',
isPage: true
isPage: true,
sidx: 'BeAssessed Asc,ScoreType ASC,Assessed ASC,EOrder Asc',
});
page.search();
},


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_PartyMemberGroup/Form.js Parādīt failu

@@ -19,6 +19,7 @@ var bootstrap = function ($, learun) {
$('#GroupLeader').lrselect(
{
allowSearch: true,
type: 'multiple',
url: top.$.rootUrl + '/PersonnelManagement/PartyMember/GetList',
param: { strWhere: " CheckStatus=1 " },
value: "ID",


+ 25
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_PartyMemberGroup/Index.js Parādīt failu

@@ -77,15 +77,32 @@ var bootstrap = function ($, learun) {
{
label: "组长", name: "GroupLeader", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
if (value.indexOf(',') != -1) {
var content = '';
var arr = value.split(',');
for (var i = 0; i < arr.length; i++) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember',
key: arr[i],
keyId: 'id',
callback: function (_data) {
content += _data['name'] + ',';
}
});

}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
}
},
{


+ 59
- 11
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs Parādīt failu

@@ -18,11 +18,16 @@ namespace Learun.Application.WebApi.Modules
{
//获取党员小组列表
Get["/getpartymembergrouplist"] = GetPartyMemberGroupList;
//评价考核 下发评价
Post["/addevaluationdata"] = AddEvaluationData;

//党员自评返回list
Get["/getevaluationlistforzp"] = GetEvaluationListForZP;
//评价考核 下发评价
Post["/savelist"] = SaveList;
}
//党员小组
private DT_PartyMemberGroupIBLL partyMemberGroupIBLL = new DT_PartyMemberGroupBLL();

//评价考核表
private DT_EvaluationDataIBLL dT_EvaluationDataIBLL = new DT_EvaluationDataBLL();

@@ -44,18 +49,18 @@ namespace Learun.Application.WebApi.Modules
/// <returns></returns>
public Response AddEvaluationData(dynamic _)
{
//AddEvaluationEntity parameter = this.GetReqData<AddEvaluationEntity>();
//if (parameter == null)
//{
// return Fail("参数不可空!");
//}
AddEvaluationEntity parameter = this.GetReqData<AddEvaluationEntity>();
if (parameter == null)
{
return Fail("参数不可空!");
}

//年度
string scoreYear = "2021";//parameter.ScoreYear;
string scoreYear = parameter.ScoreYear;//"2021";//
//季度
string scoreQuarter = "4";// parameter.ScoreQuarter;
string scoreQuarter = parameter.ScoreQuarter;//"4";//
//小组Id
string partyMemberGroupId = "f4f8df5e-021b-4739-b006-6c25f04c2723";//parameter.PartyMemberGroupId;
string partyMemberGroupId = parameter.PartyMemberGroupId;//"f4f8df5e-021b-4739-b006-6c25f04c2723";//

if (string.IsNullOrEmpty(scoreYear))
{
@@ -70,12 +75,46 @@ namespace Learun.Application.WebApi.Modules
return Fail("请选择小组!");
}
dT_EvaluationDataIBLL.AddEvaluationData(scoreYear, scoreQuarter, partyMemberGroupId);
return Success("已下发!");
}


/// <summary>
/// 党员自评返回题目
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetEvaluationListForZP(dynamic _)
{
dynamic parameter = this.GetReqData<dynamic>();
if (parameter == null)
{
return Fail("参数不可空!");
}

DT_EvaluationDataWhere where = new DT_EvaluationDataWhere();
//被考核党员Id
where.beAssessed = parameter.BeAssessed;
//年份 季度
where.scoreYear = parameter.ScoreYear;
where.scoreQuarter = parameter.ScoreQuarter;
where.ScoreType = 1;
var list = dT_EvaluationDataIBLL.GetListByWhere(where);
return Success(list);
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveList(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
List<DT_EvaluationDataEntity> list = parameter.strEntity.ToObject<List<DT_EvaluationDataEntity>>();
dT_EvaluationDataIBLL.SaveList(list);
return Success("保存成功!");
}

#region 私有类

@@ -88,6 +127,15 @@ namespace Learun.Application.WebApi.Modules
public string ScoreQuarter { get; set; }
public string PartyMemberGroupId { get; set; }
}

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
//public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion
}
}

+ 4191
- 3984
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluatingIndicator/DT_EvaluatingIndicatorEntity.cs Parādīt failu

@@ -37,8 +37,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <summary>
/// 分值
/// </summary>
[Column("SCORE")]
public int? Score { get; set; }
[Column("MAXSCORE")]
public decimal MaxScore { get; set; }
/// <summary>
/// 评分标准
/// </summary>


+ 1
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluatingIndicator/DT_EvaluatingIndicatorService.cs Parādīt failu

@@ -32,14 +32,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Assessment,
t.ConductRequirements,
t.CRRemark,
t.Score,
t.ScoringCriteria,
t.ScoringPersonnel,
t.EOrder
t.*
");
strSql.Append(" FROM DT_EvaluatingIndicator t ");
strSql.Append(" WHERE 1=1 ");


+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataBLL.cs Parādīt failu

@@ -67,6 +67,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 自评 获取数据
/// </summary>
/// <param name="beAssessed"></param>
/// <param name="scoreYear"></param>
/// <param name="scoreQuarter"></param>
/// <returns></returns>
public IEnumerable<DT_EvaluationDataEntity> GetListByWhere(DT_EvaluationDataWhere where)
{
try
{
return dT_EvaluationDataService.GetListByWhere(where);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据
@@ -119,6 +144,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

public void SaveList(List<DT_EvaluationDataEntity> list)
{
try
{
dT_EvaluationDataService.SaveList(list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 下发评价


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs Parādīt failu

@@ -102,7 +102,56 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
#endregion
#region 扩展字段
/// <summary>
/// 指标项内容
/// </summary>
[NotMapped]
public string Assessment { get; set; }
/// <summary>
/// 行为规范要求
/// </summary>
[NotMapped]
public string ConductRequirements { get; set; }
/// <summary>
/// 行为规范要求描述
/// </summary>
[NotMapped]
public string CRRemark { get; set; }
/// <summary>
/// 最高分值
/// </summary>
[NotMapped]
public decimal MaxScore { get; set; }
/// <summary>
/// 评分标准
/// </summary>
[NotMapped]
public string ScoringCriteria { get; set; }

#endregion
}

public class DT_EvaluationDataWhere
{
/// <summary>
/// 被考核党员
/// </summary>
public string beAssessed { get; set; }

/// <summary>
/// 年度
/// </summary>
public int scoreYear { get; set; }
/// <summary>
/// 季度
/// </summary>
public int scoreQuarter { get; set; }
/// <summary>
/// 类型 1党员自评 2 党小组长
/// </summary>
public int ScoreType { get; set; }

}

}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataIBLL.cs Parādīt failu

@@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
/// <returns></returns>
DT_EvaluationDataEntity GetDT_EvaluationDataEntity(string keyValue);
IEnumerable<DT_EvaluationDataEntity> GetListByWhere(DT_EvaluationDataWhere where);
#endregion

#region 提交数据
@@ -42,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, DT_EvaluationDataEntity entity);
void SaveList(List<DT_EvaluationDataEntity> list);

/// <summary>
/// 下发评价


+ 66
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs Parādīt failu

@@ -33,16 +33,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.EvaluatingIndicatorId,
t.BeAssessed,
t.Assessed,
t.Score,
t.ScoreType,
t.ScoreYear,
t.ScoreQuarter
t.*,
e.Assessment as Assessment,e.ConductRequirements as ConductRequirements
");
strSql.Append(" FROM DT_EvaluationData t ");
strSql.Append(" join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -77,6 +72,34 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public IEnumerable<DT_EvaluationDataEntity> GetListByWhere(DT_EvaluationDataWhere where)
{
try
{
string sql = "select t.*,e.Assessment,e.ConductRequirements,e.CRRemark,e.MaxScore,e.ScoringCriteria FROM DT_EvaluationData t join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id where 1=1 ";

sql += $" and t.ScoreType='{where.ScoreType}' and t.BeAssessed='{where.beAssessed}' and t.ScoreYear='{where.scoreYear}' and t.ScoreQuarter='{where.scoreQuarter}'";

return this.BaseRepository("CollegeMIS").FindList<DT_EvaluationDataEntity>(sql).OrderBy(x => x.EOrder);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取DT_EvaluationData表实体数据
/// </summary>
@@ -161,6 +184,38 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}


public void SaveList(List<DT_EvaluationDataEntity> list)
{
var db = this.BaseRepository("CollegeMIS");
try
{
foreach (var model in list)
{
if (!string.IsNullOrEmpty(model.Id))
{
string sql = $"update DT_EvaluationData set Score='{model.Score}' where Id='{model.Id}'";

db.ExecuteBySql(sql);
}
}

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

/// <summary>
/// 下发评价
/// </summary>
@@ -182,10 +237,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
//评价指标
var DT_EvaluatingIndicator = db.FindList<DT_EvaluatingIndicatorEntity>().OrderBy(x => x.EOrder)
.OrderBy(x => x.Assessment);
if (partyMemberGroup != null)
{
//成员
//成员+组长
var partyMemberList = partyMemberGroup.PartyMember?.Split(',').Distinct().ToList();
//组长
var groupLeaderList = partyMemberGroup.GroupLeader?.Split(',').Distinct().ToList();
@@ -208,7 +263,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
db.Insert(entity);

//组长评
if (EvaluatingIndicator.ScoringPersonnel.Contains(","))
if (EvaluatingIndicator.ScoringPersonnel.Contains(",") && !groupLeaderList.Contains(item))
{
foreach (var groupLeader in groupLeaderList)
{


Notiek ielāde…
Atcelt
Saglabāt