Ver código fonte

党员自评提交功能修复

yanshi
zhangli 2 anos atrás
pai
commit
e6d9d996be
3 arquivos alterados com 10 adições e 8 exclusões
  1. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/partyevaluatzp/partyevaluatzp.js
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs
  3. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs

+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/partyevaluatzp/partyevaluatzp.js Ver arquivo

@@ -112,6 +112,7 @@
// learun.nav.go({ path: 'PersonnelManagement/CommunityInfo/form', title: '详情', type: 'right', param: { keyValue: item.Id } });
// },
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
console.log('item',item);
var status=item.Status;
if(status == '-1')
{
@@ -126,7 +127,7 @@
learun.layer.confirm('确定要提交该项数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在提交...');
learun.httppost(config.webapi + 'learun/adms/evaluatingindicator/submitevaluationforzp', {Assessed:item.BeAssessed,Status:1}, (data) => {
learun.httppost(config.webapi + 'learun/adms/evaluatingindicator/submitevaluationforzp', {Id:item.Id,Status:1}, (data) => {
if (data) {// 提交数据成功
page.grid.reload();
}


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs Ver arquivo

@@ -152,7 +152,7 @@ namespace Learun.Application.WebApi.Modules
public Response SubmitEvaluationForZP(dynamic _)
{
ReqSubmitEvaluationZP parameter = this.GetReqData<ReqSubmitEvaluationZP>();
dT_EvaluationDataIBLL.UpdateStatusForZP(parameter.Assessed, parameter.Status);
dT_EvaluationDataIBLL.UpdateStatusForZP(parameter.Id, parameter.Status);
return Success("保存成功!");
}

@@ -223,7 +223,8 @@ namespace Learun.Application.WebApi.Modules

private class ReqSubmitEvaluationZP
{
public string Assessed { get; set; }
//public string Assessed { get; set; }
public string Id { get; set; }
/// <summary>
/// 1 提交,2通过,3未通过
/// </summary>


+ 5
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs Ver arquivo

@@ -266,7 +266,7 @@ on k.Assessment=e.Assessment
/// </summary>
/// <param name="Assessed"></param>
/// <param name="Status">1 提交,2通过,3未通过</param>
public void UpdateStatusForZP(string Assessed, int Status)
public void UpdateStatusForZP(string Id, int Status)
{
var db = this.BaseRepository("CollegeMIS");
try
@@ -276,21 +276,21 @@ on k.Assessment=e.Assessment
{
//提交 修改主表自评分值
string updSql = $@" update DT_EvaluationDataMain set ScoreZP=(
select MAX(Score) from DT_EvaluationData where Assessed = '{Assessed}' and ScoreType = 1
select SUM(Score) from DT_EvaluationData where MainId = '{Id}' and ScoreType = 1
)
where BeAssessed = '{Assessed}'";
where Id = '{Id}'";

db.ExecuteBySql(updSql);
}
else if (Status == 3)
{
//审核未通过 修改主表 自评分值为NULL
string updSql = $@" update DT_EvaluationDataMain set ScoreZP=NULL where BeAssessed = '{Assessed}'";
string updSql = $@" update DT_EvaluationDataMain set ScoreZP=NULL where Id = '{Id}'";
db.ExecuteBySql(updSql);
Status = 0;
}
string sql =
$"update DT_EvaluationData set Status='{Status}' where ScoreType=1 and Assessed='{Assessed}'";
$"update DT_EvaluationData set Status='{Status}' where ScoreType=1 and MainId = '{Id}'";
db.ExecuteBySql(sql);

db.Commit();


Carregando…
Cancelar
Salvar