Commit 06e00b6e by 东州 翁 Committed by chenzg

更新籍贯城市的显示方式,补上两个社保公积金的删除,修改接口

parent f0dd2dd3
package cn.timer.api.bean.yggl; package cn.timer.api.bean.yggl;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
/** /**
* @author Tang 2019-12-27 * @author Tang 2019-12-27
*/ */
@Entity @Entity
@Data @Data
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Table(name="yggl_atta_sbgjj") @Table(name="yggl_atta_sbgjj")
@ApiModel("员工社保公积金") @ApiModel("员工社保公积金")
public class YgglAttaSbgjj extends Model<YgglAttaSbgjj> { public class YgglAttaSbgjj extends Model<YgglAttaSbgjj> {
private static final long serialVersionUID = 532391446907698642L; private static final long serialVersionUID = 532391446907698642L;
@Id @Id
@GeneratedValue @GeneratedValue
@TableId (type = IdType.AUTO) @TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号 编号",example="10001") @ApiModelProperty(value="编号 编号",example="10001")
private Integer id; private Integer id;
@ApiModelProperty(value="员工工号 员工工号",example="100") @ApiModelProperty(value="员工工号 员工工号",example="100")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="是否首次缴纳社保 0是 1否",example="0") @ApiModelProperty(value="是否首次缴纳社保 0是 1否",example="0")
private Integer isScjnsb; private Integer isScjnsb;
@ApiModelProperty(value="是否首次缴纳公积金 0是 1否",example="0") @ApiModelProperty(value="是否首次缴纳公积金 0是 1否",example="0")
private Integer isScjngjj; private Integer isScjngjj;
@ApiModelProperty(value="个人社保帐号 ",example="HJHG124") @ApiModelProperty(value="个人社保帐号 ",example="HJHG124")
private String grsbzh; private String grsbzh;
@ApiModelProperty(value="个人公积金帐号 ",example="OH81889257") @ApiModelProperty(value="个人公积金帐号 ",example="OH81889257")
private String grgjjzh; private String grgjjzh;
@ApiModelProperty(value="组织机构代码 ",example="117")
private Integer orgCode;
} }
\ No newline at end of file
...@@ -8,10 +8,14 @@ import javax.persistence.Id; ...@@ -8,10 +8,14 @@ import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -130,7 +134,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -130,7 +134,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 1试用、2正式、3离职中、4已离职",example="101") @ApiModelProperty(value="员工状态 1正式、2试用、3离职中、4已离职",example="101")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
......
...@@ -276,15 +276,12 @@ public class YgglController { ...@@ -276,15 +276,12 @@ public class YgglController {
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")
.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(), "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();
ygglMainEmpPage.getCurrent();
ygglMainEmpPage.getPages();
ygglMainEmpPage.getTotal();
ygglMainEmpPage.getSize();
return ResultUtil.data(ygglMainEmpPage, "员工搜索成功"); return ResultUtil.data(ygglMainEmpPage, "员工搜索成功");
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功"); // return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
} }
...@@ -1285,6 +1282,7 @@ public class YgglController { ...@@ -1285,6 +1282,7 @@ 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());
...@@ -1324,17 +1322,17 @@ public class YgglController { ...@@ -1324,17 +1322,17 @@ public class YgglController {
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) {
maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName())); maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName(),null));
}} }}
if (type == 2) { //城市 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(); 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())); maps.add(new YgjgDto(city.getId(), city.getCity(), city.getName(),null));
}} }}
if (type == 3) { //地区 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(); List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getCity, upId).orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list();
for (YgAreaDto area : list) { for (YgAreaDto area : list) {
maps.add(new YgjgDto(area.getId(), area.getId(), area.getName())); maps.add(new YgjgDto(area.getId(), area.getId(), area.getName(),null));
}} }}
//IYgjgDto iYgjgDto = PunishFactory.getPunish(type); //IYgjgDto iYgjgDto = PunishFactory.getPunish(type);
//List<String> strings = iYgjgDto.exePunish(); //List<String> strings = iYgjgDto.exePunish();
...@@ -1348,20 +1346,46 @@ public class YgglController { ...@@ -1348,20 +1346,46 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/jgp/{id}") @PostMapping(value = "/jgp/{id}")
@ApiOperation(value = "根据籍贯id显示籍贯名", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "根据籍贯id显示籍贯城市名", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 61) @ApiOperationSupport(order = 61)
public Result<String> selectjg(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) {
String isPro =id.toString().substring(2,4); Integer jgid = jgcity.getJgid();
String isCity =id.toString().substring(4,6); Integer cid = jgcity.getType();
if ("00".equals(isPro)) { if (jgid!=null) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, id).one(); String top = jgid.toString().substring(0,2);
if (pro!=null) { return ResultUtil.data(pro.getName(),"显示所在籍贯"); }} String isPro =jgid.toString().substring(2,4);
if ("00".equals(isCity)) { String isCity =jgid.toString().substring(4,6);
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getId, id).one(); if ("00".equals(isPro)) {
if (city!=null ) { return ResultUtil.data(city.getName(),"显示所在籍贯"); }} YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, jgid).one();
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getId, id).one(); if (pro!=null) jgcity.setJgname(pro.getName());
if (area!=null ) { return ResultUtil.data(area.getName(),"显示所在籍贯");} } else if ("00".equals(isCity)) {
return ResultUtil.error("编码有误,显示不到所在籍贯"); 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();
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();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getId, 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) {
String top = cid.toString().substring(0,2);
String isPro =cid.toString().substring(2,4);
String isCity =cid.toString().substring(4,6);
if ("00".equals(isPro)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, cid).one();
if (pro!=null) jgcity.setCityname(pro.getName());
} else if ("00".equals(isCity)) {
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();
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();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getId, 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);
} }
/** /**
* 查询员工列表 * 查询员工列表
......
/** /**
* @date 2019年11月16日 * @date 2019年11月16日
* @author 翁东州 * @author 翁东州
* @方法中文名称: * @方法中文名称:
*/ */
package cn.timer.api.dto.yggl; package cn.timer.api.dto.yggl;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import cn.timer.api.utils.Page; import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import cn.timer.api.utils.Page;
import lombok.Builder; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor; import lombok.Builder;
import lombok.Data;
/** import lombok.NoArgsConstructor;
* @date 2019年11月16日
* @author 翁东州 /**
* @方法中文名称: * @date 2019年11月16日
*/ * @author 翁东州
@Data * @方法中文名称:
@Builder */
@NoArgsConstructor @Data
@AllArgsConstructor @Builder
public class YgQueryDto extends Page implements Serializable{ @NoArgsConstructor
@AllArgsConstructor
private static final long serialVersionUID = -1230023773946170942L; public class YgQueryDto extends Page implements Serializable{
@ApiModelProperty(value="员工姓名",example="华仔") private static final long serialVersionUID = -1230023773946170942L;
private String empName;
@ApiModelProperty(value="员工姓名",example="华仔")
@ApiModelProperty(value="员工号",example="1") private String empName;
private Integer empNum;
@ApiModelProperty(value="员工号",example="1")
@ApiModelProperty(value="部门名",example="1") private Integer empNum;
private String deptName;
@ApiModelProperty(value="部门名",example="1")
@ApiModelProperty(value="上级部门名",example="1") private String deptName;
private String upName;
@ApiModelProperty(value="上级部门名",example="1")
@ApiModelProperty(value="入职时间",example="1") private String upName;
private Date rzTime;
@ApiModelProperty(value="入职时间",example="1")
@ApiModelProperty(value="应离职时间",example="1") private Date rzTime;
private Date ylzTime;
@ApiModelProperty(value="应离职时间",example="1")
@ApiModelProperty(value="工作性质1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="1") private Date ylzTime;
private Integer jobType;
@ApiModelProperty(value="工作性质1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="1")
@ApiModelProperty(value="手机号",example="1") private Integer jobType;
private String phone;
@ApiModelProperty(value="手机号",example="1")
@ApiModelProperty(value="部门id",example="101") private String phone;
private Integer bmgwid;
@ApiModelProperty(value="部门id",example="101")
@ApiModelProperty(value="员工状态1试用、2正式、3离职中、4已离职",example="2") private Integer bmgwid;
private Integer jobStatus;
@ApiModelProperty(value="员工状态1正式、2试用、3离职中、4已离职",example="2")
@ApiModelProperty(value="手机号、姓名",example="1388888888 or 张三") private Integer jobStatus;
private String query;
@ApiModelProperty(value="手机号、姓名",example="1388888888 or 张三")
@ApiModelProperty(value="备注",example="123") private String query;
private String bz;
} @ApiModelProperty(value="备注",example="123")
private String bz;
}
...@@ -38,6 +38,10 @@ public class YgjgDto implements Serializable { ...@@ -38,6 +38,10 @@ public class YgjgDto implements Serializable {
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String cityname;
@Transient
@TableField(exist = false)
private String jgname; private String jgname;
} }
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