优化
This commit is contained in:
@ -26,6 +26,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.AuditStatus;
|
||||
import com.ruoyi.common.exception.BaseException;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||
@ -402,6 +403,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
iWgzPayCalculationMiddleService.removeByIds(list.stream().map(WgzPayCalculationMiddle::getId).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
//添加附件
|
||||
if(CollectionUtils.isNotEmpty(dto.getPayCalculation())){
|
||||
iWgzPayCalculationFilesService.saveBatch(dto.getPayCalculation());
|
||||
}
|
||||
|
||||
//发消息
|
||||
HashMap<String, String> mp = new HashMap<>();
|
||||
@ -525,6 +530,15 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
});
|
||||
}
|
||||
updateBatchById(payList);
|
||||
|
||||
//存附件
|
||||
List<WgzPayCalculationFiles> files = dto.getPayCalculation();
|
||||
if(CollectionUtil.isNotEmpty(files)){
|
||||
files.forEach(file -> {
|
||||
file.setCalculationId(payCalculation.getId());
|
||||
});
|
||||
iWgzPayCalculationFilesService.saveBatch(files);
|
||||
}
|
||||
return save;
|
||||
}
|
||||
|
||||
@ -562,9 +576,18 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
||||
i = i - sum;
|
||||
}
|
||||
if(i<=0){
|
||||
throw new BaseException("工资已全部结算完毕");
|
||||
}
|
||||
vo.setNum(i);
|
||||
|
||||
//个人信息
|
||||
WgzUser wgzUser = wgzUserService.findByUserId(userId);
|
||||
vo.setUserId(userId);
|
||||
vo.setUserName(wgzUser.getUsername());
|
||||
vo.setPhone(wgzUser.getPhone());
|
||||
vo.setBank(wgzUser.getBank());
|
||||
vo.setCardNo(wgzUser.getCardNo());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user