Commit 3b5fa9f4 by 284718418@qq.com

修改BUG

parent ac386e79
...@@ -10,6 +10,9 @@ import java.util.List; ...@@ -10,6 +10,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import cn.timer.api.bean.dzht.DzhtAssoMbzj;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
...@@ -19,14 +22,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -19,14 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
...@@ -569,6 +565,18 @@ public class TimeCardController { ...@@ -569,6 +565,18 @@ public class TimeCardController {
overrule.setRange(vice); overrule.setRange(vice);
return ResultUtil.data(overrule,"操作成功!"); return ResultUtil.data(overrule,"操作成功!");
} }
/**
* 是否开启假期规则
*/
@PutMapping(value = "/leave_rules_open")
@ApiOperation(value = "14.1:是否开启假期规则 ", httpMethod = "PUT", notes = "接口发布说明")
@ApiOperationSupport(order = 14)
public Result<Object> leaveRulesOpen(@RequestBody KqglAssoLeaveRulesDto kqglAssoLeaveRulesDto) {
UpdateWrapper<KqglAssoLeaveRules> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id", kqglAssoLeaveRulesDto.getId()).set("is_open", kqglAssoLeaveRulesDto.getIsOpen());
KqglAssoLeaveRules.builder().build().update(updateWrapper);
return ResultUtil.success();
}
@Autowired @Autowired
......
...@@ -6,16 +6,13 @@ import java.util.stream.Collectors; ...@@ -6,16 +6,13 @@ import java.util.stream.Collectors;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import freemarker.template.utility.StringUtil;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -234,7 +231,7 @@ public class ZzglController { ...@@ -234,7 +231,7 @@ public class ZzglController {
*/ */
@GetMapping(value = "/otherlistent/{id}") @GetMapping(value = "/otherlistent/{id}")
@ApiOperation(value = "获取岗位成员列表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取岗位成员列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<YgglMainEmp>> selectOtherlistent(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<List<YgglMainEmp>> selectOtherlistent(@CurrentUser UserBean userBean, @PathVariable Integer id, @ApiParam("过滤参数") @RequestParam(value = "param", required = false, defaultValue = "") String param) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
...@@ -251,8 +248,10 @@ public class ZzglController { ...@@ -251,8 +248,10 @@ public class ZzglController {
LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>();
ygglMainEmpsLambdaQueryWrapper ygglMainEmpsLambdaQueryWrapper
.select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone, .select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone,
YgglMainEmp::getBmgwId) YgglMainEmp::getBmgwId,YgglMainEmp::getCustomNum)
.eq(YgglMainEmp::getOrgCode, orgCode).and(i -> i.in(YgglMainEmp::getBmgwId, list.toArray())) .eq(YgglMainEmp::getOrgCode, orgCode)
.and(i -> i.in(YgglMainEmp::getBmgwId, list.toArray()))
.and(!StrUtil.hasBlank(param),w -> w.like(YgglMainEmp::getName, param).or().like(YgglMainEmp::getEmpNum, param).or().eq(YgglMainEmp::getPhone, param).or().like(YgglMainEmp::getCustomNum, param))
.last(lead != null, "order by if (emp_num='" + lead + "',0,1)"); .last(lead != null, "order by if (emp_num='" + lead + "',0,1)");
List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper); List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper);
return ResultUtil.data(ygglMainEmps); return ResultUtil.data(ygglMainEmps);
...@@ -409,6 +408,7 @@ public class ZzglController { ...@@ -409,6 +408,7 @@ public class ZzglController {
Integer dpetId = upEmpDeptDto.getDpetId(); Integer dpetId = upEmpDeptDto.getDpetId();
List<Integer> empNums = upEmpDeptDto.getEmpNum(); List<Integer> empNums = upEmpDeptDto.getEmpNum();
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
KqglAssoMonthPunchSummary kqglAssoMonthPunchSummary = KqglAssoMonthPunchSummary.builder().build();
zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(), zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(),
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗"); dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
// 清楚 leader 主管标记 // 清楚 leader 主管标记
...@@ -420,9 +420,15 @@ public class ZzglController { ...@@ -420,9 +420,15 @@ public class ZzglController {
} }
ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda() ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda()
.set(YgglMainEmp::getBmgwId, dpetId) .set(YgglMainEmp::getBmgwId, dpetId).set(YgglMainEmp::getBmgwName, upEmpDeptDto.getDept())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNums)); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNums));
// 调岗 同步部门 和 岗位信息 打卡月汇总
if(!StringUtils.isEmpty(upEmpDeptDto.getIsdg()) && upEmpDeptDto.getIsdg().intValue()==1){
kqglAssoMonthPunchSummary.update(new UpdateWrapper<KqglAssoMonthPunchSummary>().lambda()
.set(KqglAssoMonthPunchSummary::getDept, upEmpDeptDto.getDept()).set(KqglAssoMonthPunchSummary::getPost, upEmpDeptDto.getPost())
.eq(KqglAssoMonthPunchSummary::getOrgCode, userBean.getOrgCode()).in(KqglAssoMonthPunchSummary::getNum, empNums)
);
}
return ResultUtil.success(); return ResultUtil.success();
} }
......
...@@ -45,6 +45,9 @@ public class KqglAssoMonthPunchSummaryDto implements Serializable{ ...@@ -45,6 +45,9 @@ public class KqglAssoMonthPunchSummaryDto implements Serializable{
@ApiModelProperty(value = "工号 工号", example = "101") @ApiModelProperty(value = "工号 工号", example = "101")
private Integer num; private Integer num;
@ApiModelProperty(value = "自定义员工工号", example = "101")
private String customNum;
@ApiModelProperty(value = "部门 ", example = "部门") @ApiModelProperty(value = "部门 ", example = "部门")
private String dept; private String dept;
......
...@@ -19,6 +19,12 @@ public class UpEmpDeptDto implements Serializable{ ...@@ -19,6 +19,12 @@ public class UpEmpDeptDto implements Serializable{
@ApiModelProperty(value="部门岗位id",example="1") @ApiModelProperty(value="部门岗位id",example="1")
private Integer dpetId; private Integer dpetId;
@ApiModelProperty(value="部门",example="'部门'")
private String dept;
@ApiModelProperty(value="'职位'",example="''职位''")
private String post;
@ApiModelProperty(value="员工工号",example="2") @ApiModelProperty(value="员工工号",example="2")
private List<Integer> empNum; private List<Integer> empNum;
......
...@@ -138,8 +138,9 @@ ...@@ -138,8 +138,9 @@
<result column="belong_month" property="belongMonth" /> <result column="belong_month" property="belongMonth" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="last_modified" property="lastModified" /> <result column="last_modified" property="lastModified" />
<result column="turnover_status" property="turnover_status" /> <result column="turnover_status" property="turnover_status" />
<result column="custom_num" property="customNum" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto"> <collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<id column="yzid" property="yzid"/> <id column="yzid" property="yzid"/>
...@@ -283,15 +284,19 @@ ...@@ -283,15 +284,19 @@
<select id="AttendanceSummaryData" resultMap="SummarydataMap"> <select id="AttendanceSummaryData" resultMap="SummarydataMap">
select sum.*, select sum.*,
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname, (select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = sum.num and em.org_code = sum.org_code LIMIT 1),0) as turnover_status IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = sum.num and em.org_code = sum.org_code LIMIT 1),0) as turnover_status,
yme.custom_num AS custom_num
from kqgl_asso_month_punch_summary sum from kqgl_asso_month_punch_summary sum
LEFT JOIN yggl_main_emp yme ON yme.org_code = sum.org_code and yme.emp_num=sum.num
where sum.org_code = #{param.orgCode} where sum.org_code = #{param.orgCode}
and sum.belong_year = #{param.year} and sum.belong_year = #{param.year}
and sum.belong_month = #{param.month} and sum.belong_month = #{param.month}
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and ( sum.`name` like CONCAT('%',#{param.query},'%') or and ( sum.`name` like CONCAT('%',#{param.query},'%') or
sum.num like CONCAT('%',#{param.query},'%')) sum.num like CONCAT('%',#{param.query},'%')
or yme.custom_num like CONCAT('%',#{param.query},'%')
)
</if> </if>
<if test="param.attid != null and param.attid != ''"> <if test="param.attid != null and param.attid != ''">
and sum.att_group = #{param.attid} and sum.att_group = #{param.attid}
......
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