Commit 4d342b14 by 邓实川

Merge branch 'develop' of http://120.24.24.239:8082/8timerv2/8timerapiv200.git into dsc

parents 6f223a7b 8518de97
...@@ -189,5 +189,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -189,5 +189,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄
@Transient
@TableField(exist = false)
private String error;//错误信息提示 private String error;//错误信息提示
} }
\ No newline at end of file
...@@ -188,6 +188,10 @@ public class YgglMainLzb extends Model<YgglMainLzb> { ...@@ -188,6 +188,10 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@ApiModelProperty(value="离职备注",example="离职原因") @ApiModelProperty(value="离职备注",example="离职原因")
private String lzbz; private String lzbz;
//@Transient
//@TableField(exist = false)
//private String workTime;//工龄
@Tolerate @Tolerate
public YgglMainLzb() { public YgglMainLzb() {
} }
......
...@@ -37,6 +37,8 @@ import com.baomidou.mybatisplus.extension.service.additional.update.impl.LambdaU ...@@ -37,6 +37,8 @@ import com.baomidou.mybatisplus.extension.service.additional.update.impl.LambdaU
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
...@@ -74,11 +76,11 @@ import cn.timer.api.dto.yggl.YgAreaDto; ...@@ -74,11 +76,11 @@ import cn.timer.api.dto.yggl.YgAreaDto;
import cn.timer.api.dto.yggl.YgCityDto; import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgDrjqbDto; import cn.timer.api.dto.yggl.YgDrjqbDto;
import cn.timer.api.dto.yggl.YgDrsDto; import cn.timer.api.dto.yggl.YgDrsDto;
import cn.timer.api.dto.yggl.YgProDto;
import cn.timer.api.dto.yggl.YgQueryDto; import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgglCartogramDto; import cn.timer.api.dto.yggl.YgglCartogramDto;
import cn.timer.api.dto.yggl.YgjgDto; import cn.timer.api.dto.yggl.YgjgDto;
import cn.timer.api.dto.yggl.YgmzDto; import cn.timer.api.dto.yggl.YgmzDto;
import cn.timer.api.dto.yggl.YgProDto;
import cn.timer.api.dto.yggl.YgzzDto; import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.Md5; import cn.timer.api.utils.Md5;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -134,6 +136,7 @@ public class YgglController { ...@@ -134,6 +136,7 @@ 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);
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(),Level.DAY));
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
...@@ -146,6 +149,9 @@ public class YgglController { ...@@ -146,6 +149,9 @@ 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);
if (ygglMainEmp != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(),Level.DAY));
}
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
...@@ -189,7 +195,8 @@ public class YgglController { ...@@ -189,7 +195,8 @@ public class YgglController {
Integer zjType = addygdaDto.getZjType(); Integer zjType = addygdaDto.getZjType();
String zjNum = addygdaDto.getZjNum(); String zjNum = addygdaDto.getZjNum();
Integer jobType = addygdaDto.getJobType(); Integer jobType = addygdaDto.getJobType();
Date rzTime = addygdaDto.getRzTime(); // Date rzTime = addygdaDto.getRzTime();// ?????????????为什么新添加员工不给默认入职日期?????????????????????????
Date rzTime = new Date();
Integer syq = addygdaDto.getSyq(); Integer syq = addygdaDto.getSyq();
Integer sex = addygdaDto.getSex(); Integer sex = addygdaDto.getSex();
if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) { if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) {
...@@ -211,6 +218,7 @@ public class YgglController { ...@@ -211,6 +218,7 @@ 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 {
...@@ -274,7 +282,7 @@ public class YgglController { ...@@ -274,7 +282,7 @@ public class YgglController {
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)
.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));
...@@ -394,6 +402,7 @@ public class YgglController { ...@@ -394,6 +402,7 @@ public class YgglController {
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@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++) {//
...@@ -520,6 +529,7 @@ public class YgglController { ...@@ -520,6 +529,7 @@ public class YgglController {
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@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++) {//
...@@ -1272,6 +1282,22 @@ public class YgglController { ...@@ -1272,6 +1282,22 @@ public class YgglController {
return ResultUtil.success("放弃成功"); return ResultUtil.success("放弃成功");
} }
@PostMapping(value = "/tzlzyy")
@ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 56)
public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) {
if (ygglMainLzb.getEmpNum() != null) {
UpdateWrapper<YgglMainLzb> updateWrapper = new UpdateWrapper<YgglMainLzb>();
updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainLzb.getEmpNum());
ygglMainLzb.update(updateWrapper);
return ResultUtil.data(ygglMainLzb, "修改成功");
}
return ResultUtil.error("请确认该员工是否存在!");
}
/** /**
* 查询离职员工列表 * 查询离职员工列表
* @param * @param
...@@ -1318,7 +1344,6 @@ public class YgglController { ...@@ -1318,7 +1344,6 @@ public class YgglController {
Integer upId = ygjgDto.getJgid(); Integer upId = ygjgDto.getJgid();
List<YgjgDto> maps = new ArrayList<YgjgDto>(); List<YgjgDto> maps = new ArrayList<YgjgDto>();
Map<Integer, String> map = new HashMap<Integer, String>();
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).select(YgProDto::getId,YgProDto::getProvince,YgProDto::getName).orderByAsc(YgProDto::getProvince).list();
for (YgProDto pro : list) { for (YgProDto pro : list) {
...@@ -1345,7 +1370,7 @@ public class YgglController { ...@@ -1345,7 +1370,7 @@ public class YgglController {
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/jgp/{id}") @PostMapping(value = "/jgp")
@ApiOperation(value = "根据籍贯id显示籍贯城市名", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "根据籍贯id显示籍贯城市名", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 61) @ApiOperationSupport(order = 61)
public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) { public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) {
...@@ -1360,11 +1385,11 @@ public class YgglController { ...@@ -1360,11 +1385,11 @@ public class YgglController {
if (pro!=null) jgcity.setJgname(pro.getName()); 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).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getId, jgid).one(); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, jgid).one();
if (city!=null ) jgcity.setJgname(pro.getName()+city.getName()); if (city!=null ) jgcity.setJgname(pro.getName()+city.getName());
} }
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); 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::getId, Integer.parseInt(top+isPro)).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(); 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 (area!=null ) jgcity.setJgname(pro.getName()+city.getName()+area.getName());
} }
...@@ -1377,11 +1402,11 @@ public class YgglController { ...@@ -1377,11 +1402,11 @@ public class YgglController {
if (pro!=null) jgcity.setCityname(pro.getName()); 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).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getId, cid).one(); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, cid).one();
if (city!=null ) jgcity.setCityname(pro.getName()+city.getName()); if (city!=null ) jgcity.setCityname(pro.getName()+city.getName());
} }
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); 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::getId, Integer.parseInt(top+isPro)).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(); 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()); if (area!=null ) jgcity.setCityname(pro.getName()+city.getName()+area.getName());
} }
......
...@@ -54,4 +54,9 @@ public class LzbDto extends Page implements Serializable{ ...@@ -54,4 +54,9 @@ public class LzbDto extends Page implements Serializable{
@ApiModelProperty(value="离职备注",example="离职备注") @ApiModelProperty(value="离职备注",example="离职备注")
private String bz; private String bz;
@ApiModelProperty(value="离职原因",example="离职备注")
private String lzyy;
@ApiModelProperty(value="实际离职时间",example="离职备注")
private Date sjlz;
} }
...@@ -8,8 +8,6 @@ package cn.timer.api.dto.yggl; ...@@ -8,8 +8,6 @@ package cn.timer.api.dto.yggl;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.alibaba.fastjson.annotation.JSONField;
import cn.timer.api.utils.Page; import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -65,4 +63,7 @@ public class YgQueryDto extends Page implements Serializable{ ...@@ -65,4 +63,7 @@ public class YgQueryDto extends Page implements Serializable{
@ApiModelProperty(value="备注",example="123") @ApiModelProperty(value="备注",example="123")
private String bz; private String bz;
@ApiModelProperty(value="离职原因",example="123")
private String lzyy;
} }
...@@ -116,7 +116,7 @@ pagehelper: ...@@ -116,7 +116,7 @@ pagehelper:
#showSql #showSql
logging: logging:
level: level:
root: info root: DEBUG
cn.timer.api.dao: error cn.timer.api.dao: error
pattern: pattern:
console: '--%p--%m%n' console: '--%p--%m%n'
......
...@@ -184,17 +184,19 @@ ...@@ -184,17 +184,19 @@
a.job_type `type`, a.job_type `type`,
a.job_status `jobStatus`, a.job_status `jobStatus`,
a.rz_time `rz`, a.rz_time `rz`,
timestampdiff(month,a.rz_time,a.lz_time) `workage`, timestampdiff(day,a.rz_time,a.lz_time) `workage`,
a.lz_time `ylz`, a.lz_time `ylz`,
a.phone `phone`, a.phone `phone`,
a.lzbz `bz` a.lzbz `bz`,
a.lzyy lzyy,
a.sjlz_time sjlz
FROM FROM
yggl_main_lzb a yggl_main_lzb a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
LEFT JOIN zzgl_bmgw_m c ON b.up_id = c.id LEFT JOIN zzgl_bmgw_m c ON b.up_id = c.id
WHERE WHERE
a.org_code = #{q.orgCode} a.org_code = #{q.orgCode}
<if test ="null != q.jobStatus and q.query !=''"> <if test ="null != q.jobStatus and q.jobStatus !=''">
AND AND
a.job_status = #{q.jobStatus} a.job_status = #{q.jobStatus}
</if> </if>
......
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