From 8c3ec683bf36a3c04ac721200544ea65289bfe45 Mon Sep 17 00:00:00 2001 From: Nakorn Rientrakrunchai Date: Fri, 28 Feb 2020 18:36:54 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=20=E0=B9=82=E0=B8=84=E0=B8=A7=E0=B8=95=E0=B9=89=E0=B8=B2=20?= =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B9=80=E0=B8=95?= =?UTF-8?q?=E0=B8=B4=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...onement@eva_adjust_postponement_quota.xlsx | Bin 10775 -> 10589 bytes ...a_adjust_postponement_detail_quota_02.xlsx | Bin 11202 -> 11451 bytes ...eva_adjust_postponement_quotaInputModel.cs | 2 + .../eva_adjust_postponement_quotaService.cs | 41 +++++++++++++----- .../eva_adjust_postponement_quotaViewModel.cs | 2 + .../eva_adjust_postponement_quota_d.cshtml | 10 ++++- ...ust_postponement_detail_quota_02_inline.js | 8 ++-- .../eva_adjust_postponement_quota_d.js | 14 +++++- 8 files changed, 58 insertions(+), 19 deletions(-) diff --git a/EXCEL/eva_adjust_postponement@eva_adjust_postponement_quota.xlsx b/EXCEL/eva_adjust_postponement@eva_adjust_postponement_quota.xlsx index 62d8854c288769e99b77507b0dfa7bd313251363..d4412c0834ce3942064c95063c7d16b295d23002 100644 GIT binary patch delta 3449 zcmZ9PXE+-S_r@cL+PkP7dsnLjReOcns;7^+oZp?}Fl$%$nVHc>iMW>)ze0HeTP4GKURpf@FHsdm7vd8qSTv?jm^gjX#PvxL-WEyJLUV zys5HBZ^dO_yXj}%?yJc$;oQqek8g`acJ+!2C@bp?JIsgOZuba^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*iCj$9`x)%^Kn^M-Hv-Ffl=6UvbnX@+>TC<8NILmkIE^rt#>QK zyDS~oxtsew<67#@I-VR94j#oA^atHd~NNdSCM)a=^CdX?)5Q2&2m4W^p zbDc>6fH4jL0P@=~{+UqBA}nV{{?AzcO=yGuwi$uD|Gg#w n0ATsM{L%ay2SjpUa`}`9$?sv7`3wl5To`G7PLesEzd8Q_gbCB7 diff --git a/EXCEL/eva_adjust_postponement_detail@eva_adjust_postponement_detail_quota_02.xlsx b/EXCEL/eva_adjust_postponement_detail@eva_adjust_postponement_detail_quota_02.xlsx index 5371ed7f2bcabbb52f87c40bfba2c6f49b6c566a..1395cb8c9bd12ef2282d1494ff6334025e818d29 100644 GIT binary patch delta 1751 zcmV;|1}OQ$SG!rTSr7z5x?i`mT@Wh)5d;0_7cX5bqODAb$_=uHTuGCe5l#Vyv*;0I z0|AqhO%+W7Cm55Q6*vOx{Ik{-9s+;V0)H-#1ONbB5dZ)U0001ZY%g7l56kT}Dc`R0cl((@08idzq~X<022+q-gYi;BE1nAjxtkN1DsWM*5f zB%&a^7BsPsw6#AhzWrw2$|I+%Ev3=|6{1b-t(3cK$7%B|tw?)S@2CJySvM7tFl;tX zyK5*ZS`@0dH%=4PpjU^!nfI(3Nsc1JNC7i7rhSN$?F@EgGzLMLLriExKRlcuiDwe%$#lSP1 z=pc*^%*eKjtijSv!wA3Fj$Y-+oo2I6>@0KDbE&0^fPP+CD&dAxF;-FBfQQ&I&}aNmZViDCmI} zkm&%Gte=yEsnR`yiwRWF)C)XZ*G&Nn@KjgmV@F!dIV~ktbFo zvZ)2(SQ96Su_P>9SfhW5Ew`}7PK9{}9CgUhL~r4u`3j4Ia?x~vd_sKD{LZ=m+_$&F z+{YWTms8GH80VkLa|(Tk_Mx=IzRD{35sCwLRa~^EPe_0N*`=!+fK8K70P;p5XAGeO zG{O?S3yXCq-vs3ipnTgJJOTPi+9JChKW5-MZiW2_92rJSRs4U$_=dBMsAwm!n8SYA z4Xs}qvb(1Tr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mp`o(~S8FGn-mKQ^bm0Zw&F_OZ#(#KW*q0D++Mh0K4(|}v7Tbc~ z^tu=iga*F7WB~RM`y!Zm*P-t@>BRG$>5R;s`D_w8Y3MKq>)CX58>Zm^d-yu+zUTUW z^Ncg#!=+{=LxVQ!jM4xK@n~@3AcY{CVvByp#u~Jz>b`sH?>vVe}|{tV#CEJ-vUkv zxy1@Rm)vvQ0%J1}(FrNVfHZqsbpRh6hiO9bkJp1$?$3r!897zyk0$JNiaTaY z(Tjuo;L5?+G)>Y>x)>op#qX=9mu}U#)a|VVpdyok2@BlUwz!k3)EORC+Ur%^`Bgad zrUZF^EZp9h+WHLtMV11qi{1l4Mj;IAqo0+x$;0D%iHek@BqlT_vo)n`GG)`*M?3kV zzYW(H)M@^|#57LlYjVRVVI&<9&w!%Kefc4ZZvc~_0~E8nC1wQ#<=aVilO-!X3agOg zwvqz?0IUj=Y%4Jwz>b`&ki NlPn?zhA034002qu#Y+GH diff --git a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaInputModel.cs b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaInputModel.cs index 4659e92..460a501 100644 --- a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaInputModel.cs +++ b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaInputModel.cs @@ -30,6 +30,8 @@ namespace TodoAPI2.Models public int? managed_by { get; set; } + public decimal? limit { get; set; } + public string active_mode { get; set; } public List adjust_postponement_detail_quota_02_model; diff --git a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs index 54d9aa9..49104f2 100644 --- a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs +++ b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs @@ -118,6 +118,7 @@ namespace TodoAPI2.Models limit_frame_quota = m_eva_adjust_postponement_quota.limit_frame_quota, command_no = m_eva_adjust_postponement_quota.command_no, managed_by = m_eva_adjust_postponement_quota.managed_by, + limit = m_eva_adjust_postponement_quota.limit, managed_by_external_linkage_external_name = fk_external_linkageResult7.fullname, @@ -170,25 +171,30 @@ namespace TodoAPI2.Models { var entity = GetEntity(model); entity.id = GetNewPrimaryKey(); + entity.limit_quota = 0; + entity.limit_frame_quota = 0; - var all_emp = (from i in emp.GetListByemployee_type(null, null) select i.id).ToList(); - AddMultipleDetail(entity.id, all_emp, entity.fiscal_year, entity.theRound); + var all_emp = emp.GetListByemployee_type(null, null); + var all_emp_id_list = (from i in all_emp select i.id).ToList(); + entity.limit = AddMultipleDetail(entity.id, all_emp_id_list, entity.fiscal_year, entity.theRound, all_emp); var inserted = _repository.Insert(entity); return Get(inserted.id); } - public string AddMultipleDetail(int? adjust_postponement_quota_id, List model, int? fiscal_year, int? theRound) + public decimal AddMultipleDetail(int? adjust_postponement_quota_id, List model, int? fiscal_year, int? theRound, + List all_emp) { + decimal sum_salary = 0; + if (!adjust_postponement_quota_id.HasValue) { - return "0"; + return sum_salary; } else { int k = 0; - var all_emp = emp.GetListByemployee_type(null, null); var cylinder = (from z in _repository.Context.eva_salary_cylinder select z).ToList(); int newkey = GetNewPrimaryKeyDetail(); @@ -197,7 +203,7 @@ namespace TodoAPI2.Models where x.adjust_postponement_quota_id == adjust_postponement_quota_id select x.employee_id).ToList(); - decimal sum_salary = 0; + foreach (var i in model) { @@ -205,6 +211,12 @@ namespace TodoAPI2.Models { if (!checkExistEmployeeInInternal(i, ex)) { + var theemp = (from x in all_emp where x.id == i select x).FirstOrDefault(); + if (theemp.salary.HasValue) + { + sum_salary += theemp.salary.Value; + } + var q = (from p in _repository.Context.eva_adjust_postponement_detail where p.employee_id == i && p.eva_adjust_postponement.fiscal_year == fiscal_year @@ -220,8 +232,6 @@ namespace TodoAPI2.Models } else { - var theemp = (from x in all_emp where x.id == i select x).FirstOrDefault(); - var r = new eva_adjust_postponement_detailEntity(); r.id = newkey; r.adjust_postponement_id = null; @@ -270,8 +280,7 @@ namespace TodoAPI2.Models } } - //_repository.Context.SaveChanges(); - return k.ToString(); + return sum_salary; } } @@ -315,6 +324,7 @@ namespace TodoAPI2.Models existingEntity.limit_frame_quota = model.limit_frame_quota; existingEntity.command_no = model.command_no; existingEntity.managed_by = model.managed_by; + // limit quota02.UpdateMultiple(model.adjust_postponement_detail_quota_02_model); @@ -341,7 +351,7 @@ namespace TodoAPI2.Models existingEntity.limit_frame_quota = i.limit_frame_quota; existingEntity.command_no = i.command_no; existingEntity.managed_by = i.managed_by; - + // limit _repository.UpdateWithoutCommit(i.id.Value, existingEntity); } @@ -385,6 +395,15 @@ namespace TodoAPI2.Models select i; _repository.Context.RemoveRange(data); + var data2 = from i in _repository.Context.eva_adjust_postponement_detail + where i.adjust_postponement_quota_id == id && i.adjust_postponement_id != null + select i; + + foreach(var i in data2) + { + i.adjust_postponement_quota_id = null; + } + _repository.Delete(id); return; diff --git a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaViewModel.cs b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaViewModel.cs index 92570f3..d40a1d6 100644 --- a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaViewModel.cs +++ b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaViewModel.cs @@ -30,6 +30,8 @@ namespace TodoAPI2.Models public int? managed_by { get; set; } + public decimal? limit { get; set; } + public string managed_by_external_linkage_external_name { get; set; } } diff --git a/Views/eva_adjust_postponement_quotaView/eva_adjust_postponement_quota_d.cshtml b/Views/eva_adjust_postponement_quotaView/eva_adjust_postponement_quota_d.cshtml index 467195f..e03d41e 100644 --- a/Views/eva_adjust_postponement_quotaView/eva_adjust_postponement_quota_d.cshtml +++ b/Views/eva_adjust_postponement_quotaView/eva_adjust_postponement_quota_d.cshtml @@ -30,6 +30,7 @@
+
@@ -56,12 +57,12 @@
- +
- +
@@ -69,6 +70,11 @@
+ +
+ + +
diff --git a/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js b/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js index 43add71..8ef7d33 100644 --- a/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js +++ b/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js @@ -18,7 +18,7 @@ $("#eva_adjust_postponement_detail_quota_02_emp_fullname_" + i).text(""); $("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text(""); $("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text(""); $("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(""); -$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).val(""); +$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(""); } @@ -41,7 +41,7 @@ $("#eva_adjust_postponement_detail_quota_02_emp_fullname_" + i).text(data.emp_fu $("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text(data.emp_position); $("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text(data.emp_level); $("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(data.total_score); -$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).val(data.eva_result); +$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(data.eva_result); } @@ -65,7 +65,7 @@ eva_adjust_postponement_detail_quota_02Object.emp_fullname = obj.find("#eva_adju eva_adjust_postponement_detail_quota_02Object.emp_position = obj.find("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text(); eva_adjust_postponement_detail_quota_02Object.emp_level = obj.find("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text(); eva_adjust_postponement_detail_quota_02Object.total_score = obj.find("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(); -eva_adjust_postponement_detail_quota_02Object.eva_result = obj.find("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).val(); +eva_adjust_postponement_detail_quota_02Object.eva_result = obj.find("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(); eva_adjust_postponement_detail_quota_02Object.active_mode = obj.find("#isActive_" + i + "_eva_adjust_postponement_detail_quota_02").val(); return eva_adjust_postponement_detail_quota_02Object; @@ -103,7 +103,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) { tag += '

'; tag += '

'; tag += '

'; - tag += ''; + tag += '

'; tag += '

'; tag += '

'; diff --git a/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js b/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js index 7883a8c..5fb93b3 100644 --- a/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js +++ b/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js @@ -11,8 +11,9 @@ $("#eva_adjust_postponement_quota_theRound").val(data.theRound); $("#eva_adjust_postponement_quota_limit_quota").val(data.limit_quota); $("#eva_adjust_postponement_quota_limit_frame_quota").val(data.limit_frame_quota); $("#eva_adjust_postponement_quota_command_no").val(data.command_no); +$("#eva_adjust_postponement_quota_limit").val(data.limit); DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_quota_managed_by"), data, "id", "fullname", "item_managed_by", data.managed_by); - +console.log($("#eva_adjust_postponement_quota_limit").val()); } function eva_adjust_postponement_quota_GetFromForm() { @@ -25,6 +26,7 @@ function eva_adjust_postponement_quota_GetFromForm() { eva_adjust_postponement_quotaObject.limit_frame_quota = $("#eva_adjust_postponement_quota_limit_frame_quota").val(); eva_adjust_postponement_quotaObject.command_no = $("#eva_adjust_postponement_quota_command_no").val(); eva_adjust_postponement_quotaObject.managed_by = $("#eva_adjust_postponement_quota_managed_by").val(); + eva_adjust_postponement_quotaObject.limit = $("#eva_adjust_postponement_quota_limit").val(); var eva_adjust_postponement_detail_quota_02 = []; $('#eva_adjust_postponement_detail_quota_02Body tr').each(function () { @@ -113,6 +115,14 @@ function eva_adjust_postponement_quota_GoDelete(a) { -//================= Multi-Selection Function ========================================= +//================= Control Function ========================================= +function Oneva_adjust_postponement_quota_limit_frame_quotaChange() +{ + var limit_frame_quota = parseFloat($("#eva_adjust_postponement_quota_limit_frame_quota").val()); + var limit = parseFloat($("#eva_adjust_postponement_quota_limit").val()); + limit_quota = limit_frame_quota * limit / 100; + + $("#eva_adjust_postponement_quota_limit_quota").val(limit_quota); +} \ No newline at end of file