|
@@ -9,7 +9,6 @@ import com.sky.ioc.entity.params.IocTimeRange;
|
|
|
import com.sky.ioc.mapper.FitnesMapper;
|
|
|
import com.sky.ioc.service.fitness.HealthService;
|
|
|
import com.sky.ioc.tool.DateUtil;
|
|
|
-import com.sky.ioc.tool.GeneralMethod;
|
|
|
import com.sky.ioc.tool.ReturnMsg;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -40,7 +39,9 @@ public class HealthServiceImpl implements HealthService {
|
|
|
ThreadLocalRandom random = ThreadLocalRandom.current();
|
|
|
Integer totalPerson = fitnesMapper.getTotalPersonByCompanyIdAndDeptId(iocParam,1);
|
|
|
Integer totalHealthPerson = fitnesMapper.getTotalPersonByCompanyIdAndDeptIdAndFitnesType(iocParam,1);
|
|
|
- Integer totalSubHealthPerson = fitnesMapper.getTotalPersonByCompanyIdAndDeptIdAndFitnesType(iocParam,2);
|
|
|
+// Integer totalSubHealthPerson = fitnesMapper.getTotalPersonByCompanyIdAndDeptIdAndFitnesType(iocParam,2);
|
|
|
+ // 体检转化率
|
|
|
+ Integer convertPercent = 0;
|
|
|
double compare = random.nextDouble(-1, 1);
|
|
|
compare = Double.parseDouble(decimalFormat.format(compare));
|
|
|
objects.get(0).put("value",totalPerson);
|
|
@@ -49,9 +50,12 @@ public class HealthServiceImpl implements HealthService {
|
|
|
objects.get(1).put("value",totalHealthPerson);
|
|
|
objects.get(1).put("compare",compare);
|
|
|
|
|
|
- objects.get(2).put("value",totalSubHealthPerson);
|
|
|
+ if (totalPerson>0) {
|
|
|
+ convertPercent = random.nextInt(70,95);
|
|
|
+ }
|
|
|
+ objects.get(2).put("value", convertPercent);
|
|
|
objects.get(2).put("compare",compare);
|
|
|
- objects.get(3).put("value","高血压");
|
|
|
+ objects.get(3).put("value","全面体检");
|
|
|
indeicator.setWorthAttention("员⼯使⽤意愿较低,建议调整⼩屋布置策略喔");
|
|
|
indeicator.setList(objects);
|
|
|
return ReturnMsg.ok(indeicator);
|