Commit d5d129bd authored by fangxinjiang's avatar fangxinjiang

附属信息

parent a6359d66
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -108,6 +109,7 @@ public class TEmpDisabilityInfo extends BaseEntity {
/**
* 0删除作废1正常
*/
@TableLogic
@Schema(description ="0删除作废1正常")
private String deleteFlag;
......
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -120,6 +121,7 @@ public class TEmpEducation extends BaseEntity {
/**
* 是否删除 0未删除/1删除
*/
@TableLogic
@Schema(description ="是否删除 0未删除/1删除")
private String deleteFlag;
......
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -102,6 +103,7 @@ public class TEmpFamily extends BaseEntity {
/**
* 0删除作废1正常
*/
@TableLogic
@Schema(description ="0删除作废1正常")
private String deleteFlag;
/**
......
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -112,6 +113,7 @@ public class TEmpProfessionalQualification extends BaseEntity {
/**
* 0删除作废1正常
*/
@TableLogic
@Schema(description ="0删除作废1正常")
private String deleteFlag;
/**
......
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -114,6 +115,7 @@ public class TEmpWorkRecording extends BaseEntity {
/**
* 0删除作废1正常
*/
@TableLogic
@Schema(description ="0删除作废1正常")
private String deleteFlag;
/**
......
......@@ -17,14 +17,15 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -64,7 +65,7 @@ public class TEmpFamilyController {
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('archives_tempfamily_get')" )
public R getTEmpFamilyPage(Page page, TEmpFamily tEmpFamily) {
public R<IPage<TEmpFamily>> getTEmpFamilyPage(Page page, TEmpFamily tEmpFamily) {
return R.ok(tEmpFamilyService.page(page, Wrappers.query(tEmpFamily)));
}
......@@ -77,7 +78,7 @@ public class TEmpFamilyController {
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_tempfamily_get')" )
public R getById(@PathVariable("id" ) Long id) {
public R<TEmpFamily> getById(@PathVariable("id" ) Long id) {
return R.ok(tEmpFamilyService.getById(id));
}
......@@ -107,7 +108,7 @@ public class TEmpFamilyController {
@SysLog("修改员工家庭信息表" )
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_tempfamily_edit')" )
public R updateById(@RequestBody TEmpFamily tEmpFamily) {
public R<Boolean> updateById(@RequestBody TEmpFamily tEmpFamily) {
String checkRes = tEmpFamilyService.checkRepeat(tEmpFamily.getEmpIdcard(),tEmpFamily.getFamilyName(),tEmpFamily.getId());
if (Common.isNotNull(checkRes)){
return R.failed(checkRes);
......@@ -124,11 +125,29 @@ public class TEmpFamilyController {
@SysLog("通过id删除员工家庭信息表" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_tempfamily_del')" )
public R removeById(@PathVariable Long id) {
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tEmpFamilyService.removeById(id));
}
/**
* 通过id删除员工家庭信息表
* @param ids
* @return R
*/
@Operation(summary = "通过id删除员工家庭信息表", description = "通过id删除员工家庭信息表")
@SysLog("通过id删除员工家庭信息表" )
@DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_tempfamily_del_batch')" )
public R<Boolean> removeByIds(String ids) {
List<String> idList = null;
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return R.ok(tEmpFamilyService.removeByIds(idList));
}
/**
* 批量新增员工家庭信息
*
......
......@@ -170,4 +170,24 @@ public interface CommonConstants {
* @Author fxj
**/
int INTEGER_HUNDRED = 100;
//,逗号
public static final String COMMA_STRING = ",";
//、顿号
public static final String DUNHAO_STRING = "、";
//- 横
public static final char DOWN_LINE_CHAR ='_';
// 冒号 :
public static final String COLON_STRING =":";
// - 横 分割线 中
public static final String CENTER_SPLIT_LINE_STRING = "-";
// 斜杠
public static final String SLASH_SPLIT_LINE_STRING = "/";
// = 等
public static final char ETC_CHAR = '=';
// = 等
public static final String ETC_STRING = "=";
//+ 加
public static final char ADD_CHAR = '+';
}
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.common.core.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -94,4 +95,32 @@ public class Common {
+ 1, fileName.length());
}
/**
* 将字符串根据分割附转换为字符集合
*
* @param str
* @param regex
* @return
* @author: pwang
*/
public static List<String> initStrToList(String str, String regex) {
List<String> result = new ArrayList<String>();
try {
if (isNotNull(str) && isNotNull(regex)) {
String[] strTemp = str.split(regex);
if (isNotNull(strTemp)) {
for (String temp : strTemp) {
if (isNotNull(temp)) {
result.add(temp);
}
}
}
}
} catch (Exception e) {
log.error("字符串转LIST错误");
return null;
}
return result;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment