Commit bea51ce9 by dengshichuan

Merge branch 'dsc' into 'develop'

员工管理bug修改3

See merge request 8timerv2/8timerapiv200!14
parents 875face2 719177b4
...@@ -107,23 +107,25 @@ public class YgglController { ...@@ -107,23 +107,25 @@ public class YgglController {
@Autowired @Autowired
private YgglMainLzbMapper ygglMainLzbMapper; private YgglMainLzbMapper ygglMainLzbMapper;
@Autowired @Autowired
private ZzglBmgwMMapper zzglBmgwMMapper; private ZzglBmgwMMapper zzglBmgwMMapper;
//weng(籍贯) // weng(籍贯)
@Autowired @Autowired
private YgAreaDtoMapper ygAreaDtoMapper; private YgAreaDtoMapper ygAreaDtoMapper;
@Autowired @Autowired
private YgCityDtoMapper ygCityDtoMapper; private YgCityDtoMapper ygCityDtoMapper;
@Autowired @Autowired
private YgProDtoMapper ygProDtoMapper; private YgProDtoMapper ygProDtoMapper;
//weng(民族) // weng(民族)
@Autowired @Autowired
private YgMzDtoMapper ygMzDtoMapper; private YgMzDtoMapper ygMzDtoMapper;
/** /**
* 获取员工档案 * 获取员工档案
*
* @param * @param
* @return * @return
*/ */
...@@ -136,13 +138,13 @@ public class YgglController { ...@@ -136,13 +138,13 @@ public class YgglController {
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum); queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
Date rz = ygglMainEmp.getRzTime(); Date rz = ygglMainEmp.getRzTime();
if (rz != null) { if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(rz, new Date(),Level.DAY)); ygglMainEmp.setWorkTime(DateUtil.formatBetween(rz, new Date(), Level.DAY));
} }
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
// 获取员工档案 // 获取员工档案
@GetMapping(value = "/ygda/{empNum}") @GetMapping(value = "/ygda/{empNum}")
@ApiOperation(value = "获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -154,35 +156,46 @@ public class YgglController { ...@@ -154,35 +156,46 @@ public class YgglController {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
Date rz = ygglMainEmp.getRzTime(); Date rz = ygglMainEmp.getRzTime();
if (rz != null) { if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(),Level.DAY)); ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(), Level.DAY));
} }
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
/** /**
* 根据岗位id获取员工档案部门岗位名称 * 根据岗位id获取员工档案部门岗位名称
*
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/ygdabm/{gwid}") @GetMapping(value = "/ygdabm/{gwid}")
@ApiOperation(value = "获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
public Result<String> selectbmgw(@CurrentUser UserBean userBean,@PathVariable Integer gwid) { public Result<String> selectbmgw(@CurrentUser UserBean userBean, @PathVariable Integer gwid) {
if (gwid==null||gwid==0) { if (gwid == null || gwid == 0) {
return ResultUtil.data("无岗位","获取员工档案部门岗位名称成功"); return ResultUtil.data("无岗位", "获取员工档案部门岗位名称成功");
} }
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", orgCode).eq("id", gwid); queryWrapper.eq("org_code", orgCode).eq("id", gwid);
String gw = ZzglBmgwM.builder().build().selectOne(queryWrapper).getName(); ZzglBmgwM zzglBmgwM = ZzglBmgwM.builder().build().selectOne(queryWrapper);
Integer bmid = ZzglBmgwM.builder().build().selectOne(queryWrapper).getUpId(); String gw = null;
//QueryWrapper<ZzglBmgwM> queryWrapper1 = new QueryWrapper<>(); Integer bmid = null;
//queryWrapper1.eq("org_code", orgCode).eq("up_dept_id", gwid); if (zzglBmgwM != null) {
String bm = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().eq("org_code", orgCode).eq("id", bmid)).getName(); gw = zzglBmgwM.getName();
String bmgw = bm+"/"+gw; bmid = zzglBmgwM.getUpId();
return ResultUtil.data(bmgw,"获取员工档案部门岗位名称成功"); }
} // QueryWrapper<ZzglBmgwM> queryWrapper1 = new QueryWrapper<>();
// queryWrapper1.eq("org_code", orgCode).eq("up_dept_id", gwid);
ZzglBmgwM z = ZzglBmgwM.builder().build()
.selectOne(new QueryWrapper<ZzglBmgwM>().eq("org_code", orgCode).eq("id", bmid));
String bm = null;
if (z != null) {
bm = z.getName();
}
String bmgw = bm + "/" + gw;
return ResultUtil.data(bmgw, "获取员工档案部门岗位名称成功");
}
/** /**
* 添加员工档案(weng) * 添加员工档案(weng)
* *
...@@ -222,11 +235,11 @@ public class YgglController { ...@@ -222,11 +235,11 @@ public class YgglController {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum) YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).rzTime(rzTime).syq(syq).sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode) .jobType(jobType).rzTime(rzTime).syq(syq).sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode)
.build(); .build();
ygglMainEmp.insert(); ygglMainEmp.insert();
return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
} else { } else {
YgglMainEmp ishad = YgglMainEmp.builder().build() YgglMainEmp ishad = YgglMainEmp.builder().build()
.selectOne(new QueryWrapper<YgglMainEmp>().eq("phone", phone).eq("org_code", orgCode)); .selectOne(new QueryWrapper<YgglMainEmp>().eq("phone", phone).eq("org_code", orgCode));
...@@ -244,8 +257,10 @@ public class YgglController { ...@@ -244,8 +257,10 @@ public class YgglController {
} }
} }
} }
/** /**
* 修改员工档案 * 修改员工档案
*
* @param * @param
* @return * @return
*/ */
...@@ -262,8 +277,10 @@ public class YgglController { ...@@ -262,8 +277,10 @@ public class YgglController {
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
} }
/** /**
* 员工搜索 * 员工搜索
*
* @param * @param
* @return * @return
*/ */
...@@ -275,58 +292,62 @@ public class YgglController { ...@@ -275,58 +292,62 @@ public class YgglController {
Integer b = ygQueryDto.getBmgwid(); Integer b = ygQueryDto.getBmgwid();
ArrayList<Integer> bList = new ArrayList<Integer>(); ArrayList<Integer> bList = new ArrayList<Integer>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
ZzglBmgwM.getDepts(bList, b, zzglBmgwMs); ZzglBmgwM.getDepts(bList, b, zzglBmgwMs);
Integer j = ygQueryDto.getJobStatus(); Integer j = ygQueryDto.getJobStatus();
Integer t = ygQueryDto.getJobType(); Integer t = ygQueryDto.getJobType();
String q = ygQueryDto.getQuery(); String q = ygQueryDto.getQuery();
Page<YgglMainEmp> page = new Page<YgglMainEmp>( Page<YgglMainEmp> page = new Page<YgglMainEmp>(
ygQueryDto.getCurrentPage() == null ? 1 : ygQueryDto.getCurrentPage(), ygQueryDto.getCurrentPage() == null ? 1 : ygQueryDto.getCurrentPage(),
ygQueryDto.getTotalPage() == null ? 10 : ygQueryDto.getTotalPage()); ygQueryDto.getTotalPage() == null ? 10 : ygQueryDto.getTotalPage());
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper. queryWrapper.select("name", "emp_num", "bmgw_id", "rz_time", "job_type", "phone", "job_status")
select("name","emp_num","bmgw_id","rz_time","job_type","phone","job_status").ne("job_status", 4) .ne("job_status", 4).eq("org_code", orgCode).eq(t != null && t > -1, "job_type", t)
.eq("org_code", orgCode).eq(t != null && t > -1, "job_type", t) .eq(j != null && j > -1, "job_status", j).in(!bList.isEmpty(), "bmgw_id", bList)
.eq(j != null && j > -1, "job_status", j).in(!bList.isEmpty(), "bmgw_id", bList) .and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q));
.and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper); // List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper); IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords(); // List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
return ResultUtil.data(ygglMainEmpPage, "员工搜索成功"); return ResultUtil.data(ygglMainEmpPage, "员工搜索成功");
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功"); // return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
} }
/** /**
* 导入威力加强版 * 导入威力加强版
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/ygdas") @PostMapping(value = "/ygdas")
@ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean,@RequestBody YgDrsDto drList) { public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) {
drList.setOrgCode(userBean.getOrgCode()); drList.setOrgCode(userBean.getOrgCode());
YgDrsDto tofList = errorFilter(drList);//滤嘴,过滤信息 YgDrsDto tofList = errorFilter(drList);// 滤嘴,过滤信息
if (tofList.getDrList().size()==0) return ResultUtil.data(tofList.getErrorList(), "导入发生错误人员名单"); if (tofList.getDrList().size() == 0)
YgDrsDto tof = optFilter(tofList);//彻底规范好数据 return ResultUtil.data(tofList.getErrorList(), "导入发生错误人员名单");
List<YgDrjqbDto> trueList = tof.getDrList();//拿出正确的信息 YgDrsDto tof = optFilter(tofList);// 彻底规范好数据
List<YgDrjqbDto> errorList = tof.getErrorList();//拿出错误的信息 List<YgDrjqbDto> trueList = tof.getDrList();// 拿出正确的信息
if (trueList.size()==0) return ResultUtil.data(errorList, "导入发生错误人员名单"); List<YgDrjqbDto> errorList = tof.getErrorList();// 拿出错误的信息
if (trueList.size() == 0)
return ResultUtil.data(errorList, "导入发生错误人员名单");
for (YgDrjqbDto e : trueList) { for (YgDrjqbDto e : trueList) {
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper).eq(QyzxEmpLogin::getPhone,e.getPhone()).one(); QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
//证件类型为0 .eq(QyzxEmpLogin::getPhone, e.getPhone()).one();
Integer jobType = Integer.valueOf(e.getJobType());//工作类型 // 证件类型为0
Integer syq=Integer.valueOf(e.getSyq());//试用期 Integer jobType = Integer.valueOf(e.getJobType());// 工作类型
Integer sex=Integer.valueOf(e.getSex());//性别,还差一个岗位 Integer syq = Integer.valueOf(e.getSyq());// 试用期
Integer gw= e.getHavebmid(); Integer sex = Integer.valueOf(e.getSex());// 性别,还差一个岗位
Integer gw = e.getHavebmid();
String jobNum = e.getYgnbgh(); String jobNum = e.getYgnbgh();
Integer jg = e.getJg(); Integer jg = e.getJg();
Date birthday = e.getBirthday(); Date birthday = e.getBirthday();
//入职日期 // 入职日期
Date rzdate = new Date(); Date rzdate = new Date();
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");//正杠 SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");// 正杠
if (e.getRzTime().indexOf("-")!=-1) { if (e.getRzTime().indexOf("-") != -1) {
try { try {
rzdate = straight.parse(e.getRzTime()); rzdate = straight.parse(e.getRzTime());
} catch (ParseException PException) { } catch (ParseException PException) {
...@@ -336,8 +357,8 @@ public class YgglController { ...@@ -336,8 +357,8 @@ public class YgglController {
continue; continue;
} }
} }
//判断是否已有员工登录表 // 判断是否已有员工登录表
if (login==null) {// 添加三张表 if (login == null) {// 添加三张表
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(e.getPhone()).pw(Md5.md5("123456")) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(e.getPhone()).pw(Md5.md5("123456"))
.sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(e.getName()).build(); .sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(e.getName()).build();
if (!qyzxEmpLogin.insert()) { if (!qyzxEmpLogin.insert()) {
...@@ -348,294 +369,330 @@ public class YgglController { ...@@ -348,294 +369,330 @@ public class YgglController {
} }
// 员工权限表(未定) // 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定) // 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()) QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()).userType(2)
.userType(2).status(1).build().insert();// userType2普通员工 .status(1).build().insert();// userType2普通员工
YgglMainEmp emp = YgglMainEmp.builder() YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0).zjNum(e.getZj())
.name(e.getName()).phone(e.getPhone()).zjType(0) .jobType(jobType).rzTime(rzdate).updateTime(new Date()).updateMan(userBean.getEmpNum()).syq(syq)
.zjNum(e.getZj()).jobType(jobType).rzTime(rzdate) .sex(sex).jobNum(jobNum).bmgwId(gw).empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode())
.updateTime(new Date()).updateMan(userBean.getEmpNum()).syq(syq) .build();
.sex(sex).jobNum(jobNum).bmgwId(gw)
.empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()).build();
emp.insert(); emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()) .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.eq(YgglMainEmp::getId, emp.getId()) .set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(birthday!=null, YgglMainEmp::getBirthday, birthday) .set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
.set(jg!=null && jg!=0, YgglMainEmp::getJg, jg).update();
// return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
//return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); } else {
}else {
// 添加两张表 // 添加两张表
YgglMainEmp ishad = YgglMainEmp.builder().build() YgglMainEmp ishad = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.selectOne(new QueryWrapper<YgglMainEmp>()
.eq("phone", e.getPhone()).eq("org_code", userBean.getOrgCode())); .eq("phone", e.getPhone()).eq("org_code", userBean.getOrgCode()));
if (ishad == null) { if (ishad == null) {
// 员工权限表(未定) // 员工权限表(未定)
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(userBean.getOrgCode()).userType(2).build().insert();// 2普通员工 QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(userBean.getOrgCode()).userType(2).build()
YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()) .insert();// 2普通员工
.zjType(0).zjNum(e.getZj()) YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0)
.jobType(jobType).rzTime(rzdate) .zjNum(e.getZj()).jobType(jobType).rzTime(rzdate).updateTime(new Date())
.updateTime(new Date()).updateMan(userBean.getEmpNum()) .updateMan(userBean.getEmpNum()).syq(syq).sex(sex).jobNum(jobNum).empNum(login.getId())
.syq(syq).sex(sex) .orgCode(userBean.getOrgCode()).build();
.jobNum(jobNum).empNum(login.getId()).orgCode(userBean.getOrgCode()).build();
emp.insert(); emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()) .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.eq(YgglMainEmp::getId, emp.getId()) .set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(birthday!=null, YgglMainEmp::getBirthday, birthday) .set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
.set(jg!=null && jg!=0, YgglMainEmp::getJg, jg).update();
} else { } else {
e.setError("该手机号码已被使用"); e.setError("该手机号码已被使用");
errorList.add(e); errorList.add(e);
continue; continue;
} }
} }
} }
if (errorList.size()==0) { if (errorList.size() == 0) {
return ResultUtil.success("员工全部导入成功!"); return ResultUtil.success("员工全部导入成功!");
} }
return ResultUtil.data(errorList, "导入发生错误人员名单"); return ResultUtil.data(errorList, "导入发生错误人员名单");
} }
//错误选项过滤器 // 错误选项过滤器
public YgDrsDto errorFilter(YgDrsDto ygDrsDto) { public YgDrsDto errorFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList(); List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList); List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList(); List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused") @SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);//一个员工导入 YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size(); Integer size = drList.size();
for (Integer i=0; i<size;i++) {// for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);//计数器 YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) { if (itDr.hasNext()) {
a=itDr.next(); a = itDr.next();
} }
//请填写必填项 // 请填写必填项
String name = newList.get(i).getName(); String phone = newList.get(i).getPhone(); String name = newList.get(i).getName();
String sex = newList.get(i).getSex(); String zj = newList.get(i).getZj(); String phone = newList.get(i).getPhone();
if (StrUtil.hasBlank(name) String sex = newList.get(i).getSex();
|| StrUtil.hasBlank(phone) String zj = newList.get(i).getZj();
|| StrUtil.hasBlank(sex) if (StrUtil.hasBlank(name) || StrUtil.hasBlank(phone) || StrUtil.hasBlank(sex) || StrUtil.hasBlank(zj)) {
|| StrUtil.hasBlank(zj)) {
d.setError("请填写必填项"); d.setError("请填写必填项");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
itDr.remove();
i++;
continue;
}
// 手机号码格式不对
String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
if (phone.length() != 11) {
d.setError("手机号应为11位数");
errorList.add(d);
itDr.remove();
i++;
continue;
}
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(phone);
boolean isMatch = m.matches();
if (!isMatch) {
d.setError("手机号格式不对");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 手机号码已被使用
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(QyzxEmpLogin::getPhone, phone).eq(QyzxEmpLogin::getOrgId, orgCode).one();
if (login != null) {
d.setError("手机号码已被使用");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
//手机号码格式不对 // 证件号码信息有误
String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$"; if (zj == null || "".equals(zj)) {
if (phone.length()!= 11) { d.setError("证件号码信息有误");
d.setError("手机号应为11位数"); errorList.add(d);
errorList.add(d);itDr.remove();i++;continue; itDr.remove();
i++;
continue;
} }
Pattern p = Pattern.compile(regex); String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|"
Matcher m = p.matcher(phone); + "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
boolean isMatch = m.matches(); boolean matches = zj.matches(regularExpression);
if(!isMatch){ if (!matches) {
d.setError("手机号格式不对"); d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
} itDr.remove();
//手机号码已被使用 i++;
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper).eq(QyzxEmpLogin::getPhone,phone).eq(QyzxEmpLogin::getOrgId, orgCode).one(); continue;
if (login!=null) {
d.setError("手机号码已被使用");
errorList.add(d);itDr.remove();i++;continue;
} }
//证件号码信息有误 try {
if (zj == null || "".equals(zj)) { if (zj.length() == 18) {
d.setError("证件号码信息有误"); char[] charArray = zj.toCharArray();
errorList.add(d);itDr.remove();i++;continue; // 前十七位加权因子
} int[] idCardWi = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" + // 这是除以11后,可能产生的11位余数对应的验证码
"(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)"; String[] idCardY = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" };
boolean matches = zj.matches(regularExpression); int sum = 0;
if (!matches) { for (Integer j = 0; j < idCardWi.length; j++) {
d.setError("证件号码信息有误"); int current = Integer.parseInt(String.valueOf(charArray[j]));
errorList.add(d);itDr.remove();i++;continue; int count = current * idCardWi[j];
sum += count;
}
char idCardLast = charArray[17];
int idCardMod = sum % 11;
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) {
// System.out.println("成功,接着完善员工的个人信息");
String birth = zj.substring(6, 14);
String birthday = birth.substring(0, 4) + "-" + birth.substring(4, 6) + "-"
+ birth.substring(6, 8);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
} else {
// System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
} else {
// 给15位数的添加生日籍贯
String birth = zj.substring(6, 12);
String birthday = "19" + birth.substring(0, 2) + "-" + birth.substring(2, 4) + "-"
+ birth.substring(4, 6);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
}
} catch (Exception e) {
e.printStackTrace();
// System.out.println("异常:" + zj);
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
try { // 部门岗位有误
if (zj.length() == 18) { String oneb = newList.get(i).getOneb();
char[] charArray = zj.toCharArray(); String twob = newList.get(i).getTwob();
//前十七位加权因子 String threeb = newList.get(i).getThreeb();
int[] idCardWi = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; String fourb = newList.get(i).getFourb();
//这是除以11后,可能产生的11位余数对应的验证码 String gw = newList.get(i).getGw();
String[] idCardY = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"}; String[] bms = { oneb, twob, threeb, fourb };
int sum = 0; if (StrUtil.hasBlank(gw) && StrUtil.hasBlank(oneb) && StrUtil.hasBlank(twob) && StrUtil.hasBlank(threeb)
for (Integer j = 0; j < idCardWi.length; j++) { && StrUtil.hasBlank(fourb)) { // 没填写岗位,通过~ //
int current = Integer.parseInt(String.valueOf(charArray[j])); } else {
int count = current * idCardWi[j]; // 填写了部门岗位,办他!
sum += count; Integer isHaveBmgw = isHavebmgw(bms, gw, orgCode);
} if (isHaveBmgw == 0) {
char idCardLast = charArray[17]; d.setError("部门岗位有误");
int idCardMod = sum % 11; errorList.add(d);
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) { itDr.remove();
//System.out.println("成功,接着完善员工的个人信息"); i++;
String birth = zj.substring(6, 14); continue;
String birthday =birth.substring(0, 4)+"-"+birth.substring(4, 6)+"-"+birth.substring(6,8); } else {
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd"); // 获取到部门岗位id啦!
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
} else {
//System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
//return false;
d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue;
}
}else {
//给15位数的添加生日籍贯
String birth = zj.substring(6, 12);
String birthday = "19" + birth.substring(0, 2) + "-" + birth.substring(2, 4) + "-" + birth.substring(4, 6);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
}
} catch (Exception e) {
e.printStackTrace();
//System.out.println("异常:" + zj);
//return false;
d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue;
}
//部门岗位有误
String oneb = newList.get(i).getOneb();String twob = newList.get(i).getTwob();
String threeb = newList.get(i).getThreeb();String fourb = newList.get(i).getFourb();
String gw = newList.get(i).getGw();
String[] bms = {oneb,twob,threeb,fourb};
if (StrUtil.hasBlank(gw) && StrUtil.hasBlank(oneb)
&& StrUtil.hasBlank(twob) && StrUtil.hasBlank(threeb)
&& StrUtil.hasBlank(fourb)) { //没填写岗位,通过~ //
}else {
//填写了部门岗位,办他!
Integer isHaveBmgw = isHavebmgw(bms,gw,orgCode);
if (isHaveBmgw == 0) {
d.setError("部门岗位有误");
errorList.add(d);itDr.remove();i++;continue;
}else {
//获取到部门岗位id啦!
d.setHavebmid(isHaveBmgw); d.setHavebmid(isHaveBmgw);
} }
} }
}//for循环完毕! } // for循环完毕!
YgDrsDto tofList = new YgDrsDto(drList, errorList, orgCode); YgDrsDto tofList = new YgDrsDto(drList, errorList, orgCode);
return tofList; return tofList;
} }
//选填项过滤器 // 选填项过滤器
public YgDrsDto optFilter(YgDrsDto ygDrsDto) { public YgDrsDto optFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList(); List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList); List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList(); List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused") @SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);//一个员工导入 YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size(); Integer size = drList.size();
for (Integer i=0; i<size;i++) {// for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);//计数器 YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) { if (itDr.hasNext()) {
a=itDr.next(); a = itDr.next();
} }
//for (YgDrjqbDto d : drList) { // for (YgDrjqbDto d : drList) {
String ygnbgh = d.getYgnbgh(); String sex = d.getSex(); String ygnbgh = d.getYgnbgh();
String jobType = d.getJobType();String jobStatus = d.getJobStatus(); String sex = d.getSex();
String rzTime = d.getRzTime();String syq = d.getSyq(); String jobType = d.getJobType();
String jobStatus = d.getJobStatus();
String zy = d.getZy();String address = d.getAddress(); String rzTime = d.getRzTime();
String hjAddress = d.getHkAddress();String qq = d.getQq(); String syq = d.getSyq();
String weixin =d.getWeixin(); String email = d.getEmail();
String[] bathroom = {ygnbgh,sex,jobType,jobStatus,rzTime,syq,zy,address,hjAddress,qq,weixin,email}; String zy = d.getZy();
boolean child=takeshower(bathroom); String address = d.getAddress();
String hjAddress = d.getHkAddress();
String qq = d.getQq();
String weixin = d.getWeixin();
String email = d.getEmail();
String[] bathroom = { ygnbgh, sex, jobType, jobStatus, rzTime, syq, zy, address, hjAddress, qq, weixin,
email };
boolean child = takeshower(bathroom);
if (child == false) { if (child == false) {
d.setError("填写内容不要大于50字数"); d.setError("填写内容不要大于50字数");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
itDr.remove();
i++;
continue;
} }
//公司内部工号 // 公司内部工号
if (ygnbgh != null && ygnbgh.length() != 0) { if (ygnbgh != null && ygnbgh.length() != 0) {
d.setYgnbgh(ygnbgh.trim()); d.setYgnbgh(ygnbgh.trim());
}else { } else {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
String bh = format.format(new Date())+orgCode+i+System.currentTimeMillis(); String bh = format.format(new Date()) + orgCode + i + System.currentTimeMillis();
d.setYgnbgh(bh); d.setYgnbgh(bh);
} }
//男女(最大优化) // 男女(最大优化)
d.setSex(YgEnumInterface.sex.isMan(sex)); d.setSex(YgEnumInterface.sex.isMan(sex));
//工作性质(最大优化) // 工作性质(最大优化)
d.setJobType(YgEnumInterface.YgJobType.choose(jobType)); d.setJobType(YgEnumInterface.YgJobType.choose(jobType));
//员工状态(最大优化) // 员工状态(最大优化)
d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus)); d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus));
//入职日期(最大优化) // 入职日期(最大优化)
d.setRzTime(YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime))); d.setRzTime(YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime)));
//试用期(最大优化) // 试用期(最大优化)
d.setSyq(YgEnumInterface.syq.choose(syq)); d.setSyq(YgEnumInterface.syq.choose(syq));
} }
YgDrsDto clear = new YgDrsDto(drList, errorList, orgCode); YgDrsDto clear = new YgDrsDto(drList, errorList, orgCode);
return clear; return clear;
} }
//浴池,洗去选填项字节大于100的选项 // 浴池,洗去选填项字节大于100的选项
public boolean takeshower(String[] bathroom){ public boolean takeshower(String[] bathroom) {
for (String b : bathroom) { for (String b : bathroom) {
if (b.length()>100) { if (b.length() > 100) {
return false;}} return false;
return true;} }
}
//判断是否导入组织部门 return true;
public Integer isHavebmgw(String[] bms,String gw,Integer orgCode) { }
//将姓名转为部门岗位对象
// 判断是否导入组织部门
public Integer isHavebmgw(String[] bms, String gw, Integer orgCode) {
// 将姓名转为部门岗位对象
List<ZzglBmgwM> gwList = new ArrayList<ZzglBmgwM>(); List<ZzglBmgwM> gwList = new ArrayList<ZzglBmgwM>();
//判断有几个部门,且这几个部门是否属实,里面不包括岗位 // 判断有几个部门,且这几个部门是否属实,里面不包括岗位
for (String bm : bms) { for (String bm : bms) {
if(!StrUtil.hasBlank(bm)){ if (!StrUtil.hasBlank(bm)) {
ZzglBmgwM ibm = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) ZzglBmgwM ibm = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, bm)
.eq(ZzglBmgwM::getName, bm) .eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).one(); // 选择部门类型0为部门,1为岗位
.eq(ZzglBmgwM::getOrgCode,orgCode) if (ibm == null) {
.eq(ZzglBmgwM::getType, 0).one(); //选择部门类型0为部门,1为岗位 return 0;
if (ibm == null) { return 0;} //找不到有相关名称的部门则报错 } // 找不到有相关名称的部门则报错
gwList.add(ibm); gwList.add(ibm);
}else { } else {
break; break;
} }
} }
Integer qiantao = qiantao(gwList,gw,0,orgCode); Integer qiantao = qiantao(gwList, gw, 0, orgCode);
if (qiantao!=0) { if (qiantao != 0) {
return qiantao;//组织部门成立! return qiantao;// 组织部门成立!
}else { } else {
return 0;//失败 return 0;// 失败
} }
}; };
//判断是否导入组织部门的嵌套并寻找到正确岗位id // 判断是否导入组织部门的嵌套并寻找到正确岗位id
public Integer qiantao(List<ZzglBmgwM>gwList,String gw,Integer upid,Integer orgCode) { public Integer qiantao(List<ZzglBmgwM> gwList, String gw, Integer upid, Integer orgCode) {
//重写 // 重写
if (upid!=0 && !gwList.get(0).getUpId().equals(upid)) { if (upid != 0 && !gwList.get(0).getUpId().equals(upid)) {
return 0; return 0;
} }
upid = gwList.get(0).getId(); upid = gwList.get(0).getId();
if (gwList.size() == 1) { if (gwList.size() == 1) {
ZzglBmgwM igw = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) ZzglBmgwM igw = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, gw)
.eq(ZzglBmgwM::getName, gw) .eq(ZzglBmgwM::getUpId, upid).eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 1).one();
.eq(ZzglBmgwM::getUpId, upid) if (igw == null) {
.eq(ZzglBmgwM::getOrgCode,orgCode)
.eq(ZzglBmgwM::getType, 1).one();
if (igw==null) {
return 0; return 0;
} }
return igw.getId(); return igw.getId();
} }
gwList.remove(0); gwList.remove(0);
Integer q = qiantao(gwList,gw,upid,orgCode); Integer q = qiantao(gwList, gw, upid, orgCode);
return q; return q;
}; };
/** /**
* 导出员工 * 导出员工
*
* @param * @param
* @return * @return
*/ */
...@@ -643,13 +700,15 @@ public class YgglController { ...@@ -643,13 +700,15 @@ public class YgglController {
@ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) {
int[] jList = {1,2,3}; int[] jList = { 1, 2, 3 };
List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list(); List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list();
return ResultUtil.data(list, "导出员工成功"); return ResultUtil.data(list, "导出员工成功");
} }
/** /**
* 获取员工教育经历表 * 获取员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -657,11 +716,12 @@ public class YgglController { ...@@ -657,11 +716,12 @@ public class YgglController {
@ApiOperation(value = "获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) {
List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build().selectList(new QueryWrapper<YgglAttaJyjlb>() List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaJyjlbss, "获取员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlbss, "获取员工教育经历表成功");
} }
// 获取员工教育经历表 // 获取员工教育经历表
@GetMapping(value = "/jyjlb/{empNum}") @GetMapping(value = "/jyjlb/{empNum}")
@ApiOperation(value = "获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -671,9 +731,10 @@ public class YgglController { ...@@ -671,9 +731,10 @@ public class YgglController {
new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaJyjlbs, "获取员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlbs, "获取员工教育经历表成功");
} }
/** /**
* 添加/修改员工教育经历表 * 添加/修改员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -686,9 +747,10 @@ public class YgglController { ...@@ -686,9 +747,10 @@ public class YgglController {
ygglAttaJyjlb.insertOrUpdate(); ygglAttaJyjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaJyjlb, "添加/修改员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlb, "添加/修改员工教育经历表成功");
} }
/** /**
* 删除员工教育经历表 * 删除员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -700,9 +762,10 @@ public class YgglController { ...@@ -700,9 +762,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaJyjlb.builder().build() return ResultUtil.data(YgglAttaJyjlb.builder().build()
.delete(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工教育经历表成功"); .delete(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工教育经历表成功");
} }
/** /**
* 获取员工培训经历信息表 * 获取员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -710,10 +773,12 @@ public class YgglController { ...@@ -710,10 +773,12 @@ public class YgglController {
@ApiOperation(value = "获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) {
List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build().selectList(new QueryWrapper<YgglAttaPxjlxxb>() List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功");
} }
// 获取员工培训经历信息表 // 获取员工培训经历信息表
@GetMapping(value = "/pxjlxxb/{empNum}") @GetMapping(value = "/pxjlxxb/{empNum}")
@ApiOperation(value = "获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -723,8 +788,10 @@ public class YgglController { ...@@ -723,8 +788,10 @@ public class YgglController {
new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功");
} }
/** /**
* 添加/修改员工培训经历信息表 * 添加/修改员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -738,8 +805,10 @@ public class YgglController { ...@@ -738,8 +805,10 @@ public class YgglController {
ygglAttaPxjlxxb.insertOrUpdate(); ygglAttaPxjlxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaPxjlxxb, "添加/修改员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxb, "添加/修改员工培训经历信息表成功");
} }
/** /**
* 删除员工培训经历信息表 * 删除员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -751,8 +820,10 @@ public class YgglController { ...@@ -751,8 +820,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaPxjlxxb.builder().build() return ResultUtil.data(YgglAttaPxjlxxb.builder().build()
.delete(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工培训经历信息表成功"); .delete(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工培训经历信息表成功");
} }
/** /**
* 获取员工工作经历表 * 获取员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -760,10 +831,12 @@ public class YgglController { ...@@ -760,10 +831,12 @@ public class YgglController {
@ApiOperation(value = "获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 17)
public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) {
List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build().selectList(new QueryWrapper<YgglAttaGzjlb>() List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功");
} }
// 获取员工工作经历表 // 获取员工工作经历表
@GetMapping(value = "/gzjlb/{empNum}") @GetMapping(value = "/gzjlb/{empNum}")
@ApiOperation(value = "获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -773,8 +846,10 @@ public class YgglController { ...@@ -773,8 +846,10 @@ public class YgglController {
new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功");
} }
/** /**
* 添加/修改员工工作经历表 * 添加/修改员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -787,8 +862,10 @@ public class YgglController { ...@@ -787,8 +862,10 @@ public class YgglController {
ygglAttaGzjlb.insertOrUpdate(); ygglAttaGzjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaGzjlb, "添加/修改员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlb, "添加/修改员工工作经历表成功");
} }
/** /**
* 删除员工工作经历表 * 删除员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -798,10 +875,12 @@ public class YgglController { ...@@ -798,10 +875,12 @@ public class YgglController {
public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaGzjlb.builder().build() return ResultUtil.data(YgglAttaGzjlb.builder().build()
.delete(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工工作经历表成功"); .delete(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工工作经历表成功");
} }
/** /**
* 获取员工职称信息表 * 获取员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -809,10 +888,12 @@ public class YgglController { ...@@ -809,10 +888,12 @@ public class YgglController {
@ApiOperation(value = "获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 21) @ApiOperationSupport(order = 21)
public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) {
List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build().selectList(new QueryWrapper<YgglAttaZcxxb>() List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功");
} }
// 获取员工职称信息表 // 获取员工职称信息表
@GetMapping(value = "/zcxxb/{empNum}") @GetMapping(value = "/zcxxb/{empNum}")
@ApiOperation(value = "获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -822,8 +903,10 @@ public class YgglController { ...@@ -822,8 +903,10 @@ public class YgglController {
new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功");
} }
/** /**
* 添加/修改员工职称信息表 * 添加/修改员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -836,8 +919,10 @@ public class YgglController { ...@@ -836,8 +919,10 @@ public class YgglController {
ygglAttaZcxxb.insertOrUpdate(); ygglAttaZcxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaZcxxb, "添加/修改员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxb, "添加/修改员工职称信息表成功");
} }
/** /**
* 删除员工职称信息表 * 删除员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -849,8 +934,10 @@ public class YgglController { ...@@ -849,8 +934,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaZcxxb.builder().build() return ResultUtil.data(YgglAttaZcxxb.builder().build()
.delete(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工职称信息表成功"); .delete(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工职称信息表成功");
} }
/** /**
* 获取员工证书证件表 * 获取员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -858,21 +945,25 @@ public class YgglController { ...@@ -858,21 +945,25 @@ public class YgglController {
@ApiOperation(value = "获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 25) @ApiOperationSupport(order = 25)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList(new QueryWrapper<YgglAttaZszjb>() List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功");
} }
// 获取员工证书证件表 // 获取员工证书证件表
@GetMapping(value = "/zszjb/{empNum}") @GetMapping(value = "/zszjb/{empNum}")
@ApiOperation(value = "获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 26) @ApiOperationSupport(order = 26)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList( List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList(
new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功");
} }
/** /**
* 添加/修改员工证书证件表 * 添加/修改员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -885,8 +976,10 @@ public class YgglController { ...@@ -885,8 +976,10 @@ public class YgglController {
ygglAttaZszjb.insertOrUpdate(); ygglAttaZszjb.insertOrUpdate();
return ResultUtil.data(ygglAttaZszjb, "添加/修改员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjb, "添加/修改员工证书证件表成功");
} }
/** /**
* 删除员工证书证件表 * 删除员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -898,8 +991,10 @@ public class YgglController { ...@@ -898,8 +991,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaZszjb.builder().build() return ResultUtil.data(YgglAttaZszjb.builder().build()
.delete(new QueryWrapper<YgglAttaZszjb>().eq("org_code", orgCode).eq("id", id)), "删除员工证书证件表成功"); .delete(new QueryWrapper<YgglAttaZszjb>().eq("org_code", orgCode).eq("id", id)), "删除员工证书证件表成功");
} }
/** /**
* 获取员工联系信息表 * 获取员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -907,10 +1002,12 @@ public class YgglController { ...@@ -907,10 +1002,12 @@ public class YgglController {
@ApiOperation(value = "获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 29) @ApiOperationSupport(order = 29)
public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) {
List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build().selectList(new QueryWrapper<YgglAttaLxxxb>() List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功");
} }
// 获取员工联系信息表 // 获取员工联系信息表
@GetMapping(value = "/lxxxb/{empNum}") @GetMapping(value = "/lxxxb/{empNum}")
@ApiOperation(value = "获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -920,8 +1017,10 @@ public class YgglController { ...@@ -920,8 +1017,10 @@ public class YgglController {
new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功");
} }
/** /**
* 添加/修改员工联系信息表 * 添加/修改员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -934,8 +1033,10 @@ public class YgglController { ...@@ -934,8 +1033,10 @@ public class YgglController {
ygglAttaLxxxb.insertOrUpdate(); ygglAttaLxxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaLxxxb, "添加/修改员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxb, "添加/修改员工联系信息表成功");
} }
/** /**
* 删除员工联系信息表 * 删除员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -947,8 +1048,10 @@ public class YgglController { ...@@ -947,8 +1048,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaLxxxb.builder().build() return ResultUtil.data(YgglAttaLxxxb.builder().build()
.delete(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工联系信息表成功"); .delete(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工联系信息表成功");
} }
/** /**
* 获取员工紧急联系人表 * 获取员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -956,10 +1059,12 @@ public class YgglController { ...@@ -956,10 +1059,12 @@ public class YgglController {
@ApiOperation(value = "获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 33) @ApiOperationSupport(order = 33)
public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) {
List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build().selectList(new QueryWrapper<YgglAttaJjlxr>() List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功");
} }
// 获取员工紧急联系人表 // 获取员工紧急联系人表
@GetMapping(value = "/jjlxr/{empNum}") @GetMapping(value = "/jjlxr/{empNum}")
@ApiOperation(value = "获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -969,8 +1074,10 @@ public class YgglController { ...@@ -969,8 +1074,10 @@ public class YgglController {
new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功");
} }
/** /**
* 添加/修改员工紧急联系人表 * 添加/修改员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -983,8 +1090,10 @@ public class YgglController { ...@@ -983,8 +1090,10 @@ public class YgglController {
ygglAttaJjlxr.insertOrUpdate(); ygglAttaJjlxr.insertOrUpdate();
return ResultUtil.data(ygglAttaJjlxr, "添加/修改员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxr, "添加/修改员工紧急联系人表成功");
} }
/** /**
* 删除员工紧急联系人表 * 删除员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -996,9 +1105,11 @@ public class YgglController { ...@@ -996,9 +1105,11 @@ public class YgglController {
return ResultUtil.data(YgglAttaJjlxr.builder().build() return ResultUtil.data(YgglAttaJjlxr.builder().build()
.delete(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", orgCode).eq("id", id)), "删除员工紧急联系人表成功"); .delete(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", orgCode).eq("id", id)), "删除员工紧急联系人表成功");
} }
// 获取工资卡信息 // 获取工资卡信息
/** /**
* 获取员工工资卡信息 * 获取员工工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1010,6 +1121,7 @@ public class YgglController { ...@@ -1010,6 +1121,7 @@ public class YgglController {
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功"); return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功");
} }
// 获取工资卡信息 // 获取工资卡信息
@GetMapping(value = "/gzk/{empNum}") @GetMapping(value = "/gzk/{empNum}")
@ApiOperation(value = "获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1019,8 +1131,10 @@ public class YgglController { ...@@ -1019,8 +1131,10 @@ public class YgglController {
new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功"); return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功");
} }
/** /**
* 添加/修改工资卡信息 * 添加/修改工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1033,8 +1147,10 @@ public class YgglController { ...@@ -1033,8 +1147,10 @@ public class YgglController {
ygglAttaGzk.insertOrUpdate(); ygglAttaGzk.insertOrUpdate();
return ResultUtil.data(ygglAttaGzk, "添加/修改工资卡信息成功"); return ResultUtil.data(ygglAttaGzk, "添加/修改工资卡信息成功");
} }
/** /**
* 删除工资卡信息 * 删除工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1046,8 +1162,10 @@ public class YgglController { ...@@ -1046,8 +1162,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaGzk.builder().build() return ResultUtil.data(YgglAttaGzk.builder().build()
.delete(new QueryWrapper<YgglAttaGzk>().eq("org_code", orgCode).eq("id", id)), "删除工资卡信息成功"); .delete(new QueryWrapper<YgglAttaGzk>().eq("org_code", orgCode).eq("id", id)), "删除工资卡信息成功");
} }
/** /**
* 获取员工合同信息表 * 获取员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1055,10 +1173,12 @@ public class YgglController { ...@@ -1055,10 +1173,12 @@ public class YgglController {
@ApiOperation(value = "获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 41) @ApiOperationSupport(order = 41)
public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) {
List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build().selectList(new QueryWrapper<YgglAttaHtxxb>() List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功");
} }
// 获取员工合同信息表 // 获取员工合同信息表
@GetMapping(value = "/htxxb/{empNum}") @GetMapping(value = "/htxxb/{empNum}")
@ApiOperation(value = "获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1068,8 +1188,10 @@ public class YgglController { ...@@ -1068,8 +1188,10 @@ public class YgglController {
new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功");
} }
/** /**
* 添加/修改员工合同信息表 * 添加/修改员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1082,8 +1204,10 @@ public class YgglController { ...@@ -1082,8 +1204,10 @@ public class YgglController {
ygglAttaHtxxb.insertOrUpdate(); ygglAttaHtxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaHtxxb, "添加/修改员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxb, "添加/修改员工合同信息表成功");
} }
/** /**
* 删除员工合同信息表 * 删除员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1095,6 +1219,7 @@ public class YgglController { ...@@ -1095,6 +1219,7 @@ public class YgglController {
return ResultUtil.data(YgglAttaHtxxb.builder().build() return ResultUtil.data(YgglAttaHtxxb.builder().build()
.delete(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工合同信息表成功"); .delete(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工合同信息表成功");
} }
/** /**
* 获取员工材料附件表 * 获取员工材料附件表
* *
...@@ -1105,10 +1230,12 @@ public class YgglController { ...@@ -1105,10 +1230,12 @@ public class YgglController {
@ApiOperation(value = "获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 45) @ApiOperationSupport(order = 45)
public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) {
List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build().selectList(new QueryWrapper<YgglAttaClfjb>() List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功");
} }
// 获取员工材料附件表 // 获取员工材料附件表
@GetMapping(value = "/clfjb/{empNum}") @GetMapping(value = "/clfjb/{empNum}")
@ApiOperation(value = "获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1118,8 +1245,10 @@ public class YgglController { ...@@ -1118,8 +1245,10 @@ public class YgglController {
new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功");
} }
/** /**
* 添加/修改员工材料附件表 * 添加/修改员工材料附件表
*
* @param * @param
* @return * @return
*/ */
...@@ -1132,8 +1261,10 @@ public class YgglController { ...@@ -1132,8 +1261,10 @@ public class YgglController {
ygglAttaClfjb.insertOrUpdate(); ygglAttaClfjb.insertOrUpdate();
return ResultUtil.data(ygglAttaClfjb, "添加/修改员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjb, "添加/修改员工材料附件表成功");
} }
/** /**
* 删除员工材料附件表 * 删除员工材料附件表
*
* @param * @param
* @return * @return
*/ */
...@@ -1145,9 +1276,10 @@ public class YgglController { ...@@ -1145,9 +1276,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaClfjb.builder().build() return ResultUtil.data(YgglAttaClfjb.builder().build()
.delete(new QueryWrapper<YgglAttaClfjb>().eq("org_code", orgCode).eq("id", id)), "删除员工材料附件表成功"); .delete(new QueryWrapper<YgglAttaClfjb>().eq("org_code", orgCode).eq("id", id)), "删除员工材料附件表成功");
} }
/** /**
* 获取成长记录表 * 获取成长记录表
*
* @param * @param
* @return * @return
*/ */
...@@ -1155,10 +1287,12 @@ public class YgglController { ...@@ -1155,10 +1287,12 @@ public class YgglController {
@ApiOperation(value = "获取成长记录表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取成长记录表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 49) @ApiOperationSupport(order = 49)
public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) {
List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build().selectList(new QueryWrapper<YgglAttaCzjlb>() List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaCzjlbs, "获取成长记录表成功"); return ResultUtil.data(ygglAttaCzjlbs, "获取成长记录表成功");
} }
// 获取成长记录表 // 获取成长记录表
@GetMapping(value = "/czjlb/{empNum}") @GetMapping(value = "/czjlb/{empNum}")
@ApiOperation(value = "获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1168,8 +1302,10 @@ public class YgglController { ...@@ -1168,8 +1302,10 @@ public class YgglController {
new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaCzjlbs, "获取员工成长记录表成功"); return ResultUtil.data(ygglAttaCzjlbs, "获取员工成长记录表成功");
} }
/** /**
* 添加/修改成长记录表 * 添加/修改成长记录表
*
* @param * @param
* @return * @return
*/ */
...@@ -1182,8 +1318,10 @@ public class YgglController { ...@@ -1182,8 +1318,10 @@ public class YgglController {
ygglAttaCzjlb.insertOrUpdate(); ygglAttaCzjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaCzjlb, "添加/修改成长记录表成功"); return ResultUtil.data(ygglAttaCzjlb, "添加/修改成长记录表成功");
} }
/** /**
* 获取单个离职员工信息(管) * 获取单个离职员工信息(管)
*
* @param * @param
* @return * @return
*/ */
...@@ -1195,8 +1333,10 @@ public class YgglController { ...@@ -1195,8 +1333,10 @@ public class YgglController {
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one(); .eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one();
return ResultUtil.data(lzyg, "获取单个离职员工信息(管)成功"); return ResultUtil.data(lzyg, "获取单个离职员工信息(管)成功");
} }
/** /**
* 员工转正 * 员工转正
*
* @param * @param
* @return * @return
*/ */
...@@ -1210,8 +1350,10 @@ public class YgglController { ...@@ -1210,8 +1350,10 @@ public class YgglController {
.zzRemark(ygzzDto.getZzRemark()).build().update(updateWrapper); .zzRemark(ygzzDto.getZzRemark()).build().update(updateWrapper);
return ResultUtil.success("转正成功!"); return ResultUtil.success("转正成功!");
} }
/** /**
* 计划离职 type2-3 * 计划离职 type2-3
*
* @param * @param
* @return * @return
*/ */
...@@ -1241,8 +1383,10 @@ public class YgglController { ...@@ -1241,8 +1383,10 @@ public class YgglController {
// qyzxEmpLogin.deleteById(); // qyzxEmpLogin.deleteById();
return ResultUtil.data(ygglMainLzb, "添加待离职员工成功"); return ResultUtil.data(ygglMainLzb, "添加待离职员工成功");
} }
/** /**
* 确认离职 type3-4 * 确认离职 type3-4
*
* @param * @param
* @return * @return
*/ */
...@@ -1267,8 +1411,10 @@ public class YgglController { ...@@ -1267,8 +1411,10 @@ public class YgglController {
qyzxEmpEntAsso.delete(queryWrapper1); qyzxEmpEntAsso.delete(queryWrapper1);
return ResultUtil.success("确认离职员工成功"); return ResultUtil.success("确认离职员工成功");
} }
/** /**
* 放弃离职 type3-2 * 放弃离职 type3-2
*
* @param * @param
* @return * @return
*/ */
...@@ -1286,24 +1432,25 @@ public class YgglController { ...@@ -1286,24 +1432,25 @@ public class YgglController {
return ResultUtil.success("放弃成功"); return ResultUtil.success("放弃成功");
} }
@PostMapping(value = "/tzlzyy") @PostMapping(value = "/tzlzyy")
@ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 56) @ApiOperationSupport(order = 56)
public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) { public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) {
if (ygglMainLzb.getEmpNum() != null) { if (ygglMainLzb.getEmpNum() != null) {
UpdateWrapper<YgglMainLzb> updateWrapper = new UpdateWrapper<YgglMainLzb>(); UpdateWrapper<YgglMainLzb> updateWrapper = new UpdateWrapper<YgglMainLzb>();
updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainLzb.getEmpNum()); updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainLzb.getEmpNum());
ygglMainLzb.update(updateWrapper); ygglMainLzb.update(updateWrapper);
return ResultUtil.data(ygglMainLzb, "修改成功"); return ResultUtil.data(ygglMainLzb, "修改成功");
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
} }
/** /**
* 查询离职员工列表 * 查询离职员工列表
*
* @param * @param
* @return * @return
*/ */
...@@ -1312,31 +1459,35 @@ public class YgglController { ...@@ -1312,31 +1459,35 @@ public class YgglController {
@ApiOperationSupport(order = 57) @ApiOperationSupport(order = 57)
public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) { public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) {
lzygQueryDto.setOrgCode(userBean.getOrgCode()); lzygQueryDto.setOrgCode(userBean.getOrgCode());
IPage<YgglMainLzb> page = new Page<YgglMainLzb>( IPage<YgglMainLzb> page = new Page<YgglMainLzb>(
lzygQueryDto.getCurrentPage() == null ? 1 : lzygQueryDto.getCurrentPage(), lzygQueryDto.getCurrentPage() == null ? 1 : lzygQueryDto.getCurrentPage(),
lzygQueryDto.getTotalPage() == null ? 10 : lzygQueryDto.getTotalPage()); lzygQueryDto.getTotalPage() == null ? 10 : lzygQueryDto.getTotalPage());
List<YgglMainLzb> lzb = ygglMainLzbMapper.queryLzb(page, lzygQueryDto); List<YgglMainLzb> lzb = ygglMainLzbMapper.queryLzb(page, lzygQueryDto);
return ResultUtil.data(page, lzb, "离职员工搜索成功"); return ResultUtil.data(page, lzb, "离职员工搜索成功");
} }
/** /**
* 展示民族/展示所有民族 * 展示民族/展示所有民族
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/mz/{id}") @PostMapping(value = "/mz/{id}")
@ApiOperation(value = "展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 59) @ApiOperationSupport(order = 59)
public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) {
if (id==null||id==0) { if (id == null || id == 0) {
List<YgmzDto> allmz =new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list(); List<YgmzDto> allmz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list();
return ResultUtil.data(allmz,"展示所有民族"); return ResultUtil.data(allmz, "展示所有民族");
} }
List<YgmzDto> mz =new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).eq(YgmzDto::getNumber, id).list(); List<YgmzDto> mz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).eq(YgmzDto::getNumber, id).list();
return ResultUtil.data(mz,"展示该民族"); return ResultUtil.data(mz, "展示该民族");
} }
/** /**
* 展示籍贯/展示所有籍贯 * 展示籍贯/展示所有籍贯
*
* @param * @param
* @return * @return
*/ */
...@@ -1347,30 +1498,42 @@ public class YgglController { ...@@ -1347,30 +1498,42 @@ public class YgglController {
Integer type = ygjgDto.getType(); Integer type = ygjgDto.getType();
Integer upId = ygjgDto.getJgid(); Integer upId = ygjgDto.getJgid();
List<YgjgDto> maps = new ArrayList<YgjgDto>(); List<YgjgDto> maps = new ArrayList<YgjgDto>();
if (type == 1) { //省份 if (type == 1) { // 省份
List<YgProDto> list = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getProvince,YgProDto::getName).orderByAsc(YgProDto::getProvince).list(); List<YgProDto> list = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
for (YgProDto pro : list) { .select(YgProDto::getId, YgProDto::getProvince, YgProDto::getName).orderByAsc(YgProDto::getProvince)
maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName(),null)); .list();
}} for (YgProDto pro : list) {
if (type == 2) { //城市 maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName(), null));
List<YgCityDto> list = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getCity,YgCityDto::getName).eq(YgCityDto::getProvince, upId).orderByAsc(YgCityDto::getProvince).orderByAsc(YgCityDto::getCity).list(); }
}
if (type == 2) { // 城市
List<YgCityDto> list = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getCity, YgCityDto::getName).eq(YgCityDto::getProvince, upId)
.orderByAsc(YgCityDto::getProvince).orderByAsc(YgCityDto::getCity).list();
for (YgCityDto city : list) { for (YgCityDto city : list) {
maps.add(new YgjgDto(city.getId(), city.getCity(), city.getName(),null)); maps.add(new YgjgDto(city.getId(), city.getCity(), city.getName(), null));
}} }
if (type == 3) { //地区 }
List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getCity, upId).orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list(); if (type == 3) { // 地区
for (YgAreaDto area : list) { List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
maps.add(new YgjgDto(area.getId(), area.getId(), area.getName(),null)); .select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getCity, upId)
}} .orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list();
//IYgjgDto iYgjgDto = PunishFactory.getPunish(type); for (YgAreaDto area : list) {
//List<String> strings = iYgjgDto.exePunish(); maps.add(new YgjgDto(area.getId(), area.getId(), area.getName(), null));
//System.out.println(strings); }
if (!maps.isEmpty()) return ResultUtil.data(maps, "展示籍贯成功"); }
return ResultUtil.success(null); // IYgjgDto iYgjgDto = PunishFactory.getPunish(type);
// List<String> strings = iYgjgDto.exePunish();
// System.out.println(strings);
if (!maps.isEmpty())
return ResultUtil.data(maps, "展示籍贯成功");
return ResultUtil.success(null);
} }
/** /**
* 根据籍贯id显示籍贯名 * 根据籍贯id显示籍贯名
*
* @param * @param
* @return * @return
*/ */
...@@ -1380,44 +1543,66 @@ public class YgglController { ...@@ -1380,44 +1543,66 @@ public class YgglController {
public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) { public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) {
Integer jgid = jgcity.getJgid(); Integer jgid = jgcity.getJgid();
Integer cid = jgcity.getType(); Integer cid = jgcity.getType();
if (jgid!=null) { if (jgid != null) {
String top = jgid.toString().substring(0,2); String top = jgid.toString().substring(0, 2);
String isPro =jgid.toString().substring(2,4); String isPro = jgid.toString().substring(2, 4);
String isCity =jgid.toString().substring(4,6); String isCity = jgid.toString().substring(4, 6);
if ("00".equals(isPro)) { if ("00".equals(isPro)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, jgid).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
if (pro!=null) jgcity.setJgname(pro.getName()); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getId, jgid).one();
if (pro != null)
jgcity.setJgname(pro.getName());
} else if ("00".equals(isCity)) { } else if ("00".equals(isCity)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, jgid).one(); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
if (city!=null ) jgcity.setJgname(pro.getName()+city.getName()); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
} .select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, jgid).one();
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); if (city != null)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top+isPro)).one(); jgcity.setJgname(pro.getName() + city.getName());
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getId, jgid).one(); }
if (area!=null ) jgcity.setJgname(pro.getName()+city.getName()+area.getName()); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
.select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top + isPro))
.one();
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
.select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getId, jgid).one();
if (area != null)
jgcity.setJgname(pro.getName() + city.getName() + area.getName());
} }
if (cid!=null) { if (cid != null) {
String top = cid.toString().substring(0,2); String top = cid.toString().substring(0, 2);
String isPro =cid.toString().substring(2,4); String isPro = cid.toString().substring(2, 4);
String isCity =cid.toString().substring(4,6); String isCity = cid.toString().substring(4, 6);
if ("00".equals(isPro)) { if ("00".equals(isPro)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, cid).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
if (pro!=null) jgcity.setCityname(pro.getName()); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getId, cid).one();
if (pro != null)
jgcity.setCityname(pro.getName());
} else if ("00".equals(isCity)) { } else if ("00".equals(isCity)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, cid).one(); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
if (city!=null ) jgcity.setCityname(pro.getName()+city.getName()); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
} .select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, cid).one();
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); if (city != null)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top+isPro)).one(); jgcity.setCityname(pro.getName() + city.getName());
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getId, cid).one(); }
if (area!=null ) jgcity.setCityname(pro.getName()+city.getName()+area.getName()); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
.select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top + isPro))
.one();
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
.select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getId, cid).one();
if (area != null)
jgcity.setCityname(pro.getName() + city.getName() + area.getName());
} }
return ResultUtil.data(jgcity); return ResultUtil.data(jgcity);
} }
/** /**
* 查询员工列表 * 查询员工列表
*
* @param * @param
* @return * @return
*/ */
...@@ -1428,9 +1613,11 @@ public class YgglController { ...@@ -1428,9 +1613,11 @@ public class YgglController {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean); List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean);
return ResultUtil.data(ygQueryDto, "查询成功"); return ResultUtil.data(ygQueryDto, "查询成功");
} }
/*************** 统计图 ***************/ /*************** 统计图 ***************/
/** /**
* 查询统计图 * 查询统计图
*
* @return 成功信息 * @return 成功信息
*/ */
@GetMapping("/yggl") @GetMapping("/yggl")
...@@ -1468,8 +1655,10 @@ public class YgglController { ...@@ -1468,8 +1655,10 @@ public class YgglController {
return ResultUtil.data(map, "查询成功"); return ResultUtil.data(map, "查询成功");
} }
/** /**
* 获取成长记录表 * 获取成长记录表
*
* @param * @param
* @return * @return
*/ */
...@@ -1481,45 +1670,52 @@ public class YgglController { ...@@ -1481,45 +1670,52 @@ public class YgglController {
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功");
} }
/** /**
* 获取员工社保公积金 * 获取员工社保公积金
*
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/ygsbgjj/{empNum}") @GetMapping(value = "/ygsbgjj/{empNum}")
@ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 65) @ApiOperationSupport(order = 65)
public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean,@PathVariable Integer empNum) { public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build().selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build()
.selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功");
} }
/** /**
* 添加/修改员工社保公积金 * 添加/修改员工社保公积金
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/ygsbgjj") @PostMapping(value = "/ygsbgjj")
@ApiOperation(value = "添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 66) @ApiOperationSupport(order = 66)
public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean,@RequestBody YgglAttaSbgjj ygglAttaSbgjj) { public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean, @RequestBody YgglAttaSbgjj ygglAttaSbgjj) {
Integer empNum = ygglAttaSbgjj.getEmpNum(); Integer empNum = ygglAttaSbgjj.getEmpNum();
if (empNum == null) { if (empNum == null) {
return ResultUtil.error(); return ResultUtil.error();
} }
YgglAttaSbgjj AttaSbgjj = YgglAttaSbgjj.builder().build().selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); YgglAttaSbgjj AttaSbgjj = YgglAttaSbgjj.builder().build()
.selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
if (AttaSbgjj != null) { if (AttaSbgjj != null) {
ygglAttaSbgjj.update(new UpdateWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); ygglAttaSbgjj.update(new UpdateWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
}else { } else {
ygglAttaSbgjj.insert(); ygglAttaSbgjj.insert();
} }
return ResultUtil.data(ygglAttaSbgjj, "添加/修改员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "添加/修改员工社保公积金成功");
} }
/** /**
* 删除员工社保公积金 * 删除员工社保公积金
*
* @param * @param
* @return * @return
*/ */
...@@ -1531,5 +1727,5 @@ public class YgglController { ...@@ -1531,5 +1727,5 @@ public class YgglController {
return ResultUtil.data(YgglAttaSbgjj.builder().build() return ResultUtil.data(YgglAttaSbgjj.builder().build()
.delete(new QueryWrapper<YgglAttaSbgjj>().eq("org_code", orgCode).eq("id", id)), "删除员工社保公积金成功"); .delete(new QueryWrapper<YgglAttaSbgjj>().eq("org_code", orgCode).eq("id", id)), "删除员工社保公积金成功");
} }
} }
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