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 @Override
public int updateSalary(List<UserWagePayVo> userWagePay) { public int updateSalary(List<UserWagePayVo> userWagePay) {
int i = pmProjectMapper.updateSalary(userWagePay); if(userWagePay != null && !userWagePay.isEmpty()){
if(i>0){ int i = pmProjectMapper.updateSalary(userWagePay);
BigDecimal sum = userWagePay.stream() if(i>0){
.map(UserWagePayVo::getActualMoney) BigDecimal sum = userWagePay.stream()
.reduce(BigDecimal.ZERO, BigDecimal::add); .map(UserWagePayVo::getActualMoney)
pmProjectMapper.updateMonthSalary(sum, userWagePay.get(0).getMonthId()); .reduce(BigDecimal.ZERO, BigDecimal::add);
pmProjectMapper.updateMonthSalary(sum, userWagePay.get(0).getMonthId());
}
return i;
}else{
return 0;
} }
return i;
} }
@Override @Override

View File

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