|
|
@@ -16,6 +16,7 @@ import com.ygtx.framework.aspectj.DataScopeAspect;
|
|
|
import com.ygtx.system.mapper.SysUserMapper;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -436,6 +437,14 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setContent(orderScoreInfo.getWorkSummary());
|
|
|
order.setScoringStatus("to_re"); // 提交自评后状态改为待复评
|
|
|
|
|
|
+ // 计算自评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getSelfScore() != null ? person.getSelfScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
// 更新工单信息
|
|
|
int result = gxtRepairOrderService.updateGxtRepairOrderForScore(order);
|
|
|
|
|
|
@@ -465,6 +474,14 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setItemCompletionFactorSum(orderScoreInfo.getItemCompletionFactorSum());
|
|
|
order.setScoringStatus("to_re"); // 提交自评后状态改为待复评
|
|
|
|
|
|
+ // 计算自评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getSelfScore() != null ? person.getSelfScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
// 更新工单信息
|
|
|
int result = gxtWorkOrderService.updateGxtWorkOrderForScore(order);
|
|
|
|
|
|
@@ -512,6 +529,14 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setScoringStatus("to_final");
|
|
|
}
|
|
|
|
|
|
+ // 计算复评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getReviewScore() != null ? person.getReviewScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
// 更新工单信息
|
|
|
int result = gxtRepairOrderService.updateGxtRepairOrderForScore(order);
|
|
|
|
|
|
@@ -541,6 +566,14 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setScoringStatus("to_final");
|
|
|
}
|
|
|
|
|
|
+ // 计算复评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getReviewScore() != null ? person.getReviewScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
// 更新工单信息
|
|
|
int result = gxtWorkOrderService.updateGxtWorkOrderForScore(order);
|
|
|
|
|
|
@@ -598,6 +631,15 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setScoringStatus("to_archive");
|
|
|
}
|
|
|
order.setFinalCoefficient(orderScoreInfo.getFinalCoefficient());
|
|
|
+
|
|
|
+ // 计算终评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getFinalScore() != null ? person.getFinalScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
gxtRepairOrderService.updateGxtRepairOrderForScore(order);
|
|
|
|
|
|
return 1;
|
|
|
@@ -625,6 +667,15 @@ public class GxtOrderScoreServiceImpl implements IGxtOrderScoreService {
|
|
|
order.setScoringStatus("to_archive");
|
|
|
}
|
|
|
order.setFinalCoefficient(orderScoreInfo.getFinalCoefficient());
|
|
|
+
|
|
|
+ // 计算终评总分并设置到工单对象
|
|
|
+ if (orderScoreInfo.getScorePersonList() != null) {
|
|
|
+ double totalScore = orderScoreInfo.getScorePersonList().stream()
|
|
|
+ .mapToDouble(person -> person.getFinalScore() != null ? person.getFinalScore() : 0.0)
|
|
|
+ .sum();
|
|
|
+ order.setScore(new BigDecimal(String.valueOf(totalScore)));
|
|
|
+ }
|
|
|
+
|
|
|
gxtWorkOrderService.updateGxtWorkOrderForScore(order);
|
|
|
|
|
|
return 1;
|