薪资计算逻辑
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaBindingItemDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaBindingItemDetailBo;
|
||||
import com.ruoyi.oa.service.IOaBindingItemDetailService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 绑定记录明细
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/bindingItemDetail")
|
||||
public class OaBindingItemDetailController extends BaseController {
|
||||
|
||||
private final IOaBindingItemDetailService iOaBindingItemDetailService;
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaBindingItemDetailVo> list(OaBindingItemDetailBo bo, PageQuery pageQuery) {
|
||||
return iOaBindingItemDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绑定记录明细列表
|
||||
*/
|
||||
|
||||
@Log(title = "绑定记录明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaBindingItemDetailBo bo, HttpServletResponse response) {
|
||||
List<OaBindingItemDetailVo> list = iOaBindingItemDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "绑定记录明细", OaBindingItemDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绑定记录明细详细信息
|
||||
*
|
||||
* @param bindingItemId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{bindingItemId}")
|
||||
public R<OaBindingItemDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long bindingItemId) {
|
||||
return R.ok(iOaBindingItemDetailService.queryById(bindingItemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绑定记录明细
|
||||
*/
|
||||
|
||||
@Log(title = "绑定记录明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaBindingItemDetailBo bo) {
|
||||
return toAjax(iOaBindingItemDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绑定记录明细
|
||||
*/
|
||||
|
||||
@Log(title = "绑定记录明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaBindingItemDetailBo bo) {
|
||||
return toAjax(iOaBindingItemDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定记录明细
|
||||
*
|
||||
* @param bindingItemIds 主键串
|
||||
*/
|
||||
@Log(title = "绑定记录明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bindingItemIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] bindingItemIds) {
|
||||
return toAjax(iOaBindingItemDetailService.deleteWithValidByIds(Arrays.asList(bindingItemIds), true));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeVo;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeBo;
|
||||
import com.ruoyi.oa.service.IOaEmployeeService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 员工基础信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/employee")
|
||||
public class OaEmployeeController extends BaseController {
|
||||
|
||||
private final IOaEmployeeService iOaEmployeeService;
|
||||
|
||||
/**
|
||||
* 查询员工基础信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaEmployeeVo> list(OaEmployeeBo bo, PageQuery pageQuery) {
|
||||
return iOaEmployeeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工基础信息列表
|
||||
*/
|
||||
|
||||
@Log(title = "员工基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaEmployeeBo bo, HttpServletResponse response) {
|
||||
List<OaEmployeeVo> list = iOaEmployeeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "员工基础信息", OaEmployeeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工基础信息详细信息
|
||||
*
|
||||
* @param employeeId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{employeeId}")
|
||||
public R<OaEmployeeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long employeeId) {
|
||||
return R.ok(iOaEmployeeService.queryById(employeeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工基础信息
|
||||
*/
|
||||
|
||||
@Log(title = "员工基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaEmployeeBo bo) {
|
||||
return toAjax(iOaEmployeeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工基础信息
|
||||
*/
|
||||
|
||||
@Log(title = "员工基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaEmployeeBo bo) {
|
||||
return toAjax(iOaEmployeeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工基础信息
|
||||
*
|
||||
* @param employeeIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "员工基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{employeeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] employeeIds) {
|
||||
return toAjax(iOaEmployeeService.deleteWithValidByIds(Arrays.asList(employeeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeSalaryRecordVo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeTemplateBindingVo;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeTemplateBindingBo;
|
||||
import com.ruoyi.oa.service.IOaEmployeeTemplateBindingService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/employeeTemplateBinding")
|
||||
public class OaEmployeeTemplateBindingController extends BaseController {
|
||||
|
||||
private final IOaEmployeeTemplateBindingService iOaEmployeeTemplateBindingService;
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaEmployeeTemplateBindingVo> list(OaEmployeeTemplateBindingBo bo, PageQuery pageQuery) {
|
||||
return iOaEmployeeTemplateBindingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
|
||||
@Log(title = "员工模板绑定及月度发放记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaEmployeeTemplateBindingBo bo, HttpServletResponse response) {
|
||||
List<OaEmployeeTemplateBindingVo> list = iOaEmployeeTemplateBindingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "员工模板绑定及月度发放记录", OaEmployeeTemplateBindingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工模板绑定及月度发放记录详细信息
|
||||
*
|
||||
* @param bindingId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{bindingId}")
|
||||
public R<OaEmployeeTemplateBindingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long bindingId) {
|
||||
return R.ok(iOaEmployeeTemplateBindingService.queryById(bindingId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工模板绑定及月度发放记录
|
||||
*/
|
||||
|
||||
@Log(title = "员工模板绑定及月度发放记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaEmployeeTemplateBindingBo bo) {
|
||||
return toAjax(iOaEmployeeTemplateBindingService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工模板绑定及月度发放记录
|
||||
*/
|
||||
|
||||
@Log(title = "员工模板绑定及月度发放记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaEmployeeTemplateBindingBo bo) {
|
||||
return toAjax(iOaEmployeeTemplateBindingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工模板绑定及月度发放记录
|
||||
*
|
||||
* @param bindingIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "员工模板绑定及月度发放记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bindingIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] bindingIds) {
|
||||
return toAjax(iOaEmployeeTemplateBindingService.deleteWithValidByIds(Arrays.asList(bindingIds), true));
|
||||
}
|
||||
|
||||
// 6. 薪资批量计算/一键复制上月
|
||||
@PostMapping("/calculate")
|
||||
public R<Void> calculateSalary(@RequestBody OaEmployeeTemplateBindingBo bo) {
|
||||
if (CollectionUtils.isEmpty(bo.getEmployeeIds())) {
|
||||
return R.fail("请选择员工");
|
||||
}
|
||||
if (bo.getPayYear() == null || bo.getPayMonth() == null) {
|
||||
return R.fail("请选择发薪年月");
|
||||
}
|
||||
if (bo.getDefaultInsuranceTemplateId() == null || bo.getDefaultSalaryTemplateId() == null) {
|
||||
return R.fail("请选择默认模板");
|
||||
}
|
||||
return toAjax(iOaEmployeeTemplateBindingService.calculateSalary(bo.getEmployeeIds(), bo.getPayYear(), bo.getPayMonth(), bo.getDefaultInsuranceTemplateId(), bo.getDefaultSalaryTemplateId()));
|
||||
}
|
||||
// 7. 批量确认发放
|
||||
@PostMapping("/finalize")
|
||||
public R<Void> finalizeSalary(@RequestBody List<Long> bindingIds) {
|
||||
return toAjax(iOaEmployeeTemplateBindingService.finalizeSalary(bindingIds));
|
||||
}
|
||||
// 8. 查询单员工历史发放记录
|
||||
@GetMapping("/history/{employeeId}")
|
||||
public R<List<EmployeeSalaryRecordVo>> history(@PathVariable Long employeeId) {
|
||||
return R.ok(iOaEmployeeTemplateBindingService.querySalaryHistory(employeeId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateVo;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateBo;
|
||||
import com.ruoyi.oa.service.IOaInsuranceTemplateService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/insuranceTemplate")
|
||||
public class OaInsuranceTemplateController extends BaseController {
|
||||
|
||||
private final IOaInsuranceTemplateService iOaInsuranceTemplateService;
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaInsuranceTemplateVo> list(OaInsuranceTemplateBo bo, PageQuery pageQuery) {
|
||||
return iOaInsuranceTemplateService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社保/公积金模板主列表
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaInsuranceTemplateBo bo, HttpServletResponse response) {
|
||||
List<OaInsuranceTemplateVo> list = iOaInsuranceTemplateService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "社保/公积金模板主", OaInsuranceTemplateVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社保/公积金模板主详细信息
|
||||
*
|
||||
* @param insuranceTemplateId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{insuranceTemplateId}")
|
||||
public R<OaInsuranceTemplateVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long insuranceTemplateId) {
|
||||
return R.ok(iOaInsuranceTemplateService.queryById(insuranceTemplateId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板主
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaInsuranceTemplateBo bo) {
|
||||
return toAjax(iOaInsuranceTemplateService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板主
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaInsuranceTemplateBo bo) {
|
||||
return toAjax(iOaInsuranceTemplateService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社保/公积金模板主
|
||||
*
|
||||
* @param insuranceTemplateIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{insuranceTemplateIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] insuranceTemplateIds) {
|
||||
return toAjax(iOaInsuranceTemplateService.deleteWithValidByIds(Arrays.asList(insuranceTemplateIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateDetailBo;
|
||||
import com.ruoyi.oa.service.IOaInsuranceTemplateDetailService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/insuranceTemplateDetail")
|
||||
public class OaInsuranceTemplateDetailController extends BaseController {
|
||||
|
||||
private final IOaInsuranceTemplateDetailService iOaInsuranceTemplateDetailService;
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaInsuranceTemplateDetailVo> list(OaInsuranceTemplateDetailBo bo, PageQuery pageQuery) {
|
||||
return iOaInsuranceTemplateDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社保/公积金模板明细列表
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaInsuranceTemplateDetailBo bo, HttpServletResponse response) {
|
||||
List<OaInsuranceTemplateDetailVo> list = iOaInsuranceTemplateDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "社保/公积金模板明细", OaInsuranceTemplateDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社保/公积金模板明细详细信息
|
||||
*
|
||||
* @param insuranceDetailId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{insuranceDetailId}")
|
||||
public R<OaInsuranceTemplateDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long insuranceDetailId) {
|
||||
return R.ok(iOaInsuranceTemplateDetailService.queryById(insuranceDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板明细
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaInsuranceTemplateDetailBo bo) {
|
||||
return toAjax(iOaInsuranceTemplateDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板明细
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaInsuranceTemplateDetailBo bo) {
|
||||
return toAjax(iOaInsuranceTemplateDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社保/公积金模板明细
|
||||
*
|
||||
* @param insuranceDetailIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "社保/公积金模板明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{insuranceDetailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] insuranceDetailIds) {
|
||||
return toAjax(iOaInsuranceTemplateDetailService.deleteWithValidByIds(Arrays.asList(insuranceDetailIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateVo;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateBo;
|
||||
import com.ruoyi.oa.service.IOaSalaryTemplateService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 薪资模板主
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/salaryTemplate")
|
||||
public class OaSalaryTemplateController extends BaseController {
|
||||
|
||||
private final IOaSalaryTemplateService iOaSalaryTemplateService;
|
||||
|
||||
/**
|
||||
* 查询薪资模板主列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaSalaryTemplateVo> list(OaSalaryTemplateBo bo, PageQuery pageQuery) {
|
||||
return iOaSalaryTemplateService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出薪资模板主列表
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaSalaryTemplateBo bo, HttpServletResponse response) {
|
||||
List<OaSalaryTemplateVo> list = iOaSalaryTemplateService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "薪资模板主", OaSalaryTemplateVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取薪资模板主详细信息
|
||||
*
|
||||
* @param salaryTemplateId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{salaryTemplateId}")
|
||||
public R<OaSalaryTemplateVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long salaryTemplateId) {
|
||||
return R.ok(iOaSalaryTemplateService.queryById(salaryTemplateId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增薪资模板主
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaSalaryTemplateBo bo) {
|
||||
return toAjax(iOaSalaryTemplateService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改薪资模板主
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaSalaryTemplateBo bo) {
|
||||
return toAjax(iOaSalaryTemplateService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除薪资模板主
|
||||
*
|
||||
* @param salaryTemplateIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{salaryTemplateIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] salaryTemplateIds) {
|
||||
return toAjax(iOaSalaryTemplateService.deleteWithValidByIds(Arrays.asList(salaryTemplateIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateDetailBo;
|
||||
import com.ruoyi.oa.service.IOaSalaryTemplateDetailService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 薪资模板明细
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/salaryTemplateDetail")
|
||||
public class OaSalaryTemplateDetailController extends BaseController {
|
||||
|
||||
private final IOaSalaryTemplateDetailService iOaSalaryTemplateDetailService;
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaSalaryTemplateDetailVo> list(OaSalaryTemplateDetailBo bo, PageQuery pageQuery) {
|
||||
return iOaSalaryTemplateDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出薪资模板明细列表
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaSalaryTemplateDetailBo bo, HttpServletResponse response) {
|
||||
List<OaSalaryTemplateDetailVo> list = iOaSalaryTemplateDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "薪资模板明细", OaSalaryTemplateDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取薪资模板明细详细信息
|
||||
*
|
||||
* @param salaryDetailId 主键
|
||||
*/
|
||||
|
||||
@GetMapping("/{salaryDetailId}")
|
||||
public R<OaSalaryTemplateDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long salaryDetailId) {
|
||||
return R.ok(iOaSalaryTemplateDetailService.queryById(salaryDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增薪资模板明细
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaSalaryTemplateDetailBo bo) {
|
||||
return toAjax(iOaSalaryTemplateDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改薪资模板明细
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaSalaryTemplateDetailBo bo) {
|
||||
return toAjax(iOaSalaryTemplateDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除薪资模板明细
|
||||
*
|
||||
* @param salaryDetailIds 主键串
|
||||
*/
|
||||
|
||||
@Log(title = "薪资模板明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{salaryDetailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] salaryDetailIds) {
|
||||
return toAjax(iOaSalaryTemplateDetailService.deleteWithValidByIds(Arrays.asList(salaryDetailIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 绑定记录明细对象 oa_binding_item_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_binding_item_detail")
|
||||
public class OaBindingItemDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@TableId(value = "binding_item_id")
|
||||
private Long bindingItemId;
|
||||
/**
|
||||
* 绑定记录ID → oa_employee_template_binding.binding_id
|
||||
*/
|
||||
private Long bindingId;
|
||||
/**
|
||||
* 模板类型
|
||||
*/
|
||||
private String templateType;
|
||||
/**
|
||||
* 明细ID → oa_insurance_template_detail.insurance_detail_id 或 oa_salary_template_detail.salary_detail_id
|
||||
*/
|
||||
private Long itemDetailId;
|
||||
/**
|
||||
* 实际缴纳/支付金额
|
||||
*/
|
||||
private BigDecimal paidAmount;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
48
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/OaEmployee.java
Normal file
48
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/OaEmployee.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 员工基础信息对象 oa_employee
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_employee")
|
||||
public class OaEmployee extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 员工ID
|
||||
*/
|
||||
@TableId(value = "employee_id")
|
||||
private Long employeeId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
private String company;
|
||||
/**
|
||||
* 删除标志 0=未删,1=已删
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录对象 oa_employee_template_binding
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_employee_template_binding")
|
||||
public class OaEmployeeTemplateBinding extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "binding_id")
|
||||
private Long bindingId;
|
||||
/**
|
||||
* 员工ID → oa_employee.employee_id
|
||||
*/
|
||||
private Long employeeId;
|
||||
/**
|
||||
* 保险模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
private Long insuranceTemplateId;
|
||||
/**
|
||||
* 薪资模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
private Long salaryTemplateId;
|
||||
/**
|
||||
* 发放年度
|
||||
*/
|
||||
private Long payYear;
|
||||
/**
|
||||
* 发放月份
|
||||
*/
|
||||
private Long payMonth;
|
||||
/**
|
||||
* 实发工资
|
||||
*/
|
||||
private BigDecimal netSalary;
|
||||
/**
|
||||
* 单位总支出
|
||||
*/
|
||||
private BigDecimal totalCompanyCost;
|
||||
/**
|
||||
* 状态(已发/待发)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主对象 oa_insurance_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_insurance_template")
|
||||
public class OaInsuranceTemplate extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@TableId(value = "insurance_template_id")
|
||||
private Long insuranceTemplateId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 删除标志 0=未删,1=已删
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细对象 oa_insurance_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_insurance_template_detail")
|
||||
public class OaInsuranceTemplateDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@TableId(value = "insurance_detail_id")
|
||||
private Long insuranceDetailId;
|
||||
/**
|
||||
* 模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
private Long insuranceTemplateId;
|
||||
/**
|
||||
* 险种代码,如 pension、unemployment…
|
||||
*/
|
||||
private String insuranceType;
|
||||
/**
|
||||
* 金额或比例
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 薪资模板主对象 oa_salary_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_salary_template")
|
||||
public class OaSalaryTemplate extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@TableId(value = "salary_template_id")
|
||||
private Long salaryTemplateId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 薪资模板明细对象 oa_salary_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_salary_template_detail")
|
||||
public class OaSalaryTemplateDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@TableId(value = "salary_detail_id")
|
||||
private Long salaryDetailId;
|
||||
/**
|
||||
* 模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
private Long salaryTemplateId;
|
||||
/**
|
||||
* 项目代码,如 basic_salary…
|
||||
*/
|
||||
private String salaryItem;
|
||||
/**
|
||||
* 固定金额,仅针对金额项
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 费率,仅针对费率项
|
||||
*/
|
||||
private BigDecimal rate;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 绑定记录明细业务对象 oa_binding_item_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaBindingItemDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
private Long bindingItemId;
|
||||
|
||||
/**
|
||||
* 绑定记录ID → oa_employee_template_binding.binding_id
|
||||
*/
|
||||
private Long bindingId;
|
||||
|
||||
/**
|
||||
* 模板类型
|
||||
*/
|
||||
private String templateType;
|
||||
|
||||
/**
|
||||
* 明细ID → oa_insurance_template_detail.insurance_detail_id 或 oa_salary_template_detail.salary_detail_id
|
||||
*/
|
||||
private Long itemDetailId;
|
||||
|
||||
/**
|
||||
* 实际缴纳/支付金额
|
||||
*/
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 员工基础信息业务对象 oa_employee
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaEmployeeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 员工ID
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import liquibase.pro.packaged.L;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录业务对象 oa_employee_template_binding
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaEmployeeTemplateBindingBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
private Long bindingId;
|
||||
|
||||
/**
|
||||
* 员工ID → oa_employee.employee_id
|
||||
*/
|
||||
private Long employeeId;
|
||||
private List<Long> employeeIds;
|
||||
|
||||
/**
|
||||
* 保险模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 薪资模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 发放年度
|
||||
*/
|
||||
private Long payYear;
|
||||
|
||||
/**
|
||||
* 发放月份
|
||||
*/
|
||||
private Long payMonth;
|
||||
|
||||
/**
|
||||
* 实发工资
|
||||
*/
|
||||
private BigDecimal netSalary;
|
||||
|
||||
/**
|
||||
* 单位总支出
|
||||
*/
|
||||
private BigDecimal totalCompanyCost;
|
||||
|
||||
/**
|
||||
* 状态(已发/待发)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
private Long defaultInsuranceTemplateId; // 新增:默认社保模板ID
|
||||
private Long defaultSalaryTemplateId; // 新增:默认薪资模板ID
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主业务对象 oa_insurance_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaInsuranceTemplateBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细业务对象 oa_insurance_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaInsuranceTemplateDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
private Long insuranceDetailId;
|
||||
|
||||
/**
|
||||
* 模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 险种代码,如 pension、unemployment…
|
||||
*/
|
||||
private String insuranceType;
|
||||
|
||||
/**
|
||||
* 金额或比例
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 薪资模板主业务对象 oa_salary_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaSalaryTemplateBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 薪资模板明细业务对象 oa_salary_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaSalaryTemplateDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
private Long salaryDetailId;
|
||||
|
||||
/**
|
||||
* 模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 项目代码,如 basic_salary…
|
||||
*/
|
||||
private String salaryItem;
|
||||
|
||||
/**
|
||||
* 固定金额,仅针对金额项
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 费率,仅针对费率项
|
||||
*/
|
||||
private BigDecimal rate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class EmployeeSalaryRecordVo {
|
||||
private Long bindingId;
|
||||
private Long employeeId;
|
||||
private String employeeName;
|
||||
private String company;
|
||||
private Integer payYear;
|
||||
private Integer payMonth;
|
||||
private String status;
|
||||
private BigDecimal netSalary;
|
||||
private BigDecimal totalCompanyCost;
|
||||
private List<OaBindingItemDetailVo> salaryDetails; // 工资明细
|
||||
private List<OaBindingItemDetailVo> insuranceDetails; // 社保明细
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 绑定记录明细视图对象 oa_binding_item_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaBindingItemDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@ExcelProperty(value = "明细ID")
|
||||
private Long bindingItemId;
|
||||
private String itemName; // 项目名称
|
||||
/**
|
||||
* 绑定记录ID → oa_employee_template_binding.binding_id
|
||||
*/
|
||||
@ExcelProperty(value = "绑定记录ID → oa_employee_template_binding.binding_id")
|
||||
private Long bindingId;
|
||||
|
||||
/**
|
||||
* 模板类型
|
||||
*/
|
||||
@ExcelProperty(value = "模板类型")
|
||||
private String templateType;
|
||||
|
||||
/**
|
||||
* 明细ID → oa_insurance_template_detail.insurance_detail_id 或 oa_salary_template_detail.salary_detail_id
|
||||
*/
|
||||
@ExcelProperty(value = "明细ID → oa_insurance_template_detail.insurance_detail_id 或 oa_salary_template_detail.salary_detail_id")
|
||||
private Long itemDetailId;
|
||||
|
||||
/**
|
||||
* 实际缴纳/支付金额
|
||||
*/
|
||||
@ExcelProperty(value = "实际缴纳/支付金额")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录视图对象 oa_employee_template_binding
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaEmployeeTemplateBindingVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "记录ID")
|
||||
private Long bindingId;
|
||||
|
||||
/**
|
||||
* 员工ID → oa_employee.employee_id
|
||||
*/
|
||||
@ExcelProperty(value = "员工ID → oa_employee.employee_id")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 保险模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
@ExcelProperty(value = "保险模板ID → oa_insurance_template.insurance_template_id")
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 薪资模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
@ExcelProperty(value = "薪资模板ID → oa_salary_template.salary_template_id")
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 发放年度
|
||||
*/
|
||||
@ExcelProperty(value = "发放年度")
|
||||
private Long payYear;
|
||||
|
||||
/**
|
||||
* 发放月份
|
||||
*/
|
||||
@ExcelProperty(value = "发放月份")
|
||||
private Long payMonth;
|
||||
|
||||
/**
|
||||
* 实发工资
|
||||
*/
|
||||
@ExcelProperty(value = "实发工资")
|
||||
private BigDecimal netSalary;
|
||||
|
||||
/**
|
||||
* 单位总支出
|
||||
*/
|
||||
@ExcelProperty(value = "单位总支出")
|
||||
private BigDecimal totalCompanyCost;
|
||||
|
||||
/**
|
||||
* 状态(已发/待发)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "已=发/待发")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 员工基础信息视图对象 oa_employee
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaEmployeeVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 员工ID
|
||||
*/
|
||||
@ExcelProperty(value = "员工ID")
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
@ExcelProperty(value = "公司")
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细视图对象 oa_insurance_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaInsuranceTemplateDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@ExcelProperty(value = "明细ID")
|
||||
private Long insuranceDetailId;
|
||||
|
||||
/**
|
||||
* 模板ID → oa_insurance_template.insurance_template_id
|
||||
*/
|
||||
@ExcelProperty(value = "模板ID → oa_insurance_template.insurance_template_id")
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 险种代码,如 pension、unemployment…
|
||||
*/
|
||||
@ExcelProperty(value = "险种代码,如 pension、unemployment…")
|
||||
private String insuranceType;
|
||||
|
||||
/**
|
||||
* 金额或比例
|
||||
*/
|
||||
@ExcelProperty(value = "金额或比例")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主视图对象 oa_insurance_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaInsuranceTemplateVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@ExcelProperty(value = "模板ID")
|
||||
private Long insuranceTemplateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
@ExcelProperty(value = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 薪资模板明细视图对象 oa_salary_template_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaSalaryTemplateDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@ExcelProperty(value = "明细ID")
|
||||
private Long salaryDetailId;
|
||||
|
||||
/**
|
||||
* 模板ID → oa_salary_template.salary_template_id
|
||||
*/
|
||||
@ExcelProperty(value = "模板ID → oa_salary_template.salary_template_id")
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 项目代码,如 basic_salary…
|
||||
*/
|
||||
@ExcelProperty(value = "项目代码,如 basic_salary…")
|
||||
private String salaryItem;
|
||||
|
||||
/**
|
||||
* 固定金额,仅针对金额项
|
||||
*/
|
||||
@ExcelProperty(value = "固定金额,仅针对金额项")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 费率,仅针对费率项
|
||||
*/
|
||||
@ExcelProperty(value = "费率,仅针对费率项")
|
||||
private BigDecimal rate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 薪资模板主视图对象 oa_salary_template
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaSalaryTemplateVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@ExcelProperty(value = "模板ID")
|
||||
private Long salaryTemplateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
@ExcelProperty(value = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaBindingItemDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaBindingItemDetailVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 绑定记录明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaBindingItemDetailMapper extends BaseMapperPlus<OaBindingItemDetailMapper, OaBindingItemDetail, OaBindingItemDetailVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaEmployee;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
/**
|
||||
* 员工基础信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaEmployeeMapper extends BaseMapperPlus<OaEmployeeMapper, OaEmployee, OaEmployeeVo> {
|
||||
Long getDefaultInsuranceTemplateId(@Param("employeeId") Long employeeId);
|
||||
Long getDefaultSalaryTemplateId(@Param("employeeId") Long employeeId);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaEmployeeTemplateBinding;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeTemplateBindingVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaEmployeeTemplateBindingMapper extends BaseMapperPlus<OaEmployeeTemplateBindingMapper, OaEmployeeTemplateBinding, OaEmployeeTemplateBindingVo> {
|
||||
OaEmployeeTemplateBinding findByEmployeeAndMonth(@Param("employeeId") Long employeeId,
|
||||
@Param("payYear") Long payYear,
|
||||
@Param("payMonth") Long payMonth);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplateDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateDetailVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaInsuranceTemplateDetailMapper extends BaseMapperPlus<OaInsuranceTemplateDetailMapper, OaInsuranceTemplateDetail, OaInsuranceTemplateDetailVo> {
|
||||
List<OaInsuranceTemplateDetail> findByTemplateId(@Param("templateId") Long templateId);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplate;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaInsuranceTemplateMapper extends BaseMapperPlus<OaInsuranceTemplateMapper, OaInsuranceTemplate, OaInsuranceTemplateVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplateDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateDetailVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资模板明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaSalaryTemplateDetailMapper extends BaseMapperPlus<OaSalaryTemplateDetailMapper, OaSalaryTemplateDetail, OaSalaryTemplateDetailVo> {
|
||||
List<OaSalaryTemplateDetail> findByTemplateId(@Param("templateId") Long templateId);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplate;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 薪资模板主Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface OaSalaryTemplateMapper extends BaseMapperPlus<OaSalaryTemplateMapper, OaSalaryTemplate, OaSalaryTemplateVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaBindingItemDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaBindingItemDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaBindingItemDetailBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绑定记录明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaBindingItemDetailService {
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细
|
||||
*/
|
||||
OaBindingItemDetailVo queryById(Long bindingItemId);
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细列表
|
||||
*/
|
||||
TableDataInfo<OaBindingItemDetailVo> queryPageList(OaBindingItemDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细列表
|
||||
*/
|
||||
List<OaBindingItemDetailVo> queryList(OaBindingItemDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增绑定记录明细
|
||||
*/
|
||||
Boolean insertByBo(OaBindingItemDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改绑定记录明细
|
||||
*/
|
||||
Boolean updateByBo(OaBindingItemDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除绑定记录明细信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaEmployee;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeVo;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工基础信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaEmployeeService {
|
||||
|
||||
/**
|
||||
* 查询员工基础信息
|
||||
*/
|
||||
OaEmployeeVo queryById(Long employeeId);
|
||||
|
||||
/**
|
||||
* 查询员工基础信息列表
|
||||
*/
|
||||
TableDataInfo<OaEmployeeVo> queryPageList(OaEmployeeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询员工基础信息列表
|
||||
*/
|
||||
List<OaEmployeeVo> queryList(OaEmployeeBo bo);
|
||||
|
||||
/**
|
||||
* 新增员工基础信息
|
||||
*/
|
||||
Boolean insertByBo(OaEmployeeBo bo);
|
||||
|
||||
/**
|
||||
* 修改员工基础信息
|
||||
*/
|
||||
Boolean updateByBo(OaEmployeeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除员工基础信息信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaEmployeeTemplateBinding;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeSalaryRecordVo;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeTemplateBindingVo;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeTemplateBindingBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaEmployeeTemplateBindingService {
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录
|
||||
*/
|
||||
OaEmployeeTemplateBindingVo queryById(Long bindingId);
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
TableDataInfo<OaEmployeeTemplateBindingVo> queryPageList(OaEmployeeTemplateBindingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
List<OaEmployeeTemplateBindingVo> queryList(OaEmployeeTemplateBindingBo bo);
|
||||
|
||||
/**
|
||||
* 新增员工模板绑定及月度发放记录
|
||||
*/
|
||||
Boolean insertByBo(OaEmployeeTemplateBindingBo bo);
|
||||
|
||||
/**
|
||||
* 修改员工模板绑定及月度发放记录
|
||||
*/
|
||||
Boolean updateByBo(OaEmployeeTemplateBindingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除员工模板绑定及月度发放记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
Boolean calculateSalary(List<Long> employeeIds, Long payYear, Long payMonth,Long defaultInsuranceTemplateId, Long defaultSalaryTemplateId);
|
||||
Boolean finalizeSalary(List<Long> bindingIds);
|
||||
List<EmployeeSalaryRecordVo> querySalaryHistory(Long employeeId);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplateDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateDetailBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaInsuranceTemplateDetailService {
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细
|
||||
*/
|
||||
OaInsuranceTemplateDetailVo queryById(Long insuranceDetailId);
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细列表
|
||||
*/
|
||||
TableDataInfo<OaInsuranceTemplateDetailVo> queryPageList(OaInsuranceTemplateDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细列表
|
||||
*/
|
||||
List<OaInsuranceTemplateDetailVo> queryList(OaInsuranceTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板明细
|
||||
*/
|
||||
Boolean insertByBo(OaInsuranceTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板明细
|
||||
*/
|
||||
Boolean updateByBo(OaInsuranceTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除社保/公积金模板明细信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplate;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateVo;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaInsuranceTemplateService {
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主
|
||||
*/
|
||||
OaInsuranceTemplateVo queryById(Long insuranceTemplateId);
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主列表
|
||||
*/
|
||||
TableDataInfo<OaInsuranceTemplateVo> queryPageList(OaInsuranceTemplateBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主列表
|
||||
*/
|
||||
List<OaInsuranceTemplateVo> queryList(OaInsuranceTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板主
|
||||
*/
|
||||
Boolean insertByBo(OaInsuranceTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板主
|
||||
*/
|
||||
Boolean updateByBo(OaInsuranceTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除社保/公积金模板主信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplateDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateDetailBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资模板明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaSalaryTemplateDetailService {
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细
|
||||
*/
|
||||
OaSalaryTemplateDetailVo queryById(Long salaryDetailId);
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细列表
|
||||
*/
|
||||
TableDataInfo<OaSalaryTemplateDetailVo> queryPageList(OaSalaryTemplateDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细列表
|
||||
*/
|
||||
List<OaSalaryTemplateDetailVo> queryList(OaSalaryTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增薪资模板明细
|
||||
*/
|
||||
Boolean insertByBo(OaSalaryTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改薪资模板明细
|
||||
*/
|
||||
Boolean updateByBo(OaSalaryTemplateDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除薪资模板明细信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplate;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateVo;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资模板主Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
public interface IOaSalaryTemplateService {
|
||||
|
||||
/**
|
||||
* 查询薪资模板主
|
||||
*/
|
||||
OaSalaryTemplateVo queryById(Long salaryTemplateId);
|
||||
|
||||
/**
|
||||
* 查询薪资模板主列表
|
||||
*/
|
||||
TableDataInfo<OaSalaryTemplateVo> queryPageList(OaSalaryTemplateBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询薪资模板主列表
|
||||
*/
|
||||
List<OaSalaryTemplateVo> queryList(OaSalaryTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 新增薪资模板主
|
||||
*/
|
||||
Boolean insertByBo(OaSalaryTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 修改薪资模板主
|
||||
*/
|
||||
Boolean updateByBo(OaSalaryTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除薪资模板主信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaBindingItemDetailBo;
|
||||
import com.ruoyi.oa.domain.vo.OaBindingItemDetailVo;
|
||||
import com.ruoyi.oa.domain.OaBindingItemDetail;
|
||||
import com.ruoyi.oa.mapper.OaBindingItemDetailMapper;
|
||||
import com.ruoyi.oa.service.IOaBindingItemDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 绑定记录明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaBindingItemDetailServiceImpl implements IOaBindingItemDetailService {
|
||||
|
||||
private final OaBindingItemDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细
|
||||
*/
|
||||
@Override
|
||||
public OaBindingItemDetailVo queryById(Long bindingItemId){
|
||||
return baseMapper.selectVoById(bindingItemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaBindingItemDetailVo> queryPageList(OaBindingItemDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaBindingItemDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<OaBindingItemDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询绑定记录明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaBindingItemDetailVo> queryList(OaBindingItemDetailBo bo) {
|
||||
LambdaQueryWrapper<OaBindingItemDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaBindingItemDetail> buildQueryWrapper(OaBindingItemDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaBindingItemDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getBindingId() != null, OaBindingItemDetail::getBindingId, bo.getBindingId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTemplateType()), OaBindingItemDetail::getTemplateType, bo.getTemplateType());
|
||||
lqw.eq(bo.getItemDetailId() != null, OaBindingItemDetail::getItemDetailId, bo.getItemDetailId());
|
||||
lqw.eq(bo.getPaidAmount() != null, OaBindingItemDetail::getPaidAmount, bo.getPaidAmount());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绑定记录明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaBindingItemDetailBo bo) {
|
||||
OaBindingItemDetail add = BeanUtil.toBean(bo, OaBindingItemDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setBindingItemId(add.getBindingItemId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绑定记录明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaBindingItemDetailBo bo) {
|
||||
OaBindingItemDetail update = BeanUtil.toBean(bo, OaBindingItemDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaBindingItemDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除绑定记录明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeBo;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeVo;
|
||||
import com.ruoyi.oa.domain.OaEmployee;
|
||||
import com.ruoyi.oa.mapper.OaEmployeeMapper;
|
||||
import com.ruoyi.oa.service.IOaEmployeeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 员工基础信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaEmployeeServiceImpl implements IOaEmployeeService {
|
||||
|
||||
private final OaEmployeeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询员工基础信息
|
||||
*/
|
||||
@Override
|
||||
public OaEmployeeVo queryById(Long employeeId){
|
||||
return baseMapper.selectVoById(employeeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询员工基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaEmployeeVo> queryPageList(OaEmployeeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaEmployee> lqw = buildQueryWrapper(bo);
|
||||
Page<OaEmployeeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询员工基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaEmployeeVo> queryList(OaEmployeeBo bo) {
|
||||
LambdaQueryWrapper<OaEmployee> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaEmployee> buildQueryWrapper(OaEmployeeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaEmployee> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEmployeeName()), OaEmployee::getEmployeeName, bo.getEmployeeName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCompany()), OaEmployee::getCompany, bo.getCompany());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaEmployeeBo bo) {
|
||||
OaEmployee add = BeanUtil.toBean(bo, OaEmployee.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setEmployeeId(add.getEmployeeId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaEmployeeBo bo) {
|
||||
OaEmployee update = BeanUtil.toBean(bo, OaEmployee.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaEmployee entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除员工基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.oa.domain.*;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeSalaryRecordVo;
|
||||
import com.ruoyi.oa.domain.vo.OaBindingItemDetailVo;
|
||||
import com.ruoyi.oa.mapper.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaEmployeeTemplateBindingBo;
|
||||
import com.ruoyi.oa.domain.vo.OaEmployeeTemplateBindingVo;
|
||||
import com.ruoyi.oa.service.IOaEmployeeTemplateBindingService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 员工模板绑定及月度发放记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaEmployeeTemplateBindingServiceImpl implements IOaEmployeeTemplateBindingService {
|
||||
@Autowired
|
||||
private final OaEmployeeTemplateBindingMapper baseMapper;
|
||||
@Autowired
|
||||
private final OaBindingItemDetailMapper bindingItemDetailMapper;
|
||||
@Autowired
|
||||
private final OaEmployeeMapper employeeMapper;
|
||||
@Autowired
|
||||
private final OaSalaryTemplateDetailMapper salaryDetailMapper;
|
||||
@Autowired
|
||||
private final OaInsuranceTemplateDetailMapper insuranceDetailMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录
|
||||
*/
|
||||
@Override
|
||||
public OaEmployeeTemplateBindingVo queryById(Long bindingId){
|
||||
return baseMapper.selectVoById(bindingId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaEmployeeTemplateBindingVo> queryPageList(OaEmployeeTemplateBindingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaEmployeeTemplateBinding> lqw = buildQueryWrapper(bo);
|
||||
Page<OaEmployeeTemplateBindingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询员工模板绑定及月度发放记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaEmployeeTemplateBindingVo> queryList(OaEmployeeTemplateBindingBo bo) {
|
||||
LambdaQueryWrapper<OaEmployeeTemplateBinding> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaEmployeeTemplateBinding> buildQueryWrapper(OaEmployeeTemplateBindingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaEmployeeTemplateBinding> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getEmployeeId() != null, OaEmployeeTemplateBinding::getEmployeeId, bo.getEmployeeId());
|
||||
lqw.eq(bo.getInsuranceTemplateId() != null, OaEmployeeTemplateBinding::getInsuranceTemplateId, bo.getInsuranceTemplateId());
|
||||
lqw.eq(bo.getSalaryTemplateId() != null, OaEmployeeTemplateBinding::getSalaryTemplateId, bo.getSalaryTemplateId());
|
||||
lqw.eq(bo.getPayYear() != null, OaEmployeeTemplateBinding::getPayYear, bo.getPayYear());
|
||||
lqw.eq(bo.getPayMonth() != null, OaEmployeeTemplateBinding::getPayMonth, bo.getPayMonth());
|
||||
lqw.eq(bo.getNetSalary() != null, OaEmployeeTemplateBinding::getNetSalary, bo.getNetSalary());
|
||||
lqw.eq(bo.getTotalCompanyCost() != null, OaEmployeeTemplateBinding::getTotalCompanyCost, bo.getTotalCompanyCost());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), OaEmployeeTemplateBinding::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工模板绑定及月度发放记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaEmployeeTemplateBindingBo bo) {
|
||||
OaEmployeeTemplateBinding add = BeanUtil.toBean(bo, OaEmployeeTemplateBinding.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setBindingId(add.getBindingId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工模板绑定及月度发放记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaEmployeeTemplateBindingBo bo) {
|
||||
OaEmployeeTemplateBinding update = BeanUtil.toBean(bo, OaEmployeeTemplateBinding.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaEmployeeTemplateBinding entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除员工模板绑定及月度发放记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean calculateSalary(List<Long> employeeIds, Long payYear, Long payMonth,Long defaultInsuranceTemplateId, Long defaultSalaryTemplateId) {
|
||||
// 参数校验
|
||||
if (defaultInsuranceTemplateId == null || defaultSalaryTemplateId == null) {
|
||||
throw new RuntimeException("请选择默认的薪资模板和社保模板");
|
||||
}
|
||||
for (Long employeeId : employeeIds) {
|
||||
// 1. 检查本月是否已存在记录
|
||||
OaEmployeeTemplateBinding exist = baseMapper.findByEmployeeAndMonth(employeeId, payYear, payMonth);
|
||||
if (exist != null) {
|
||||
// 已存在,跳过或更新
|
||||
continue;
|
||||
}
|
||||
|
||||
// 2. 获取上月的模板ID(支持一键复制)
|
||||
Long lastMonth = (payMonth == 1) ? 12 : payMonth - 1;
|
||||
Long lastYear = (payMonth == 1) ? payYear - 1 : payYear;
|
||||
OaEmployeeTemplateBinding lastBinding = baseMapper.findByEmployeeAndMonth(employeeId, lastYear, lastMonth);
|
||||
|
||||
Long insuranceTemplateId;
|
||||
Long salaryTemplateId;
|
||||
if (lastBinding != null) {
|
||||
// 存在上月记录,使用上月的模板
|
||||
insuranceTemplateId = lastBinding.getInsuranceTemplateId();
|
||||
salaryTemplateId = lastBinding.getSalaryTemplateId();
|
||||
} else {
|
||||
// 首次配置,使用前端传入的默认模板
|
||||
insuranceTemplateId = defaultInsuranceTemplateId;
|
||||
salaryTemplateId = defaultSalaryTemplateId;
|
||||
|
||||
// 将默认模板ID保存到员工表
|
||||
// OaEmployeeTemplateBinding employee = new OaEmployeeTemplateBinding();
|
||||
// employee.setEmployeeId(employeeId);
|
||||
// employee.setInsuranceTemplateId(defaultInsuranceTemplateId);
|
||||
// employee.setSalaryTemplateId(defaultSalaryTemplateId);
|
||||
// baseMapper.updateById(employee);
|
||||
}
|
||||
|
||||
// 3. 新建本月主表记录
|
||||
OaEmployeeTemplateBinding binding = new OaEmployeeTemplateBinding();
|
||||
binding.setEmployeeId(employeeId);
|
||||
binding.setInsuranceTemplateId(insuranceTemplateId);
|
||||
binding.setSalaryTemplateId(salaryTemplateId);
|
||||
binding.setPayYear(payYear);
|
||||
binding.setPayMonth(payMonth);
|
||||
binding.setStatus("待发");
|
||||
baseMapper.insert(binding);
|
||||
|
||||
// 4. 生成明细快照
|
||||
List<OaSalaryTemplateDetail> salaryDetails = salaryDetailMapper.findByTemplateId(salaryTemplateId);
|
||||
List<OaInsuranceTemplateDetail> insuranceDetails = insuranceDetailMapper.findByTemplateId(insuranceTemplateId);
|
||||
|
||||
BigDecimal totalSalary = BigDecimal.ZERO;
|
||||
BigDecimal totalCompanyInsurance = BigDecimal.ZERO;
|
||||
|
||||
// 薪资明细
|
||||
for (OaSalaryTemplateDetail detail : salaryDetails) {
|
||||
BigDecimal paidAmount = detail.getAmount() != null ? detail.getAmount() : BigDecimal.ZERO;
|
||||
totalSalary = totalSalary.add(paidAmount);
|
||||
|
||||
OaBindingItemDetail item = new OaBindingItemDetail();
|
||||
item.setBindingId(binding.getBindingId());
|
||||
item.setTemplateType("salary");
|
||||
item.setItemDetailId(detail.getSalaryDetailId());
|
||||
item.setPaidAmount(paidAmount);
|
||||
bindingItemDetailMapper.insert(item);
|
||||
}
|
||||
|
||||
// 社保明细
|
||||
for (OaInsuranceTemplateDetail detail : insuranceDetails) {
|
||||
BigDecimal paidAmount = detail.getAmount() != null ? detail.getAmount() : BigDecimal.ZERO;
|
||||
totalCompanyInsurance = totalCompanyInsurance.add(paidAmount);
|
||||
|
||||
OaBindingItemDetail item = new OaBindingItemDetail();
|
||||
item.setBindingId(binding.getBindingId());
|
||||
item.setTemplateType("insurance");
|
||||
item.setItemDetailId(detail.getInsuranceDetailId());
|
||||
item.setPaidAmount(paidAmount);
|
||||
bindingItemDetailMapper.insert(item);
|
||||
}
|
||||
|
||||
// 5. 计算实发工资和单位总支出
|
||||
BigDecimal netSalary = totalSalary;
|
||||
//TODO 可扩展:减去个税、个人社保等
|
||||
BigDecimal totalCompanyCost = netSalary.add(totalCompanyInsurance);
|
||||
|
||||
binding.setNetSalary(netSalary);
|
||||
binding.setTotalCompanyCost(totalCompanyCost);
|
||||
baseMapper.updateById(binding);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean finalizeSalary(List<Long> bindingIds) {
|
||||
for (Long id : bindingIds) {
|
||||
OaEmployeeTemplateBinding binding = baseMapper.selectById(id);
|
||||
if (binding != null && !"已发".equals(binding.getStatus())) {
|
||||
binding.setStatus("已发");
|
||||
baseMapper.updateById(binding);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EmployeeSalaryRecordVo> querySalaryHistory(Long employeeId) {
|
||||
List<OaEmployeeTemplateBinding> list = baseMapper.selectList(
|
||||
new LambdaQueryWrapper<OaEmployeeTemplateBinding>().eq(OaEmployeeTemplateBinding::getEmployeeId, employeeId)
|
||||
.orderByDesc(OaEmployeeTemplateBinding::getPayYear, OaEmployeeTemplateBinding::getPayMonth)
|
||||
);
|
||||
return list.stream().map(this::toVo).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 工具方法:主表转VO并查明细
|
||||
private EmployeeSalaryRecordVo toVo(OaEmployeeTemplateBinding binding) {
|
||||
if (binding == null) return null;
|
||||
EmployeeSalaryRecordVo vo = new EmployeeSalaryRecordVo();
|
||||
BeanUtils.copyProperties(binding, vo);
|
||||
OaEmployee emp = employeeMapper.selectById(binding.getEmployeeId());
|
||||
if (emp != null) {
|
||||
vo.setEmployeeName(emp.getEmployeeName());
|
||||
vo.setCompany(emp.getCompany());
|
||||
}
|
||||
List<OaBindingItemDetail> allDetails = bindingItemDetailMapper.selectList(
|
||||
new LambdaQueryWrapper<OaBindingItemDetail>().eq(OaBindingItemDetail::getBindingId, binding.getBindingId())
|
||||
);
|
||||
vo.setSalaryDetails(allDetails.stream().filter(d -> "salary".equals(d.getTemplateType()))
|
||||
.map(this::toDetailVo).collect(Collectors.toList()));
|
||||
vo.setInsuranceDetails(allDetails.stream().filter(d -> "insurance".equals(d.getTemplateType()))
|
||||
.map(this::toDetailVo).collect(Collectors.toList()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
private OaBindingItemDetailVo toDetailVo(OaBindingItemDetail detail) {
|
||||
OaBindingItemDetailVo vo = new OaBindingItemDetailVo();
|
||||
BeanUtils.copyProperties(detail, vo);
|
||||
// 可补充itemName等
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateDetailBo;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplateDetail;
|
||||
import com.ruoyi.oa.mapper.OaInsuranceTemplateDetailMapper;
|
||||
import com.ruoyi.oa.service.IOaInsuranceTemplateDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaInsuranceTemplateDetailServiceImpl implements IOaInsuranceTemplateDetailService {
|
||||
|
||||
private final OaInsuranceTemplateDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细
|
||||
*/
|
||||
@Override
|
||||
public OaInsuranceTemplateDetailVo queryById(Long insuranceDetailId){
|
||||
return baseMapper.selectVoById(insuranceDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaInsuranceTemplateDetailVo> queryPageList(OaInsuranceTemplateDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaInsuranceTemplateDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<OaInsuranceTemplateDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaInsuranceTemplateDetailVo> queryList(OaInsuranceTemplateDetailBo bo) {
|
||||
LambdaQueryWrapper<OaInsuranceTemplateDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaInsuranceTemplateDetail> buildQueryWrapper(OaInsuranceTemplateDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaInsuranceTemplateDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getInsuranceTemplateId() != null, OaInsuranceTemplateDetail::getInsuranceTemplateId, bo.getInsuranceTemplateId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInsuranceType()), OaInsuranceTemplateDetail::getInsuranceType, bo.getInsuranceType());
|
||||
lqw.eq(bo.getAmount() != null, OaInsuranceTemplateDetail::getAmount, bo.getAmount());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaInsuranceTemplateDetailBo bo) {
|
||||
OaInsuranceTemplateDetail add = BeanUtil.toBean(bo, OaInsuranceTemplateDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setInsuranceDetailId(add.getInsuranceDetailId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaInsuranceTemplateDetailBo bo) {
|
||||
OaInsuranceTemplateDetail update = BeanUtil.toBean(bo, OaInsuranceTemplateDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaInsuranceTemplateDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社保/公积金模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaInsuranceTemplateBo;
|
||||
import com.ruoyi.oa.domain.vo.OaInsuranceTemplateVo;
|
||||
import com.ruoyi.oa.domain.OaInsuranceTemplate;
|
||||
import com.ruoyi.oa.mapper.OaInsuranceTemplateMapper;
|
||||
import com.ruoyi.oa.service.IOaInsuranceTemplateService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 社保/公积金模板主Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaInsuranceTemplateServiceImpl implements IOaInsuranceTemplateService {
|
||||
|
||||
private final OaInsuranceTemplateMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主
|
||||
*/
|
||||
@Override
|
||||
public OaInsuranceTemplateVo queryById(Long insuranceTemplateId){
|
||||
return baseMapper.selectVoById(insuranceTemplateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaInsuranceTemplateVo> queryPageList(OaInsuranceTemplateBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaInsuranceTemplate> lqw = buildQueryWrapper(bo);
|
||||
Page<OaInsuranceTemplateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社保/公积金模板主列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaInsuranceTemplateVo> queryList(OaInsuranceTemplateBo bo) {
|
||||
LambdaQueryWrapper<OaInsuranceTemplate> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaInsuranceTemplate> buildQueryWrapper(OaInsuranceTemplateBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaInsuranceTemplate> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTemplateName()), OaInsuranceTemplate::getTemplateName, bo.getTemplateName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社保/公积金模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaInsuranceTemplateBo bo) {
|
||||
OaInsuranceTemplate add = BeanUtil.toBean(bo, OaInsuranceTemplate.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setInsuranceTemplateId(add.getInsuranceTemplateId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社保/公积金模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaInsuranceTemplateBo bo) {
|
||||
OaInsuranceTemplate update = BeanUtil.toBean(bo, OaInsuranceTemplate.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaInsuranceTemplate entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社保/公积金模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateDetailBo;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateDetailVo;
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplateDetail;
|
||||
import com.ruoyi.oa.mapper.OaSalaryTemplateDetailMapper;
|
||||
import com.ruoyi.oa.service.IOaSalaryTemplateDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 薪资模板明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaSalaryTemplateDetailServiceImpl implements IOaSalaryTemplateDetailService {
|
||||
|
||||
private final OaSalaryTemplateDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细
|
||||
*/
|
||||
@Override
|
||||
public OaSalaryTemplateDetailVo queryById(Long salaryDetailId){
|
||||
return baseMapper.selectVoById(salaryDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaSalaryTemplateDetailVo> queryPageList(OaSalaryTemplateDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaSalaryTemplateDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<OaSalaryTemplateDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询薪资模板明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaSalaryTemplateDetailVo> queryList(OaSalaryTemplateDetailBo bo) {
|
||||
LambdaQueryWrapper<OaSalaryTemplateDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaSalaryTemplateDetail> buildQueryWrapper(OaSalaryTemplateDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaSalaryTemplateDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getSalaryTemplateId() != null, OaSalaryTemplateDetail::getSalaryTemplateId, bo.getSalaryTemplateId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryItem()), OaSalaryTemplateDetail::getSalaryItem, bo.getSalaryItem());
|
||||
lqw.eq(bo.getAmount() != null, OaSalaryTemplateDetail::getAmount, bo.getAmount());
|
||||
lqw.eq(bo.getRate() != null, OaSalaryTemplateDetail::getRate, bo.getRate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增薪资模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaSalaryTemplateDetailBo bo) {
|
||||
OaSalaryTemplateDetail add = BeanUtil.toBean(bo, OaSalaryTemplateDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setSalaryDetailId(add.getSalaryDetailId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改薪资模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaSalaryTemplateDetailBo bo) {
|
||||
OaSalaryTemplateDetail update = BeanUtil.toBean(bo, OaSalaryTemplateDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaSalaryTemplateDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除薪资模板明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaSalaryTemplateBo;
|
||||
import com.ruoyi.oa.domain.vo.OaSalaryTemplateVo;
|
||||
import com.ruoyi.oa.domain.OaSalaryTemplate;
|
||||
import com.ruoyi.oa.mapper.OaSalaryTemplateMapper;
|
||||
import com.ruoyi.oa.service.IOaSalaryTemplateService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 薪资模板主Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaSalaryTemplateServiceImpl implements IOaSalaryTemplateService {
|
||||
|
||||
private final OaSalaryTemplateMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询薪资模板主
|
||||
*/
|
||||
@Override
|
||||
public OaSalaryTemplateVo queryById(Long salaryTemplateId){
|
||||
return baseMapper.selectVoById(salaryTemplateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询薪资模板主列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaSalaryTemplateVo> queryPageList(OaSalaryTemplateBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaSalaryTemplate> lqw = buildQueryWrapper(bo);
|
||||
Page<OaSalaryTemplateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询薪资模板主列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaSalaryTemplateVo> queryList(OaSalaryTemplateBo bo) {
|
||||
LambdaQueryWrapper<OaSalaryTemplate> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaSalaryTemplate> buildQueryWrapper(OaSalaryTemplateBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaSalaryTemplate> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTemplateName()), OaSalaryTemplate::getTemplateName, bo.getTemplateName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增薪资模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaSalaryTemplateBo bo) {
|
||||
OaSalaryTemplate add = BeanUtil.toBean(bo, OaSalaryTemplate.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setSalaryTemplateId(add.getSalaryTemplateId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改薪资模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaSalaryTemplateBo bo) {
|
||||
OaSalaryTemplate update = BeanUtil.toBean(bo, OaSalaryTemplate.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaSalaryTemplate entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除薪资模板主
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
||||
" - COALESCE(finance_details.total_expenditure, 0)" +
|
||||
")";
|
||||
|
||||
// 不用 wrapper.having(...)
|
||||
// 不用 wrapper.having(...)
|
||||
if ("profit".equals(profitType)) {
|
||||
wrapper.apply(profitLossExpr + " > 0");
|
||||
} else if ("loss".equals(profitType)) {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaBindingItemDetailMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaBindingItemDetail" id="OaBindingItemDetailResult">
|
||||
<result property="bindingItemId" column="binding_item_id"/>
|
||||
<result property="bindingId" column="binding_id"/>
|
||||
<result property="templateType" column="template_type"/>
|
||||
<result property="itemDetailId" column="item_detail_id"/>
|
||||
<result property="paidAmount" column="paid_amount"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
25
ruoyi-oa/src/main/resources/mapper/oa/OaEmployeeMapper.xml
Normal file
25
ruoyi-oa/src/main/resources/mapper/oa/OaEmployeeMapper.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaEmployeeMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaEmployee" id="OaEmployeeResult">
|
||||
<result property="employeeId" column="employee_id"/>
|
||||
<result property="employeeName" column="employee_name"/>
|
||||
<result property="company" column="company"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getDefaultInsuranceTemplateId" resultType="java.lang.Long">
|
||||
SELECT default_insurance_template_id FROM oa_employee WHERE employee_id = #{employeeId}
|
||||
</select>
|
||||
<select id="getDefaultSalaryTemplateId" resultType="java.lang.Long">
|
||||
SELECT default_salary_template_id FROM oa_employee WHERE employee_id = #{employeeId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaEmployeeTemplateBindingMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaEmployeeTemplateBinding" id="OaEmployeeTemplateBindingResult">
|
||||
<result property="bindingId" column="binding_id"/>
|
||||
<result property="employeeId" column="employee_id"/>
|
||||
<result property="insuranceTemplateId" column="insurance_template_id"/>
|
||||
<result property="salaryTemplateId" column="salary_template_id"/>
|
||||
<result property="payYear" column="pay_year"/>
|
||||
<result property="payMonth" column="pay_month"/>
|
||||
<result property="netSalary" column="net_salary"/>
|
||||
<result property="totalCompanyCost" column="total_company_cost"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
<select id="findByEmployeeAndMonth" resultType="com.ruoyi.oa.domain.OaEmployeeTemplateBinding">
|
||||
SELECT * FROM oa_employee_template_binding
|
||||
WHERE employee_id = #{employeeId}
|
||||
AND pay_year = #{payYear}
|
||||
AND pay_month = #{payMonth}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaInsuranceTemplateDetailMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaInsuranceTemplateDetail" id="OaInsuranceTemplateDetailResult">
|
||||
<result property="insuranceDetailId" column="insurance_detail_id"/>
|
||||
<result property="insuranceTemplateId" column="insurance_template_id"/>
|
||||
<result property="insuranceType" column="insurance_type"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
<select id="findByTemplateId" resultType="com.ruoyi.oa.domain.OaInsuranceTemplateDetail">
|
||||
SELECT * FROM oa_insurance_template_detail WHERE template_id = #{templateId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaInsuranceTemplateMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaInsuranceTemplate" id="OaInsuranceTemplateResult">
|
||||
<result property="insuranceTemplateId" column="insurance_template_id"/>
|
||||
<result property="templateName" column="template_name"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaSalaryTemplateDetailMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaSalaryTemplateDetail" id="OaSalaryTemplateDetailResult">
|
||||
<result property="salaryDetailId" column="salary_detail_id"/>
|
||||
<result property="salaryTemplateId" column="salary_template_id"/>
|
||||
<result property="salaryItem" column="salary_item"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="rate" column="rate"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
<select id="findByTemplateId" resultType="com.ruoyi.oa.domain.OaSalaryTemplateDetail">
|
||||
SELECT * FROM oa_salary_template_detail WHERE template_id = #{templateId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaSalaryTemplateMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaSalaryTemplate" id="OaSalaryTemplateResult">
|
||||
<result property="salaryTemplateId" column="salary_template_id"/>
|
||||
<result property="templateName" column="template_name"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user