Commit 06e00b6e by 东州 翁 Committed by chenzg

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

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