其他补助类工资查询
parent
6eac139ec7
commit
4510a255ca
|
|
@ -108,13 +108,13 @@ public class AuthController {
|
|||
// 登录
|
||||
LoginVo loginVo = IAuthStrategy.login(body, client, grantType);
|
||||
|
||||
Long userId = LoginHelper.getUserId();
|
||||
scheduledExecutorService.schedule(() -> {
|
||||
SseMessageDto dto = new SseMessageDto();
|
||||
dto.setMessage("欢迎使用本系统");
|
||||
dto.setUserIds(List.of(userId));
|
||||
SseMessageUtils.publishMessage(dto);
|
||||
}, 5, TimeUnit.SECONDS);
|
||||
// Long userId = LoginHelper.getUserId();
|
||||
// scheduledExecutorService.schedule(() -> {
|
||||
// SseMessageDto dto = new SseMessageDto();
|
||||
// dto.setMessage("欢迎使用本系统");
|
||||
// dto.setUserIds(List.of(userId));
|
||||
// SseMessageUtils.publishMessage(dto);
|
||||
// }, 5, TimeUnit.SECONDS);
|
||||
return R.ok(loginVo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,8 @@ public class SysLoginService {
|
|||
loginUser.setTenantId(user.getTenantId());
|
||||
loginUser.setUserId(userId);
|
||||
loginUser.setDeptId(user.getDeptId());
|
||||
loginUser.setWorkDeptId(user.getWorkDeptId());
|
||||
|
||||
loginUser.setUsername(user.getUserName());
|
||||
loginUser.setNickname(user.getNickName());
|
||||
loginUser.setUserType(user.getUserType());
|
||||
|
|
@ -164,6 +166,10 @@ public class SysLoginService {
|
|||
loginUser.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
loginUser.setDeptCategory(deptOpt.map(SysDeptVo::getDeptCategory).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
if (ObjectUtil.isNotNull(user.getWorkDeptId())) {
|
||||
Opt<SysDeptVo> deptOpt = Opt.of(user.getWorkDeptId()).map(deptService::selectDeptById);
|
||||
loginUser.setWorkDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
|
||||
List<SysPostVo> posts = postService.selectPostsByUserId(userId);
|
||||
loginUser.setRoles(BeanUtil.copyToList(roles, RoleDTO.class));
|
||||
|
|
|
|||
|
|
@ -47,6 +47,15 @@ public class LoginUser implements Serializable {
|
|||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工作部门ID
|
||||
*/
|
||||
private String workDeptId;
|
||||
/**
|
||||
* 工作部门名
|
||||
*/
|
||||
private String workDeptName;
|
||||
|
||||
/**
|
||||
* 用户唯一标识
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -37,4 +37,12 @@ public class BaseController {
|
|||
return StringUtils.format("redirect:{}", url);
|
||||
}
|
||||
|
||||
public int FInt(Object obj){
|
||||
try{
|
||||
if (obj==null || StringUtils.isEmpty(obj.toString())) return 0;
|
||||
return Integer.parseInt(obj.toString());
|
||||
}catch (Exception ex){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,142 @@
|
|||
package com.ruans.biz.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.ruans.biz.domain.vo.BizHousingImportVo;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.listener.BizHousingImportListener;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruans.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.ruans.common.log.annotation.Log;
|
||||
import com.ruans.common.web.core.BaseController;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
import com.ruans.common.core.domain.R;
|
||||
import com.ruans.common.core.validate.AddGroup;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.log.enums.BusinessType;
|
||||
import com.ruans.common.excel.utils.ExcelUtil;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.domain.bo.BizHousingBo;
|
||||
import com.ruans.biz.service.IBizHousingService;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 住房提租补贴
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/biz/housing")
|
||||
public class BizHousingController extends BaseController {
|
||||
|
||||
private final IBizHousingService bizHousingService;
|
||||
|
||||
/**
|
||||
* 查询住房提租补贴列表
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BizHousingVo> list(BizHousingBo bo, PageQuery pageQuery) {
|
||||
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
return bizHousingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file 导入文件
|
||||
* @param updateSupport 是否更新已存在数据
|
||||
*/
|
||||
@Log(title = "住房提租补贴", businessType = BusinessType.IMPORT)
|
||||
@SaCheckPermission("biz:salary:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<BizHousingImportVo> result = ExcelUtil.importExcel(file.getInputStream(), BizHousingImportVo.class, new BizHousingImportListener(updateSupport));
|
||||
return R.ok(result.getAnalysis());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(new ArrayList<>(), "住房提租补贴", BizHousingImportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出住房提租补贴列表
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:export")
|
||||
@Log(title = "住房提租补贴", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BizHousingBo bo, HttpServletResponse response) {
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
List<BizHousingVo> list = bizHousingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "住房提租补贴", BizHousingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取住房提租补贴详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizHousingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bizHousingService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增住房提租补贴
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:add")
|
||||
@Log(title = "住房提租补贴", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizHousingBo bo) {
|
||||
return toAjax(bizHousingService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改住房提租补贴
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:edit")
|
||||
@Log(title = "住房提租补贴", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizHousingBo bo) {
|
||||
return toAjax(bizHousingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除住房提租补贴
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("biz:housing:remove")
|
||||
@Log(title = "住房提租补贴", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bizHousingService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.biz.domain.vo.BizSalaryImportVo;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
|
|
@ -45,6 +46,7 @@ public class BizSalaryController extends BaseController {
|
|||
|
||||
private final IBizSalaryService bizSalaryService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询工资明细列表
|
||||
*/
|
||||
|
|
@ -52,7 +54,7 @@ public class BizSalaryController extends BaseController {
|
|||
@GetMapping("/list")
|
||||
public TableDataInfo<BizSalaryVo> list(BizSalaryBo bo, PageQuery pageQuery) {
|
||||
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin")){
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
return bizSalaryService.queryPageList(bo, pageQuery);
|
||||
|
|
@ -88,7 +90,7 @@ public class BizSalaryController extends BaseController {
|
|||
@PostMapping("/export")
|
||||
public void export(BizSalaryBo bo, HttpServletResponse response) {
|
||||
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || bo.getUserId().equals(-1)){
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
List<BizSalaryVo> list = bizSalaryService.queryList(bo);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
package com.ruans.biz.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.ruans.biz.domain.vo.BizTrafficImportVo;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.listener.BizTrafficImportListener;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruans.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.ruans.common.log.annotation.Log;
|
||||
import com.ruans.common.web.core.BaseController;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
import com.ruans.common.core.domain.R;
|
||||
import com.ruans.common.core.validate.AddGroup;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.log.enums.BusinessType;
|
||||
import com.ruans.common.excel.utils.ExcelUtil;
|
||||
import com.ruans.biz.domain.vo.BizTrafficVo;
|
||||
import com.ruans.biz.domain.bo.BizTrafficBo;
|
||||
import com.ruans.biz.service.IBizTrafficService;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 公务交通补助
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/biz/traffic")
|
||||
public class BizTrafficController extends BaseController {
|
||||
|
||||
private final IBizTrafficService bizTrafficService;
|
||||
|
||||
/**
|
||||
* 查询公务交通补助列表
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BizTrafficVo> list(BizTrafficBo bo, PageQuery pageQuery) {
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
return bizTrafficService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file 导入文件
|
||||
* @param updateSupport 是否更新已存在数据
|
||||
*/
|
||||
@Log(title = "公务交通补助", businessType = BusinessType.IMPORT)
|
||||
@SaCheckPermission("biz:salary:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<BizTrafficImportVo> result = ExcelUtil.importExcel(file.getInputStream(), BizTrafficImportVo.class, new BizTrafficImportListener(updateSupport));
|
||||
return R.ok(result.getAnalysis());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(new ArrayList<>(), "公务交通补助", BizTrafficImportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公务交通补助列表
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:export")
|
||||
@Log(title = "公务交通补助", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BizTrafficBo bo, HttpServletResponse response) {
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
List<BizTrafficVo> list = bizTrafficService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "公务交通补助", BizTrafficVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公务交通补助详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizTrafficVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bizTrafficService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公务交通补助
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:add")
|
||||
@Log(title = "公务交通补助", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizTrafficBo bo) {
|
||||
return toAjax(bizTrafficService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公务交通补助
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:edit")
|
||||
@Log(title = "公务交通补助", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizTrafficBo bo) {
|
||||
return toAjax(bizTrafficService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公务交通补助
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("biz:traffic:remove")
|
||||
@Log(title = "公务交通补助", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bizTrafficService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
package com.ruans.biz.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.ruans.biz.domain.vo.BizVillageImportVo;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.listener.BizVillageImportListener;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruans.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.ruans.common.log.annotation.Log;
|
||||
import com.ruans.common.web.core.BaseController;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
import com.ruans.common.core.domain.R;
|
||||
import com.ruans.common.core.validate.AddGroup;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.log.enums.BusinessType;
|
||||
import com.ruans.common.excel.utils.ExcelUtil;
|
||||
import com.ruans.biz.domain.vo.BizVillageVo;
|
||||
import com.ruans.biz.domain.bo.BizVillageBo;
|
||||
import com.ruans.biz.service.IBizVillageService;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 包村差旅补助
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/biz/village")
|
||||
public class BizVillageController extends BaseController {
|
||||
|
||||
private final IBizVillageService bizVillageService;
|
||||
|
||||
/**
|
||||
* 查询包村差旅补助列表
|
||||
*/
|
||||
@SaCheckPermission("biz:village:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BizVillageVo> list(BizVillageBo bo, PageQuery pageQuery) {
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
return bizVillageService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file 导入文件
|
||||
* @param updateSupport 是否更新已存在数据
|
||||
*/
|
||||
@Log(title = "包村差旅补助", businessType = BusinessType.IMPORT)
|
||||
@SaCheckPermission("biz:salary:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelResult<BizVillageImportVo> result = ExcelUtil.importExcel(file.getInputStream(), BizVillageImportVo.class, new BizVillageImportListener(updateSupport));
|
||||
return R.ok(result.getAnalysis());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(new ArrayList<>(), "包村差旅补助", BizVillageImportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出包村差旅补助列表
|
||||
*/
|
||||
@SaCheckPermission("biz:village:export")
|
||||
@Log(title = "包村差旅补助", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BizVillageBo bo, HttpServletResponse response) {
|
||||
if (!StpUtil.hasRoleOr("manager", "superadmin") || FInt(bo.getUserId())== -1){
|
||||
bo.setUserId(LoginHelper.getUserId());
|
||||
}
|
||||
List<BizVillageVo> list = bizVillageService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "包村差旅补助", BizVillageVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取包村差旅补助详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("biz:village:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizVillageVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bizVillageService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增包村差旅补助
|
||||
*/
|
||||
@SaCheckPermission("biz:village:add")
|
||||
@Log(title = "包村差旅补助", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizVillageBo bo) {
|
||||
return toAjax(bizVillageService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改包村差旅补助
|
||||
*/
|
||||
@SaCheckPermission("biz:village:edit")
|
||||
@Log(title = "包村差旅补助", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizVillageBo bo) {
|
||||
return toAjax(bizVillageService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除包村差旅补助
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("biz:village:remove")
|
||||
@Log(title = "包村差旅补助", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bizVillageService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.ruans.biz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 住房提租补贴对象 biz_housing
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("biz_housing")
|
||||
public class BizHousing extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 住房提租补贴
|
||||
*/
|
||||
private Long housingAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.ruans.biz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 公务交通补助对象 biz_traffic
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("biz_traffic")
|
||||
public class BizTraffic extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 公务交通补助
|
||||
*/
|
||||
private Long trafficAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruans.biz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 包村差旅补助对象 biz_village
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("biz_village")
|
||||
public class BizVillage extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资季度
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 包村差旅补助
|
||||
*/
|
||||
private Long villageSubsidy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.ruans.biz.domain.bo;
|
||||
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 住房提租补贴业务对象 biz_housing
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BizHousing.class, reverseConvertGenerate = false)
|
||||
public class BizHousingBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 住房提租补贴
|
||||
*/
|
||||
private Long housingAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.ruans.biz.domain.bo;
|
||||
|
||||
import com.ruans.biz.domain.BizTraffic;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 公务交通补助业务对象 biz_traffic
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BizTraffic.class, reverseConvertGenerate = false)
|
||||
public class BizTrafficBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 公务交通补助
|
||||
*/
|
||||
private Long trafficAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.ruans.biz.domain.bo;
|
||||
|
||||
import com.ruans.biz.domain.BizVillage;
|
||||
import com.ruans.common.core.validate.EditGroup;
|
||||
import com.ruans.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 包村差旅补助业务对象 biz_village
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BizVillage.class, reverseConvertGenerate = false)
|
||||
public class BizVillageBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资季度
|
||||
*/
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 包村差旅补助
|
||||
*/
|
||||
private Long villageSubsidy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 住房提租补贴对象导入VO
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
|
||||
public class BizHousingImportVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ColumnWidth(18)
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
@ColumnWidth(10)
|
||||
@ExcelProperty(value = "月份", index = 0)
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 住房提租补贴
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "住房提租补贴")
|
||||
private Long housingAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "增发")
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "减发")
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "实发")
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ColumnWidth(25)
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long createUserId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruans.common.excel.annotation.ExcelDictFormat;
|
||||
import com.ruans.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 住房提租补贴视图对象 biz_housing
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BizHousing.class)
|
||||
public class BizHousingVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
@ExcelProperty(value = "工资类型")
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelProperty(value = "警号")
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "部门ID")
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
@ExcelProperty(value = "工资月份")
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 住房提租补贴
|
||||
*/
|
||||
@ExcelProperty(value = "住房提租补贴")
|
||||
private Long housingAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
@ExcelProperty(value = "增发")
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
@ExcelProperty(value = "减发")
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
@ExcelProperty(value = "实发")
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "创建用户ID")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公务交通补助对象导入VO
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
|
||||
public class BizTrafficImportVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ColumnWidth(18)
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
@ColumnWidth(10)
|
||||
@ExcelProperty(value = "月份", index = 0)
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 公务交通补助
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "公务交通补助")
|
||||
private Long trafficAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "增发")
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "减发")
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "实发")
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ColumnWidth(25)
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long createUserId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.ruans.biz.domain.BizTraffic;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruans.common.excel.annotation.ExcelDictFormat;
|
||||
import com.ruans.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 公务交通补助视图对象 biz_traffic
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BizTraffic.class)
|
||||
public class BizTrafficVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
@ExcelProperty(value = "工资类型")
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelProperty(value = "警号")
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "部门ID")
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
@ExcelProperty(value = "工资月份")
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 公务交通补助
|
||||
*/
|
||||
@ExcelProperty(value = "公务交通补助")
|
||||
private Long trafficAllowance;
|
||||
|
||||
/**
|
||||
* 增发
|
||||
*/
|
||||
@ExcelProperty(value = "增发")
|
||||
private Long increasePay;
|
||||
|
||||
/**
|
||||
* 减发
|
||||
*/
|
||||
@ExcelProperty(value = "减发")
|
||||
private Long reducePay;
|
||||
|
||||
/**
|
||||
* 实发
|
||||
*/
|
||||
@ExcelProperty(value = "实发")
|
||||
private Long actualSalary;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "创建用户ID")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 包村差旅补助对象导入VO
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
|
||||
public class BizVillageImportVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ColumnWidth(18)
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资月份
|
||||
*/
|
||||
@ColumnWidth(10)
|
||||
@ExcelProperty(value = "季度", index = 0)
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 包村差旅补助
|
||||
*/
|
||||
@ColumnWidth(8)
|
||||
@ExcelProperty(value = "包村差旅补助")
|
||||
private Long villageSubsidy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ColumnWidth(25)
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Long createUserId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.ruans.biz.domain.vo;
|
||||
|
||||
import com.ruans.biz.domain.BizVillage;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruans.common.excel.annotation.ExcelDictFormat;
|
||||
import com.ruans.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 包村差旅补助视图对象 biz_village
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BizVillage.class)
|
||||
public class BizVillageVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工资类型
|
||||
*/
|
||||
@ExcelProperty(value = "工资类型")
|
||||
private String salaryType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 警号
|
||||
*/
|
||||
@ExcelProperty(value = "警号")
|
||||
private String policeNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "人员姓名")
|
||||
private String policeName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty(value = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ExcelProperty(value = "银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "部门ID")
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 工资季度
|
||||
*/
|
||||
@ExcelProperty(value = "工资季度")
|
||||
private String salaryYearMonth;
|
||||
|
||||
/**
|
||||
* 包村差旅补助
|
||||
*/
|
||||
@ExcelProperty(value = "包村差旅补助")
|
||||
private Long villageSubsidy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "创建用户ID")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruans.biz.mapper;
|
||||
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 住房提租补贴Mapper接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface BizHousingMapper extends BaseMapperPlus<BizHousing, BizHousingVo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruans.biz.mapper;
|
||||
|
||||
import com.ruans.biz.domain.BizTraffic;
|
||||
import com.ruans.biz.domain.vo.BizTrafficVo;
|
||||
import com.ruans.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 公务交通补助Mapper接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface BizTrafficMapper extends BaseMapperPlus<BizTraffic, BizTrafficVo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruans.biz.mapper;
|
||||
|
||||
import com.ruans.biz.domain.BizVillage;
|
||||
import com.ruans.biz.domain.vo.BizVillageVo;
|
||||
import com.ruans.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 包村差旅补助Mapper接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface BizVillageMapper extends BaseMapperPlus<BizVillage, BizVillageVo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruans.biz.service;
|
||||
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.domain.bo.BizHousingBo;
|
||||
import com.ruans.biz.domain.vo.BizSalaryVo;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 住房提租补贴Service接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface IBizHousingService {
|
||||
|
||||
/**
|
||||
* 查询住房提租补贴
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 住房提租补贴
|
||||
*/
|
||||
BizHousingVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 通过身份证号查询住房提租补贴
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @param salaryYearMonth 工资月份
|
||||
* @return 住房提租补贴对象信息
|
||||
*/
|
||||
BizHousingVo selectSalaryByIdCardAndMouth(String idCard, String salaryYearMonth);
|
||||
|
||||
/**
|
||||
* 分页查询住房提租补贴列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 住房提租补贴分页列表
|
||||
*/
|
||||
TableDataInfo<BizHousingVo> queryPageList(BizHousingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的住房提租补贴列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 住房提租补贴列表
|
||||
*/
|
||||
List<BizHousingVo> queryList(BizHousingBo bo);
|
||||
|
||||
/**
|
||||
* 新增住房提租补贴
|
||||
*
|
||||
* @param bo 住房提租补贴
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BizHousingBo bo);
|
||||
|
||||
/**
|
||||
* 修改住房提租补贴
|
||||
*
|
||||
* @param bo 住房提租补贴
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BizHousingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除住房提租补贴信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruans.biz.service;
|
||||
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.domain.vo.BizTrafficVo;
|
||||
import com.ruans.biz.domain.bo.BizTrafficBo;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公务交通补助Service接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface IBizTrafficService {
|
||||
|
||||
/**
|
||||
* 查询公务交通补助
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 公务交通补助
|
||||
*/
|
||||
BizTrafficVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 通过身份证号查询住房提租补贴
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @param salaryYearMonth 工资月份
|
||||
* @return 住房提租补贴对象信息
|
||||
*/
|
||||
BizTrafficVo selectSalaryByIdCardAndMouth(String idCard, String salaryYearMonth);
|
||||
|
||||
/**
|
||||
* 分页查询公务交通补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 公务交通补助分页列表
|
||||
*/
|
||||
TableDataInfo<BizTrafficVo> queryPageList(BizTrafficBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的公务交通补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 公务交通补助列表
|
||||
*/
|
||||
List<BizTrafficVo> queryList(BizTrafficBo bo);
|
||||
|
||||
/**
|
||||
* 新增公务交通补助
|
||||
*
|
||||
* @param bo 公务交通补助
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BizTrafficBo bo);
|
||||
|
||||
/**
|
||||
* 修改公务交通补助
|
||||
*
|
||||
* @param bo 公务交通补助
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BizTrafficBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除公务交通补助信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruans.biz.service;
|
||||
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.domain.vo.BizVillageVo;
|
||||
import com.ruans.biz.domain.bo.BizVillageBo;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 包村差旅补助Service接口
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
public interface IBizVillageService {
|
||||
|
||||
/**
|
||||
* 查询包村差旅补助
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 包村差旅补助
|
||||
*/
|
||||
BizVillageVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 通过身份证号查询包村差旅补助
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @param salaryYearMonth 工资月份
|
||||
* @return 包村差旅补助
|
||||
*/
|
||||
BizVillageVo selectSalaryByIdCardAndMouth(String idCard, String salaryYearMonth);
|
||||
|
||||
/**
|
||||
* 分页查询包村差旅补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 包村差旅补助分页列表
|
||||
*/
|
||||
TableDataInfo<BizVillageVo> queryPageList(BizVillageBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的包村差旅补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 包村差旅补助列表
|
||||
*/
|
||||
List<BizVillageVo> queryList(BizVillageBo bo);
|
||||
|
||||
/**
|
||||
* 新增包村差旅补助
|
||||
*
|
||||
* @param bo 包村差旅补助
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BizVillageBo bo);
|
||||
|
||||
/**
|
||||
* 修改包村差旅补助
|
||||
*
|
||||
* @param bo 包村差旅补助
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BizVillageBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除包村差旅补助信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package com.ruans.biz.service.impl;
|
||||
|
||||
import com.ruans.biz.domain.BizSalary;
|
||||
import com.ruans.biz.domain.vo.BizSalaryVo;
|
||||
import com.ruans.common.core.utils.MapstructUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.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.ruans.biz.domain.bo.BizHousingBo;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.ruans.biz.mapper.BizHousingMapper;
|
||||
import com.ruans.biz.service.IBizHousingService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 住房提租补贴Service业务层处理
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class BizHousingServiceImpl implements IBizHousingService {
|
||||
|
||||
private final BizHousingMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询住房提租补贴
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 住房提租补贴
|
||||
*/
|
||||
@Override
|
||||
public BizHousingVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过身份证号查询住房提租补贴
|
||||
*
|
||||
* @param idcard 身份证号
|
||||
* @param salaryYearMonth 身份证号
|
||||
* @return 住房提租补贴
|
||||
*/
|
||||
@Override
|
||||
public BizHousingVo selectSalaryByIdCardAndMouth(String idcard, String salaryYearMonth){
|
||||
return baseMapper.selectVoOne(new LambdaQueryWrapper<BizHousing>().eq(BizHousing::getIdcard, idcard).eq(BizHousing::getSalaryYearMonth, salaryYearMonth));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询住房提租补贴列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 住房提租补贴分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BizHousingVo> queryPageList(BizHousingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BizHousing> lqw = buildQueryWrapper(bo);
|
||||
Page<BizHousingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的住房提租补贴列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 住房提租补贴列表
|
||||
*/
|
||||
@Override
|
||||
public List<BizHousingVo> queryList(BizHousingBo bo) {
|
||||
LambdaQueryWrapper<BizHousing> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BizHousing> buildQueryWrapper(BizHousingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BizHousing> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BizHousing::getSalaryYearMonth);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryType()), BizHousing::getSalaryType, bo.getSalaryType());
|
||||
lqw.eq(bo.getUserId() != null, BizHousing::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPoliceNo()), BizHousing::getPoliceNo, bo.getPoliceNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPoliceName()), BizHousing::getPoliceName, bo.getPoliceName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIdcard()), BizHousing::getIdcard, bo.getIdcard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBankCard()), BizHousing::getBankCard, bo.getBankCard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), BizHousing::getDeptId, bo.getDeptId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), BizHousing::getDeptName, bo.getDeptName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryYearMonth()), BizHousing::getSalaryYearMonth, bo.getSalaryYearMonth());
|
||||
lqw.eq(bo.getHousingAllowance() != null, BizHousing::getHousingAllowance, bo.getHousingAllowance());
|
||||
lqw.eq(bo.getIncreasePay() != null, BizHousing::getIncreasePay, bo.getIncreasePay());
|
||||
lqw.eq(bo.getReducePay() != null, BizHousing::getReducePay, bo.getReducePay());
|
||||
lqw.eq(bo.getActualSalary() != null, BizHousing::getActualSalary, bo.getActualSalary());
|
||||
lqw.eq(bo.getCreateUserId() != null, BizHousing::getCreateUserId, bo.getCreateUserId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增住房提租补贴
|
||||
*
|
||||
* @param bo 住房提租补贴
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BizHousingBo bo) {
|
||||
BizHousing add = MapstructUtils.convert(bo, BizHousing.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改住房提租补贴
|
||||
*
|
||||
* @param bo 住房提租补贴
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BizHousingBo bo) {
|
||||
BizHousing update = MapstructUtils.convert(bo, BizHousing.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BizHousing entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除住房提租补贴信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package com.ruans.biz.service.impl;
|
||||
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.common.core.utils.MapstructUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.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.ruans.biz.domain.bo.BizTrafficBo;
|
||||
import com.ruans.biz.domain.vo.BizTrafficVo;
|
||||
import com.ruans.biz.domain.BizTraffic;
|
||||
import com.ruans.biz.mapper.BizTrafficMapper;
|
||||
import com.ruans.biz.service.IBizTrafficService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 公务交通补助Service业务层处理
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class BizTrafficServiceImpl implements IBizTrafficService {
|
||||
|
||||
private final BizTrafficMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询公务交通补助
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 公务交通补助
|
||||
*/
|
||||
@Override
|
||||
public BizTrafficVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过身份证号查询公务交通补助
|
||||
*
|
||||
* @param idcard 身份证号
|
||||
* @param salaryYearMonth 身份证号
|
||||
* @return 公务交通补助
|
||||
*/
|
||||
@Override
|
||||
public BizTrafficVo selectSalaryByIdCardAndMouth(String idcard, String salaryYearMonth){
|
||||
return baseMapper.selectVoOne(new LambdaQueryWrapper<BizTraffic>().eq(BizTraffic::getIdcard, idcard).eq(BizTraffic::getSalaryYearMonth, salaryYearMonth));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询公务交通补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 公务交通补助分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BizTrafficVo> queryPageList(BizTrafficBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BizTraffic> lqw = buildQueryWrapper(bo);
|
||||
Page<BizTrafficVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的公务交通补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 公务交通补助列表
|
||||
*/
|
||||
@Override
|
||||
public List<BizTrafficVo> queryList(BizTrafficBo bo) {
|
||||
LambdaQueryWrapper<BizTraffic> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BizTraffic> buildQueryWrapper(BizTrafficBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BizTraffic> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BizTraffic::getSalaryYearMonth);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryType()), BizTraffic::getSalaryType, bo.getSalaryType());
|
||||
lqw.eq(bo.getUserId() != null, BizTraffic::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPoliceNo()), BizTraffic::getPoliceNo, bo.getPoliceNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPoliceName()), BizTraffic::getPoliceName, bo.getPoliceName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIdcard()), BizTraffic::getIdcard, bo.getIdcard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBankCard()), BizTraffic::getBankCard, bo.getBankCard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), BizTraffic::getDeptId, bo.getDeptId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), BizTraffic::getDeptName, bo.getDeptName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryYearMonth()), BizTraffic::getSalaryYearMonth, bo.getSalaryYearMonth());
|
||||
lqw.eq(bo.getTrafficAllowance() != null, BizTraffic::getTrafficAllowance, bo.getTrafficAllowance());
|
||||
lqw.eq(bo.getIncreasePay() != null, BizTraffic::getIncreasePay, bo.getIncreasePay());
|
||||
lqw.eq(bo.getReducePay() != null, BizTraffic::getReducePay, bo.getReducePay());
|
||||
lqw.eq(bo.getActualSalary() != null, BizTraffic::getActualSalary, bo.getActualSalary());
|
||||
lqw.eq(bo.getCreateUserId() != null, BizTraffic::getCreateUserId, bo.getCreateUserId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公务交通补助
|
||||
*
|
||||
* @param bo 公务交通补助
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BizTrafficBo bo) {
|
||||
BizTraffic add = MapstructUtils.convert(bo, BizTraffic.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公务交通补助
|
||||
*
|
||||
* @param bo 公务交通补助
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BizTrafficBo bo) {
|
||||
BizTraffic update = MapstructUtils.convert(bo, BizTraffic.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BizTraffic entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除公务交通补助信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
package com.ruans.biz.service.impl;
|
||||
|
||||
import com.ruans.biz.domain.BizHousing;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.common.core.utils.MapstructUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.mybatis.core.page.TableDataInfo;
|
||||
import com.ruans.common.mybatis.core.page.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.ruans.biz.domain.bo.BizVillageBo;
|
||||
import com.ruans.biz.domain.vo.BizVillageVo;
|
||||
import com.ruans.biz.domain.BizVillage;
|
||||
import com.ruans.biz.mapper.BizVillageMapper;
|
||||
import com.ruans.biz.service.IBizVillageService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 包村差旅补助Service业务层处理
|
||||
*
|
||||
* @author YIN
|
||||
* @date 2026-04-02
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class BizVillageServiceImpl implements IBizVillageService {
|
||||
|
||||
private final BizVillageMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询包村差旅补助
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 包村差旅补助
|
||||
*/
|
||||
@Override
|
||||
public BizVillageVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过身份证号查询包村差旅补助
|
||||
*
|
||||
* @param idcard 身份证号
|
||||
* @param salaryYearMonth 身份证号
|
||||
* @return 包村差旅补助
|
||||
*/
|
||||
@Override
|
||||
public BizVillageVo selectSalaryByIdCardAndMouth(String idcard, String salaryYearMonth){
|
||||
return baseMapper.selectVoOne(new LambdaQueryWrapper<BizVillage>().eq(BizVillage::getIdcard, idcard).eq(BizVillage::getSalaryYearMonth, salaryYearMonth));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询包村差旅补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 包村差旅补助分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BizVillageVo> queryPageList(BizVillageBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BizVillage> lqw = buildQueryWrapper(bo);
|
||||
Page<BizVillageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的包村差旅补助列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 包村差旅补助列表
|
||||
*/
|
||||
@Override
|
||||
public List<BizVillageVo> queryList(BizVillageBo bo) {
|
||||
LambdaQueryWrapper<BizVillage> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BizVillage> buildQueryWrapper(BizVillageBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BizVillage> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BizVillage::getCreateTime);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryType()), BizVillage::getSalaryType, bo.getSalaryType());
|
||||
lqw.eq(bo.getUserId() != null, BizVillage::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPoliceNo()), BizVillage::getPoliceNo, bo.getPoliceNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPoliceName()), BizVillage::getPoliceName, bo.getPoliceName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIdcard()), BizVillage::getIdcard, bo.getIdcard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBankCard()), BizVillage::getBankCard, bo.getBankCard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), BizVillage::getDeptId, bo.getDeptId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), BizVillage::getDeptName, bo.getDeptName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSalaryYearMonth()), BizVillage::getSalaryYearMonth, bo.getSalaryYearMonth());
|
||||
lqw.eq(bo.getVillageSubsidy() != null, BizVillage::getVillageSubsidy, bo.getVillageSubsidy());
|
||||
lqw.eq(bo.getCreateUserId() != null, BizVillage::getCreateUserId, bo.getCreateUserId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增包村差旅补助
|
||||
*
|
||||
* @param bo 包村差旅补助
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BizVillageBo bo) {
|
||||
BizVillage add = MapstructUtils.convert(bo, BizVillage.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改包村差旅补助
|
||||
*
|
||||
* @param bo 包村差旅补助
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BizVillageBo bo) {
|
||||
BizVillage update = MapstructUtils.convert(bo, BizVillage.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BizVillage entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除包村差旅补助信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package com.ruans.system.listener;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.ruans.biz.domain.bo.BizHousingBo;
|
||||
import com.ruans.biz.domain.vo.BizHousingImportVo;
|
||||
import com.ruans.biz.domain.vo.BizHousingVo;
|
||||
import com.ruans.biz.service.IBizHousingService;
|
||||
import com.ruans.common.core.exception.ServiceException;
|
||||
import com.ruans.common.core.utils.SpringUtils;
|
||||
import com.ruans.common.core.utils.StreamUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.core.utils.ValidatorUtils;
|
||||
import com.ruans.common.excel.core.ExcelListener;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.domain.vo.SysDeptVo;
|
||||
import com.ruans.system.domain.vo.SysUserVo;
|
||||
import com.ruans.system.service.ISysDeptService;
|
||||
import com.ruans.system.service.ISysUserService;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 住房提租补贴自定义导入
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
@Slf4j
|
||||
public class BizHousingImportListener extends AnalysisEventListener<BizHousingImportVo> implements ExcelListener<BizHousingImportVo> {
|
||||
|
||||
private final ISysUserService userService;
|
||||
private final IBizHousingService salaryService;
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
private final Boolean isUpdateSupport;
|
||||
|
||||
private final Long operUserId;
|
||||
|
||||
private int successNum = 0;
|
||||
private int failureNum = 0;
|
||||
private final StringBuilder successMsg = new StringBuilder();
|
||||
private final StringBuilder failureMsg = new StringBuilder();
|
||||
|
||||
public BizHousingImportListener(Boolean isUpdateSupport) {
|
||||
|
||||
this.userService = SpringUtils.getBean(ISysUserService.class);
|
||||
this.salaryService = SpringUtils.getBean(IBizHousingService.class);
|
||||
this.deptService = SpringUtils.getBean(ISysDeptService.class);
|
||||
|
||||
this.isUpdateSupport = isUpdateSupport;
|
||||
this.operUserId = LoginHelper.getUserId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(BizHousingImportVo importVo, AnalysisContext context) {
|
||||
BizHousingVo salaryVo = this.salaryService.selectSalaryByIdCardAndMouth(importVo.getIdcard(), importVo.getSalaryYearMonth());
|
||||
try {
|
||||
SysUserVo dbUser = this.userService.selectUserByIdCard(importVo.getIdcard());
|
||||
if (ObjectUtil.isNull(dbUser)){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、住房提租补贴导入失败,民警 ")
|
||||
.append(salaryVo.getPoliceName())
|
||||
.append(salaryVo.getIdcard())
|
||||
.append(" 不存在");
|
||||
}else {
|
||||
importVo.setUserId(dbUser.getUserId());
|
||||
importVo.setPoliceNo(dbUser.getUserName());
|
||||
importVo.setDeptId(dbUser.getWorkDeptId());
|
||||
importVo.setDeptName(dbUser.getWorkDeptName());
|
||||
if (ObjectUtil.isNotNull(dbUser.getWorkDeptId())) {
|
||||
Opt<SysDeptVo> deptOpt = Opt.of(dbUser.getWorkDeptId()).map(this.deptService::selectDeptById);
|
||||
importVo.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
|
||||
// 验证是否存在这条 住房提租补贴记录
|
||||
if (ObjectUtil.isNull(salaryVo)) {
|
||||
|
||||
BizHousingBo salary = BeanUtil.toBean(importVo, BizHousingBo.class);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setCreateUserId(operUserId);
|
||||
salaryService.insertByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、住房提租补贴 ").append(salary.getPoliceName()).append(" 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
Long id = salaryVo.getId();
|
||||
BizHousingBo salary = BeanUtil.toBean(importVo, BizHousingBo.class);
|
||||
salary.setUserId(id);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setUpdateBy(operUserId);
|
||||
salaryService.updateByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、住房提租补贴 ").append(salary.getPoliceName()).append(" 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、住房提租补贴 ").append(salaryVo.getPoliceName()).append(" 已存在");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、住房提租补贴 " + HtmlUtil.cleanHtmlTag(salaryVo.getPoliceName()) + " 导入失败:";
|
||||
String message = e.getMessage();
|
||||
if (e instanceof ConstraintViolationException cvException) {
|
||||
message = StreamUtils.join(cvException.getConstraintViolations(), ConstraintViolation::getMessage, ", ");
|
||||
}
|
||||
failureMsg.append(msg).append(message);
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExcelResult<BizHousingImportVo> getExcelResult() {
|
||||
return new ExcelResult<>() {
|
||||
|
||||
@Override
|
||||
public String getAnalysis() {
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BizHousingImportVo> getList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getErrorList() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ruans.system.listener;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.BCrypt;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
|
|
@ -9,6 +10,9 @@ import com.alibaba.excel.event.AnalysisEventListener;
|
|||
import com.ruans.biz.domain.bo.BizSalaryBo;
|
||||
import com.ruans.biz.domain.vo.BizSalaryVo;
|
||||
import com.ruans.biz.service.IBizSalaryService;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.system.domain.vo.SysDeptVo;
|
||||
import com.ruans.system.service.ISysDeptService;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import com.ruans.common.core.exception.ServiceException;
|
||||
|
|
@ -37,6 +41,7 @@ public class BizSalaryImportListener extends AnalysisEventListener<BizSalaryImpo
|
|||
|
||||
private final ISysUserService userService;
|
||||
private final IBizSalaryService salaryService;
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
private final Boolean isUpdateSupport;
|
||||
|
||||
|
|
@ -51,6 +56,7 @@ public class BizSalaryImportListener extends AnalysisEventListener<BizSalaryImpo
|
|||
|
||||
this.userService = SpringUtils.getBean(ISysUserService.class);
|
||||
this.salaryService = SpringUtils.getBean(IBizSalaryService.class);
|
||||
this.deptService = SpringUtils.getBean(ISysDeptService.class);
|
||||
|
||||
this.isUpdateSupport = isUpdateSupport;
|
||||
this.operUserId = LoginHelper.getUserId();
|
||||
|
|
@ -72,6 +78,10 @@ public class BizSalaryImportListener extends AnalysisEventListener<BizSalaryImpo
|
|||
importVo.setPoliceNo(dbUser.getUserName());
|
||||
importVo.setDeptId(dbUser.getWorkDeptId());
|
||||
importVo.setDeptName(dbUser.getWorkDeptName());
|
||||
if (ObjectUtil.isNotNull(dbUser.getWorkDeptId())) {
|
||||
Opt<SysDeptVo> deptOpt = Opt.of(dbUser.getWorkDeptId()).map(this.deptService::selectDeptById);
|
||||
importVo.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
|
||||
// 验证是否存在这条 工资明细记录
|
||||
if (ObjectUtil.isNull(salaryVo)) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
package com.ruans.system.listener;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.ruans.biz.domain.bo.BizTrafficBo;
|
||||
import com.ruans.biz.domain.vo.BizTrafficImportVo;
|
||||
import com.ruans.biz.domain.vo.BizTrafficVo;
|
||||
import com.ruans.biz.service.IBizTrafficService;
|
||||
import com.ruans.common.core.exception.ServiceException;
|
||||
import com.ruans.common.core.utils.SpringUtils;
|
||||
import com.ruans.common.core.utils.StreamUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.core.utils.ValidatorUtils;
|
||||
import com.ruans.common.excel.core.ExcelListener;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.domain.vo.SysDeptVo;
|
||||
import com.ruans.system.domain.vo.SysUserVo;
|
||||
import com.ruans.system.service.ISysDeptService;
|
||||
import com.ruans.system.service.ISysUserService;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公务交通补助自定义导入
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
@Slf4j
|
||||
public class BizTrafficImportListener extends AnalysisEventListener<BizTrafficImportVo> implements ExcelListener<BizTrafficImportVo> {
|
||||
|
||||
private final ISysUserService userService;
|
||||
private final IBizTrafficService salaryService;
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
private final Boolean isUpdateSupport;
|
||||
|
||||
private final Long operUserId;
|
||||
|
||||
private int successNum = 0;
|
||||
private int failureNum = 0;
|
||||
private final StringBuilder successMsg = new StringBuilder();
|
||||
private final StringBuilder failureMsg = new StringBuilder();
|
||||
|
||||
public BizTrafficImportListener(Boolean isUpdateSupport) {
|
||||
|
||||
this.userService = SpringUtils.getBean(ISysUserService.class);
|
||||
this.salaryService = SpringUtils.getBean(IBizTrafficService.class);
|
||||
this.deptService = SpringUtils.getBean(ISysDeptService.class);
|
||||
|
||||
this.isUpdateSupport = isUpdateSupport;
|
||||
this.operUserId = LoginHelper.getUserId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(BizTrafficImportVo importVo, AnalysisContext context) {
|
||||
BizTrafficVo salaryVo = this.salaryService.selectSalaryByIdCardAndMouth(importVo.getIdcard(), importVo.getSalaryYearMonth());
|
||||
try {
|
||||
SysUserVo dbUser = this.userService.selectUserByIdCard(importVo.getIdcard());
|
||||
if (ObjectUtil.isNull(dbUser)){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、公务交通补助导入失败,民警 ")
|
||||
.append(salaryVo.getPoliceName())
|
||||
.append(salaryVo.getIdcard())
|
||||
.append(" 不存在");
|
||||
}else {
|
||||
importVo.setUserId(dbUser.getUserId());
|
||||
importVo.setPoliceNo(dbUser.getUserName());
|
||||
importVo.setDeptId(dbUser.getWorkDeptId());
|
||||
importVo.setDeptName(dbUser.getWorkDeptName());
|
||||
if (ObjectUtil.isNotNull(dbUser.getWorkDeptId())) {
|
||||
Opt<SysDeptVo> deptOpt = Opt.of(dbUser.getWorkDeptId()).map(this.deptService::selectDeptById);
|
||||
importVo.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
|
||||
// 验证是否存在这条 公务交通补助记录
|
||||
if (ObjectUtil.isNull(salaryVo)) {
|
||||
|
||||
BizTrafficBo salary = BeanUtil.toBean(importVo, BizTrafficBo.class);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setCreateUserId(operUserId);
|
||||
salaryService.insertByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、公务交通补助 ").append(salary.getPoliceName()).append(" 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
Long id = salaryVo.getId();
|
||||
BizTrafficBo salary = BeanUtil.toBean(importVo, BizTrafficBo.class);
|
||||
salary.setUserId(id);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setUpdateBy(operUserId);
|
||||
salaryService.updateByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、公务交通补助 ").append(salary.getPoliceName()).append(" 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、公务交通补助 ").append(salaryVo.getPoliceName()).append(" 已存在");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、公务交通补助 " + HtmlUtil.cleanHtmlTag(salaryVo.getPoliceName()) + " 导入失败:";
|
||||
String message = e.getMessage();
|
||||
if (e instanceof ConstraintViolationException cvException) {
|
||||
message = StreamUtils.join(cvException.getConstraintViolations(), ConstraintViolation::getMessage, ", ");
|
||||
}
|
||||
failureMsg.append(msg).append(message);
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExcelResult<BizTrafficImportVo> getExcelResult() {
|
||||
return new ExcelResult<>() {
|
||||
|
||||
@Override
|
||||
public String getAnalysis() {
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BizTrafficImportVo> getList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getErrorList() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package com.ruans.system.listener;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.ruans.biz.domain.bo.BizVillageBo;
|
||||
import com.ruans.biz.domain.vo.BizVillageImportVo;
|
||||
import com.ruans.biz.domain.vo.BizVillageVo;
|
||||
import com.ruans.biz.service.IBizVillageService;
|
||||
import com.ruans.common.core.exception.ServiceException;
|
||||
import com.ruans.common.core.utils.SpringUtils;
|
||||
import com.ruans.common.core.utils.StreamUtils;
|
||||
import com.ruans.common.core.utils.StringUtils;
|
||||
import com.ruans.common.core.utils.ValidatorUtils;
|
||||
import com.ruans.common.excel.core.ExcelListener;
|
||||
import com.ruans.common.excel.core.ExcelResult;
|
||||
import com.ruans.common.satoken.utils.LoginHelper;
|
||||
import com.ruans.system.domain.vo.SysDeptVo;
|
||||
import com.ruans.system.domain.vo.SysUserVo;
|
||||
import com.ruans.system.service.ISysDeptService;
|
||||
import com.ruans.system.service.ISysUserService;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 包村差旅补助自定义导入
|
||||
*
|
||||
* @author YIN
|
||||
*/
|
||||
@Slf4j
|
||||
public class BizVillageImportListener extends AnalysisEventListener<BizVillageImportVo> implements ExcelListener<BizVillageImportVo> {
|
||||
|
||||
private final ISysUserService userService;
|
||||
private final IBizVillageService salaryService;
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
private final Boolean isUpdateSupport;
|
||||
|
||||
private final Long operUserId;
|
||||
|
||||
private int successNum = 0;
|
||||
private int failureNum = 0;
|
||||
private final StringBuilder successMsg = new StringBuilder();
|
||||
private final StringBuilder failureMsg = new StringBuilder();
|
||||
|
||||
public BizVillageImportListener(Boolean isUpdateSupport) {
|
||||
|
||||
this.userService = SpringUtils.getBean(ISysUserService.class);
|
||||
this.salaryService = SpringUtils.getBean(IBizVillageService.class);
|
||||
this.deptService = SpringUtils.getBean(ISysDeptService.class);
|
||||
|
||||
this.isUpdateSupport = isUpdateSupport;
|
||||
this.operUserId = LoginHelper.getUserId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(BizVillageImportVo importVo, AnalysisContext context) {
|
||||
BizVillageVo salaryVo = this.salaryService.selectSalaryByIdCardAndMouth(importVo.getIdcard(), importVo.getSalaryYearMonth());
|
||||
try {
|
||||
SysUserVo dbUser = this.userService.selectUserByIdCard(importVo.getIdcard());
|
||||
if (ObjectUtil.isNull(dbUser)){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、包村差旅补助导入失败,民警 ")
|
||||
.append(salaryVo.getPoliceName())
|
||||
.append(salaryVo.getIdcard())
|
||||
.append(" 不存在");
|
||||
}else {
|
||||
importVo.setUserId(dbUser.getUserId());
|
||||
importVo.setPoliceNo(dbUser.getUserName());
|
||||
importVo.setDeptId(dbUser.getWorkDeptId());
|
||||
importVo.setDeptName(dbUser.getWorkDeptName());
|
||||
if (ObjectUtil.isNotNull(dbUser.getWorkDeptId())) {
|
||||
Opt<SysDeptVo> deptOpt = Opt.of(dbUser.getWorkDeptId()).map(this.deptService::selectDeptById);
|
||||
importVo.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));
|
||||
}
|
||||
|
||||
// 验证是否存在这条 包村差旅补助记录
|
||||
if (ObjectUtil.isNull(salaryVo)) {
|
||||
|
||||
BizVillageBo salary = BeanUtil.toBean(importVo, BizVillageBo.class);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setCreateUserId(operUserId);
|
||||
salaryService.insertByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、包村差旅补助 ").append(salary.getPoliceName()).append(" 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
Long id = salaryVo.getId();
|
||||
BizVillageBo salary = BeanUtil.toBean(importVo, BizVillageBo.class);
|
||||
salary.setUserId(id);
|
||||
ValidatorUtils.validate(salary);
|
||||
|
||||
salary.setUpdateBy(operUserId);
|
||||
salaryService.updateByBo(salary);
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、包村差旅补助 ").append(salary.getPoliceName()).append(" 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>").append(failureNum).append("、包村差旅补助 ").append(salaryVo.getPoliceName()).append(" 已存在");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、包村差旅补助 " + HtmlUtil.cleanHtmlTag(salaryVo.getPoliceName()) + " 导入失败:";
|
||||
String message = e.getMessage();
|
||||
if (e instanceof ConstraintViolationException cvException) {
|
||||
message = StreamUtils.join(cvException.getConstraintViolations(), ConstraintViolation::getMessage, ", ");
|
||||
}
|
||||
failureMsg.append(msg).append(message);
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExcelResult<BizVillageImportVo> getExcelResult() {
|
||||
return new ExcelResult<>() {
|
||||
|
||||
@Override
|
||||
public String getAnalysis() {
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BizVillageImportVo> getList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getErrorList() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?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.ruans.biz.mapper.BizHousingMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?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.ruans.biz.mapper.BizTrafficMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?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.ruans.biz.mapper.BizVillageMapper">
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue