Commit c4ba7964 by tangzhaoqian

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

parents 856d2893 8f15eb9c
...@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor; ...@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Table(name="qyzx_invoice_data") @Table(name="qyzx_invoice_usual")
@ApiModel("发票资料表") @ApiModel("常用发票资料表")
public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
private static final long serialVersionUID = 2890357568571822258L; private static final long serialVersionUID = 2890357568571822258L;
...@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{ ...@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty(value="邮箱",example="13144400255@163.com") @ApiModelProperty(value="邮箱",example="13144400255@163.com")
private String email; private String email;
@ApiModelProperty(value="收货地区",example="广东省广州市白云区")
private String shippingArea;
@ApiModelProperty(value="收货地址",example="白云东平伯曼酒店") @ApiModelProperty(value="收货地址",example="白云东平伯曼酒店")
private String shippingAddress; private String shippingAddress;
......
...@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101")
......
...@@ -231,6 +231,12 @@ public class QyzxController { ...@@ -231,6 +231,12 @@ public class QyzxController {
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) { public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) {
QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper) QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper)
.eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one(); .eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one();
if (one.getShippingArea() == null) {
one.setShippingArea("");
}
if (one.getShippingAddress() == null) {
one.setShippingAddress("");
}
return ResultUtil.data(one, "显示常用的企业开票资料"); return ResultUtil.data(one, "显示常用的企业开票资料");
} }
......
...@@ -11,10 +11,12 @@ import java.util.ArrayList; ...@@ -11,10 +11,12 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -43,6 +45,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; ...@@ -43,6 +45,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.BetweenFormater.Level; import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
...@@ -219,6 +222,7 @@ public class YgglController { ...@@ -219,6 +222,7 @@ public class YgglController {
return one; return one;
} }
/** /**
* 获取用户头像 * 获取用户头像
* *
...@@ -427,7 +431,8 @@ public class YgglController { ...@@ -427,7 +431,8 @@ public class YgglController {
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();
...@@ -442,6 +447,7 @@ public class YgglController { ...@@ -442,6 +447,7 @@ public class YgglController {
.in(!bList.isEmpty(), "bmgw_id", bList) .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();
...@@ -771,9 +777,10 @@ public class YgglController { ...@@ -771,9 +777,10 @@ public class YgglController {
// 浴池,洗去选填项字节大于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!=null&& b.length() > 100) {
return false; return false;
} }
} }
return true; return true;
} }
......
package cn.timer.api.controller.zzgl; package cn.timer.api.controller.zzgl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import javax.transaction.Transactional; import javax.transaction.Transactional;
...@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.core.collection.ListUtil;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth; import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper; import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
import cn.timer.api.dto.zzgl.LogDgjlsDto; import cn.timer.api.dto.zzgl.LogDgjlsDto;
...@@ -48,6 +51,9 @@ public class ZzglController { ...@@ -48,6 +51,9 @@ public class ZzglController {
@Autowired @Autowired
ZzglLogDgjlMapper zzglLogDgjlMapper; ZzglLogDgjlMapper zzglLogDgjlMapper;
@Autowired
YgglMainEmpMapper ygglMainEmpMapper;
/** /**
* 架构树/架构图/导出 * 架构树/架构图/导出
...@@ -63,6 +69,15 @@ public class ZzglController { ...@@ -63,6 +69,15 @@ public class ZzglController {
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
return ResultUtil.data(zzglBmgwMs); return ResultUtil.data(zzglBmgwMs);
} }
@GetMapping(value = "/depts")
@ApiOperation(value = "只获取部门", httpMethod = "GET", notes = "接口发布说明")
public Result<List<ZzglBmgwM>> selectdepts(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();//0:部门;1:岗位
return ResultUtil.data(zzglBmgwMs);
}
/** /**
* 岗位成员 * 岗位成员
...@@ -161,6 +176,8 @@ public class ZzglController { ...@@ -161,6 +176,8 @@ public class ZzglController {
@PostMapping(value = "/dept") @PostMapping(value = "/dept")
@ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明")
public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM) { public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM) {
if (zzglBmgwM.getName().trim().length()==0)
return ResultUtil.error("部门岗位名称不能为空");
Boolean a = zzglBmgwM.getId() == null; Boolean a = zzglBmgwM.getId() == null;
if (a && zzglBmgwM.getType() == null) if (a && zzglBmgwM.getType() == null)
zzglBmgwM.setType((Integer) 0); zzglBmgwM.setType((Integer) 0);
...@@ -170,7 +187,39 @@ public class ZzglController { ...@@ -170,7 +187,39 @@ public class ZzglController {
return ResultUtil.data(zzglBmgwM); return ResultUtil.data(zzglBmgwM);
return ResultUtil.success(); return ResultUtil.success();
} }
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
public List<Integer> empNumupdept(Integer orgCode,Integer empNum) {
Set<Integer> lanzi = new HashSet<Integer>();
//所有部门岗位
List<ZzglBmgwM> bmgws = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getOrgCode, orgCode).list();
//个人岗位
YgglMainEmp one = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.select(YgglMainEmp::getBmgwId)
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one();
Integer getId = one.getBmgwId();
Set<Integer> all = empNumupdept2(lanzi, bmgws, getId);
return ListUtil.toList(all);
}
//遍历
public Set<Integer> empNumupdept2(Set<Integer> lanzi,List<ZzglBmgwM> bmgws,Integer getId) {
for (ZzglBmgwM z : bmgws) {
if (getId.equals(z.getId())) {
lanzi.add(getId);
if (z.getUpId()==null || z.getUpId() == 0) {
return lanzi;
}
getId = z.getUpId();
empNumupdept2(lanzi, bmgws, getId);
}
}
return lanzi;
}
/** /**
* 删除部门岗位 * 删除部门岗位
* *
......
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