|
@@ -1,14 +1,11 @@
|
|
|
package com.rf.psychological.rest;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.rf.psychological.base.rest.BaseController;
|
|
|
import com.rf.psychological.plan.dao.model.HisTestPlanEntry;
|
|
|
import com.rf.psychological.plan.dao.model.TestPlanContendEntity;
|
|
|
-import com.rf.psychological.plan.dao.model.TestPlanEntity;
|
|
|
import com.rf.psychological.plan.service.HisTestPlanService;
|
|
|
import com.rf.psychological.plan.service.TestPlanContendService;
|
|
|
-import com.rf.psychological.plan.service.TestPlanService;
|
|
|
import com.rf.psychological.plan.service.TestPlanUserService;
|
|
|
import com.rf.psychological.scale.dao.model.ScaleMarksEntity;
|
|
|
import com.rf.psychological.scale.service.ScaleMarksService;
|
|
@@ -185,4 +182,27 @@ public class ReportAnalysisController extends BaseController {
|
|
|
return fail();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/completionStatus")
|
|
|
+ @ApiOperation(value = "计划完成占比数据")
|
|
|
+ @SafetyProcess
|
|
|
+ public Result completionStatus(@Param(value = "planId") String planId,@Param(value = "structureNo") String structureNo){
|
|
|
+ try {
|
|
|
+ HisTestPlanEntry plan = hisTestPlanService.findById(planId);
|
|
|
+ if (plan== null){
|
|
|
+ return fail("计划不存在请确认,请联系管理员");
|
|
|
+ }
|
|
|
+ //首先获取到计划下参与总人数
|
|
|
+ if (StringUtils.isEmpty(structureNo)){
|
|
|
+ structureNo = "%";
|
|
|
+ }
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("0",planUserService.countByCompletionStatus(planId,structureNo,plan.getInstitutionNo(),"0"));
|
|
|
+ map.put("1",planUserService.countByCompletionStatus(planId,structureNo,plan.getInstitutionNo(),"9"));
|
|
|
+ return success(map);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error(e.getMessage());
|
|
|
+ return fail();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|