|
@@ -62,9 +62,13 @@ public class InquiryEvaluatorFacade extends InquiryEvaluatorServiceImpl {
|
|
|
BeanUtil.copyProperties(addDeptInfoVO, inquiryInfo);
|
|
|
inquiryInfo.setGmtModified(now);
|
|
|
inquiryInfoFacade.saveOrUpdate(inquiryInfo);
|
|
|
+
|
|
|
+ EvaluatorCalVO evaluatorCalVO = new EvaluatorCalVO();
|
|
|
+ BeanUtil.copyProperties(addDeptInfoVO, evaluatorCalVO);
|
|
|
+ EvaluatorCalDTO evaluatorCalDTO = evaluatorCalPrav(evaluatorCalVO);
|
|
|
|
|
|
InquiryEvaluator inquiryEvaluator = new InquiryEvaluator();
|
|
|
- BeanUtil.copyProperties(addDeptInfoVO, inquiryEvaluator);
|
|
|
+ BeanUtil.copyProperties(evaluatorCalDTO, inquiryEvaluator);
|
|
|
inquiryEvaluator.setInquiryId(inquiryInfo.getId());
|
|
|
inquiryEvaluator.setGmtCreate(now);
|
|
|
inquiryEvaluator.setGmtModified(now);
|
|
@@ -82,9 +86,18 @@ public class InquiryEvaluatorFacade extends InquiryEvaluatorServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public EvaluatorCalDTO evaluatorCal(EvaluatorCalVO evaluatorCalVO){
|
|
|
- EvaluatorCalDTO evaluatorCalDTO = new EvaluatorCalDTO();
|
|
|
-
|
|
|
- List<PhysicalVal> physicalValList = valueSort(evaluatorCalVO);
|
|
|
+ EvaluatorCalDTO evaluatorCalDTO = evaluatorCalPrav(evaluatorCalVO);
|
|
|
+ evaluatorCalDTO.setPhysicalInfoList(Lists.newArrayList(physicalInfoFacade.listByIds(Arrays.asList(evaluatorCalDTO.getPhysicalTypes().split(",")).stream().map(i->Integer.parseInt(i)).collect(Collectors.toList()))));
|
|
|
+ return evaluatorCalDTO;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 进行体质计算
|
|
|
+ * @param evaluatorCalVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private EvaluatorCalDTO evaluatorCalPrav(EvaluatorCalVO evaluatorCalVO){
|
|
|
+ List<PhysicalVal> physicalValList = valueSort(evaluatorCalVO);
|
|
|
Double max = physicalValList.get(0).getValue();
|
|
|
Double min = physicalValList.get(4).getValue();
|
|
|
|
|
@@ -131,16 +144,15 @@ public class InquiryEvaluatorFacade extends InquiryEvaluatorServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- BeanUtil.copyProperties(evaluatorCalVO, evaluatorCalDTO);;
|
|
|
- evaluatorCalDTO.setPhysicalRes(physicalRes);
|
|
|
+
|
|
|
+ EvaluatorCalDTO evaluatorCalDTO = new EvaluatorCalDTO();
|
|
|
+ BeanUtil.copyProperties(evaluatorCalVO, evaluatorCalDTO);
|
|
|
+ evaluatorCalDTO.setPhysicalRes(physicalRes);
|
|
|
evaluatorCalDTO.setPhysicalTypes(physicalTypes);
|
|
|
- evaluatorCalDTO.setPhysicalInfoList(Lists.newArrayList(physicalInfoFacade.listByIds(Arrays.asList(physicalTypes.split(",")).stream().map(i->Integer.parseInt(i)).collect(Collectors.toList()))));
|
|
|
-
|
|
|
- return evaluatorCalDTO;
|
|
|
+
|
|
|
+ return evaluatorCalDTO;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 对偏颇体质排序
|
|
|
* @param evaluatorCalVO
|