This commit is contained in:
方亮 2025-10-24 09:46:59 +08:00
parent 241c070c3c
commit 857af6e4cd
2 changed files with 12 additions and 7 deletions

View File

@ -293,14 +293,18 @@ public class PmProjectServiceImpl implements PmProjectService {
@Override
public int updateSalary(List<UserWagePayVo> userWagePay) {
int i = pmProjectMapper.updateSalary(userWagePay);
if(i>0){
BigDecimal sum = userWagePay.stream()
.map(UserWagePayVo::getActualMoney)
.reduce(BigDecimal.ZERO, BigDecimal::add);
pmProjectMapper.updateMonthSalary(sum, userWagePay.get(0).getMonthId());
if(userWagePay != null && !userWagePay.isEmpty()){
int i = pmProjectMapper.updateSalary(userWagePay);
if(i>0){
BigDecimal sum = userWagePay.stream()
.map(UserWagePayVo::getActualMoney)
.reduce(BigDecimal.ZERO, BigDecimal::add);
pmProjectMapper.updateMonthSalary(sum, userWagePay.get(0).getMonthId());
}
return i;
}else{
return 0;
}
return i;
}
@Override

View File

@ -278,6 +278,7 @@
<select id="getProAttMsg" resultType="com.bonus.bmw.domain.vo.HomePageSubProVo">
SELECT
pw.`name` as workerName,
pw.id as workerId,
pw.id_number,
pw.phone,
bap.sub_id,