This commit is contained in:
parent
241c070c3c
commit
857af6e4cd
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue