|
@@ -32,6 +32,8 @@ import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.service.IBi
|
|
|
import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.service.IBizFinancialIndividualIncomeTaxDetailIsZeroService;
|
|
|
import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirm;
|
|
|
import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetail;
|
|
|
+import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetailEmployee;
|
|
|
+import cn.ezhizao.project.business.housingFund.service.IBizHousingFundConfirmDetailEmployeeService;
|
|
|
import cn.ezhizao.project.business.housingFund.service.IBizHousingFundConfirmDetailService;
|
|
|
import cn.ezhizao.project.business.housingFund.service.IBizHousingFundConfirmService;
|
|
|
import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccount;
|
|
@@ -49,6 +51,8 @@ import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailEmplo
|
|
|
import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
|
|
|
import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirm;
|
|
|
import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetail;
|
|
|
+import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetailEmployee;
|
|
|
+import cn.ezhizao.project.business.socialSecurity.service.IBizSocialSecurityConfirmDetailEmployeeService;
|
|
|
import cn.ezhizao.project.business.socialSecurity.service.IBizSocialSecurityConfirmDetailService;
|
|
|
import cn.ezhizao.project.business.socialSecurity.service.IBizSocialSecurityConfirmService;
|
|
|
import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
|
|
@@ -70,6 +74,7 @@ import org.apache.poi.ss.usermodel.CellStyle;
|
|
|
import org.apache.poi.ss.usermodel.Font;
|
|
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
|
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
|
|
+import org.omg.CORBA.PRIVATE_MEMBER;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -124,6 +129,7 @@ public class BizFinancialSalaryController extends BaseController {
|
|
|
@Autowired
|
|
|
private FreeMarkerConfigurer freeMarkerConfigurer;
|
|
|
|
|
|
+
|
|
|
@Resource
|
|
|
private IBizFinancialSalaryDetailEmployeeService bizFinancialSalaryDetailEmployeeService;
|
|
|
@Resource
|
|
@@ -133,6 +139,11 @@ public class BizFinancialSalaryController extends BaseController {
|
|
|
|
|
|
@Resource
|
|
|
private IBizSocialSecurityConfirmDetailService socialSecurityConfirmDetailService;
|
|
|
+ @Resource
|
|
|
+ private IBizSocialSecurityConfirmDetailEmployeeService socialSecurityConfirmDetailEmployeeService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBizHousingFundConfirmDetailEmployeeService housingFundConfirmDetailEmployeeService;
|
|
|
|
|
|
@Resource
|
|
|
private IBizSocialSecurityConfirmService socialSecurityConfirmService;
|
|
@@ -379,13 +390,89 @@ public class BizFinancialSalaryController extends BaseController {
|
|
|
if (detail != null) {
|
|
|
List<BizFinancialSalaryDetailEmployee> employees = bizFinancialSalaryDetailEmployeeService.query().eq("financial_salary_detail_id", detail.getId()).list();
|
|
|
employees.forEach(l -> l.setId(null));
|
|
|
+ //社保存在
|
|
|
+ BizSocialSecurityConfirmDetail one = socialSecurityConfirmDetailService.getOne(new LambdaQueryWrapper<BizSocialSecurityConfirmDetail>()
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getYear, bizFinancialSalaryDetail.getYear())
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getMonth, bizFinancialSalaryDetail.getMonth())
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getCompanyId, bizFinancialSalaryDetail.getCompanyId())
|
|
|
+ .last("limit 1"));
|
|
|
+
|
|
|
+ BizHousingFundConfirmDetail one1 = housingFundConfirmDetailService.getOne(new LambdaQueryWrapper<BizHousingFundConfirmDetail>()
|
|
|
+ .eq(BizHousingFundConfirmDetail::getYear, bizFinancialSalaryDetail.getYear())
|
|
|
+ .eq(BizHousingFundConfirmDetail::getMonth, bizFinancialSalaryDetail.getMonth())
|
|
|
+ .eq(BizHousingFundConfirmDetail::getCompanyId, bizFinancialSalaryDetail.getCompanyId())
|
|
|
+ .last("limit 1"));
|
|
|
+ if (one != null){
|
|
|
+ List<BizSocialSecurityConfirmDetailEmployee> employeeList = socialSecurityConfirmDetailEmployeeService.list(new LambdaQueryWrapper<BizSocialSecurityConfirmDetailEmployee>()
|
|
|
+ .eq(BizSocialSecurityConfirmDetailEmployee::getSocialSecurityConfirmDetailId, one.getId()));
|
|
|
+ if (employeeList != null){
|
|
|
+ List<String> employeeName = employeeList.stream().map(BizSocialSecurityConfirmDetailEmployee::getEmployeeName).collect(Collectors.toList());
|
|
|
+ for (BizFinancialSalaryDetailEmployee employee : employees) {
|
|
|
+ if (employeeName.contains(employee.getEmployeeName())){
|
|
|
+ employee.setSocialSecurityStatus(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (one1 != null){
|
|
|
+ List<BizHousingFundConfirmDetailEmployee> employeeList = housingFundConfirmDetailEmployeeService.list(new LambdaQueryWrapper<BizHousingFundConfirmDetailEmployee>()
|
|
|
+ .eq(BizHousingFundConfirmDetailEmployee::getHousingFundConfirmDetailId, one1.getId()));
|
|
|
+ if (employeeList != null){
|
|
|
+ List<String> employeeName = employeeList.stream().map(BizHousingFundConfirmDetailEmployee::getEmployeeName).collect(Collectors.toList());
|
|
|
+ for (BizFinancialSalaryDetailEmployee employee : employees) {
|
|
|
+ if (employeeName.contains(employee.getEmployeeName())){
|
|
|
+ employee.setHousingFundStatus(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
bizFinancialSalaryDetail.setDetails(employees);
|
|
|
} else {
|
|
|
bizFinancialSalaryDetail.setDetails(new ArrayList<>());
|
|
|
}
|
|
|
return success(bizFinancialSalaryDetail);
|
|
|
}
|
|
|
- return success(bizFinancialSalaryDetails.get(0));
|
|
|
+
|
|
|
+ BizFinancialSalaryDetail bizFinancialSalaryDetail1 = bizFinancialSalaryDetails.get(0);
|
|
|
+ List<BizFinancialSalaryDetailEmployee> details = bizFinancialSalaryDetail1.getDetails();
|
|
|
+
|
|
|
+ //社保存在
|
|
|
+ BizSocialSecurityConfirmDetail one = socialSecurityConfirmDetailService.getOne(new LambdaQueryWrapper<BizSocialSecurityConfirmDetail>()
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getYear, bizFinancialSalaryDetail.getYear())
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getMonth, bizFinancialSalaryDetail.getMonth())
|
|
|
+ .eq(BizSocialSecurityConfirmDetail::getCompanyId, bizFinancialSalaryDetail.getCompanyId())
|
|
|
+ .last("limit 1"));
|
|
|
+
|
|
|
+ BizHousingFundConfirmDetail one1 = housingFundConfirmDetailService.getOne(new LambdaQueryWrapper<BizHousingFundConfirmDetail>()
|
|
|
+ .eq(BizHousingFundConfirmDetail::getYear, bizFinancialSalaryDetail.getYear())
|
|
|
+ .eq(BizHousingFundConfirmDetail::getMonth, bizFinancialSalaryDetail.getMonth())
|
|
|
+ .eq(BizHousingFundConfirmDetail::getCompanyId, bizFinancialSalaryDetail.getCompanyId())
|
|
|
+ .last("limit 1"));
|
|
|
+ if (one != null){
|
|
|
+ List<BizSocialSecurityConfirmDetailEmployee> employeeList = socialSecurityConfirmDetailEmployeeService.list(new LambdaQueryWrapper<BizSocialSecurityConfirmDetailEmployee>()
|
|
|
+ .eq(BizSocialSecurityConfirmDetailEmployee::getSocialSecurityConfirmDetailId, one.getId()));
|
|
|
+ if (employeeList != null){
|
|
|
+ List<String> employeeName = employeeList.stream().map(BizSocialSecurityConfirmDetailEmployee::getEmployeeName).collect(Collectors.toList());
|
|
|
+ for (BizFinancialSalaryDetailEmployee employee : details) {
|
|
|
+ if (employeeName.contains(employee.getEmployeeName())){
|
|
|
+ employee.setSocialSecurityStatus(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (one1 != null){
|
|
|
+ List<BizHousingFundConfirmDetailEmployee> employeeList = housingFundConfirmDetailEmployeeService.list(new LambdaQueryWrapper<BizHousingFundConfirmDetailEmployee>()
|
|
|
+ .eq(BizHousingFundConfirmDetailEmployee::getHousingFundConfirmDetailId, one1.getId()));
|
|
|
+ if (employeeList != null){
|
|
|
+ List<String> employeeName = employeeList.stream().map(BizHousingFundConfirmDetailEmployee::getEmployeeName).collect(Collectors.toList());
|
|
|
+ for (BizFinancialSalaryDetailEmployee employee : details) {
|
|
|
+ if (employeeName.contains(employee.getEmployeeName())){
|
|
|
+ employee.setHousingFundStatus(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return success(bizFinancialSalaryDetail1);
|
|
|
}
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('business:salary:edit')")
|