优化
This commit is contained in:
@ -510,8 +510,11 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
addSum = addSum.add(multiply);
|
||||
}
|
||||
vo.setPayAmount(addSum);
|
||||
|
||||
vo.setResidueAmount(vo.getAllAmount().subtract(vo.getPayAmount()));
|
||||
|
||||
//未结算天数
|
||||
Integer days = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
vo.setIsPay(days>0);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@ -604,17 +607,9 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setWorkingState(recruitApply.getStatus().equals("5")?"1":"2");
|
||||
|
||||
//出勤天数
|
||||
//总天数
|
||||
//未结算天数
|
||||
Integer i = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
//已结算天数
|
||||
List<WgzPayCalculation> list = list(Wrappers.<WgzPayCalculation>lambdaQuery()
|
||||
.eq(WgzPayCalculation::getUserId, userId)
|
||||
.eq(WgzPayCalculation::getRecruitId, recruitId)
|
||||
.eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode()));
|
||||
if(CollectionUtil.isNotEmpty(list)) {
|
||||
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
||||
i = i - sum;
|
||||
}
|
||||
|
||||
if(i<=0){
|
||||
throw new BaseException("工资已全部结算完毕");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user