|
|
@@ -558,7 +558,19 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
if (monthScore.getCoefficientScore().getStatus()!=null && monthScore.getCoefficientScore().getStatus()==1) {
|
|
|
// 不扣分
|
|
|
for (GxtUserScore item:userScores) {
|
|
|
- BigDecimal finalScore = (item.getMaintenanceTotalScore().multiply(numWork)).add(item.getRepairTotalScore().multiply(numRepair));
|
|
|
+ GxtDeviceRuntimePerson deviceRuntimePerson = new GxtDeviceRuntimePerson();
|
|
|
+ deviceRuntimePerson.setPersonId(item.getUserId());
|
|
|
+ deviceRuntimePerson.setMonthPeriod(monthPeriod);
|
|
|
+ List<GxtDeviceRuntimePerson> peopleScore = gxtDeviceRuntimePersonMapper.selectGxtDeviceRuntimePersonList(deviceRuntimePerson);
|
|
|
+ BigDecimal runTimeScore = BigDecimal.ZERO;
|
|
|
+ if (!peopleScore.isEmpty()) {
|
|
|
+ for (GxtDeviceRuntimePerson person:peopleScore) {
|
|
|
+ if (person.getScore()!=null) {
|
|
|
+ runTimeScore = runTimeScore.add(person.getScore());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BigDecimal finalScore = (item.getMaintenanceTotalScore().add(runTimeScore).multiply(numWork)).add(item.getRepairTotalScore().multiply(numRepair));
|
|
|
if (item.getFinalScore().compareTo(finalScore)==0) {
|
|
|
break;
|
|
|
}
|
|
|
@@ -570,7 +582,19 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
}else {
|
|
|
// 扣分
|
|
|
for (GxtUserScore item:userScores) {
|
|
|
- BigDecimal finalScore = (item.getMaintenanceTotalScore().multiply(numWork)).add(item.getRepairTotalScore().multiply(numRepair));
|
|
|
+ GxtDeviceRuntimePerson deviceRuntimePerson = new GxtDeviceRuntimePerson();
|
|
|
+ deviceRuntimePerson.setPersonId(item.getUserId());
|
|
|
+ deviceRuntimePerson.setMonthPeriod(monthPeriod);
|
|
|
+ List<GxtDeviceRuntimePerson> peopleScore = gxtDeviceRuntimePersonMapper.selectGxtDeviceRuntimePersonList(deviceRuntimePerson);
|
|
|
+ BigDecimal runTimeScore = BigDecimal.ZERO;
|
|
|
+ if (!peopleScore.isEmpty()) {
|
|
|
+ for (GxtDeviceRuntimePerson person:peopleScore) {
|
|
|
+ if (person.getScore()!=null) {
|
|
|
+ runTimeScore = runTimeScore.add(person.getScore());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BigDecimal finalScore = (item.getMaintenanceTotalScore().add(runTimeScore).multiply(numWork)).add(item.getRepairTotalScore().multiply(numRepair));
|
|
|
finalScore = finalScore.subtract(groupDeduction);
|
|
|
if (item.getFinalScore().compareTo(finalScore)==0) {
|
|
|
break;
|