供应商评估记录表·根据实际评分划分实际级别

This commit is contained in:
zengweihai 2024-11-27 14:09:31 +08:00
parent 6688919004
commit d8d57f2f81
1 changed files with 5 additions and 2 deletions

View File

@ -30,11 +30,14 @@ public class SupEvalRecordReportListPlugin extends SupEvalRecReportNewList {
//
DataSet finish_avg = finish.groupBy(new String[]{"listsupplier"}).avg("listevalscore").finish();
DataSet select = finish_avg.select("listsupplier as listsupplier1", "listevalscore as qeug_avgscore");
DataSet select = finish_avg.executeSql("select listsupplier as listsupplier1, listevalscore as qeug_avgscore,(case when listevalscore < 60 then '待淘汰供应商' when listevalscore >= 60 and listevalscore < 80 then '合格供应商' when listevalscore >= 80 and listevalscore < 90 then '优秀供应商' else '战略供应商' end) as qeug_level");
System.out.println("tesT");
//(case when qeug_avgscore < 60 then '待淘汰供应商' when qeug_avgscore >= 60 and qeug_avgscore < 80 then '合格供应商' when qeug_avgscore >= 80 and qeug_avgscore < 90 then '优秀供应商' else '战略供应商' end) as qeug_level
DataSet evalTaskSetEntry = QueryServiceHelper.queryDataSet("resm_evaltask_new", "resm_evaltask_new", selectFieldInResm, evalTaskEntryFilterS, (String)null);
JoinDataSet join = evalTaskSetEntry.join(select, JoinType.LEFT);
DataSet result = join.on("listsupplier", "listsupplier1").select("listsuppliergroup", "listsupplier", "listevalorg", "listproject_category", "listproject", "listevaltask", "listevaltype", "listcontract", "listevalmodel", "listyear", "listduringeval", "listevaldate", "listevalscore", "qeug_avgscore", "listevalgrade", "description", "evaldetailid","evaltaskid").finish();
DataSet result = join.on("listsupplier", "listsupplier1").select("listsuppliergroup", "listsupplier", "listevalorg", "listproject_category", "listproject", "listevaltask", "listevaltype", "listcontract", "listevalmodel", "listyear", "listduringeval", "listevaldate", "listevalscore", "listevalgrade", "qeug_avgscore","qeug_level","description", "evaldetailid","evaltaskid").finish();
return result.orderBy(new String[]{"listsupplier desc"});
}