Commit 83f9450c by ilal

提價

parent 1735dbc1
...@@ -40,8 +40,8 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> { ...@@ -40,8 +40,8 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班") @ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name; private String name;
@ApiModelProperty(value = "应用范围", example = "1") @ApiModelProperty(value = "应用范围", example = "(0:全公司 >0:考勤组id)")
private String appliedScope; private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1") @ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime; private Integer isWorkovertime;
......
...@@ -93,5 +93,8 @@ public class KqglMainKqz extends Model<KqglMainKqz> { ...@@ -93,5 +93,8 @@ public class KqglMainKqz extends Model<KqglMainKqz> {
@ApiModelProperty(value = "外勤 外勤", example = "101") @ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq; private Integer isWq;
@ApiModelProperty(value="加班规则 加班规则",example="101")
private Integer overtimeRulesId;
} }
\ No newline at end of file
...@@ -5,12 +5,9 @@ import java.util.ArrayList; ...@@ -5,12 +5,9 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -28,9 +25,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; ...@@ -28,9 +25,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console; import cn.hutool.core.lang.Console;
import cn.timer.api.bean.kqgl.PunchCardAddress;
import cn.timer.api.bean.kqgl.PunchCardWiFi;
import cn.timer.api.bean.kqgl.ShiftManagement;
import cn.timer.api.bean.kqmk.KqglAssOvertimeVice; import cn.timer.api.bean.kqmk.KqglAssOvertimeVice;
import cn.timer.api.bean.kqmk.KqglAssoBcsz; import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoDkdz; import cn.timer.api.bean.kqmk.KqglAssoDkdz;
...@@ -40,6 +34,7 @@ import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs; ...@@ -40,6 +34,7 @@ import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics; import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRange;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules; import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoPbmx; import cn.timer.api.bean.kqmk.KqglAssoPbmx;
import cn.timer.api.bean.kqmk.KqglAssoRulesVice; import cn.timer.api.bean.kqmk.KqglAssoRulesVice;
...@@ -47,7 +42,6 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu; ...@@ -47,7 +42,6 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoYhkqz; import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz; import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
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;
...@@ -58,6 +52,7 @@ import cn.timer.api.dao.kqmk.KqglAssoDkwxMapper; ...@@ -58,6 +52,7 @@ import cn.timer.api.dao.kqmk.KqglAssoDkwxMapper;
import cn.timer.api.dao.kqmk.KqglAssoKqjMapper; import cn.timer.api.dao.kqmk.KqglAssoKqjMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper; import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper; import cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper;
import cn.timer.api.dao.kqmk.KqglAssoOvertimeRangeMapper;
import cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper; import cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper;
import cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper; import cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper;
import cn.timer.api.dao.kqmk.KqglAssoYhsbMapper; import cn.timer.api.dao.kqmk.KqglAssoYhsbMapper;
...@@ -72,7 +67,6 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto; ...@@ -72,7 +67,6 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto;
import cn.timer.api.dto.kqmk.MachinememberDto; import cn.timer.api.dto.kqmk.MachinememberDto;
import cn.timer.api.dto.kqmk.StartTimeRestDto; import cn.timer.api.dto.kqmk.StartTimeRestDto;
import cn.timer.api.dto.kqmk.VacationInformationDto; import cn.timer.api.dto.kqmk.VacationInformationDto;
import cn.timer.api.dto.spmk.MySummaryQueryDto;
import cn.timer.api.utils.ResponseResult; import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -103,7 +97,6 @@ public class TimeCardController { ...@@ -103,7 +97,6 @@ public class TimeCardController {
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage()); attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode()); attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
// IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, attquerycriteriadto);//用于SQL语句
IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getQyid, userBean.getOrgCode())); IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getQyid, userBean.getOrgCode()));
List<KqglAssoBcsz> listAs = pageAs.getRecords(); List<KqglAssoBcsz> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
...@@ -143,7 +136,6 @@ public class TimeCardController { ...@@ -143,7 +136,6 @@ public class TimeCardController {
@ApiOperation(value = "4:获取班次信息-根据班次id", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "4:获取班次信息-根据班次id", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
public Result<Object> getShiftCenter(@PathVariable("id") Integer id) { public Result<Object> getShiftCenter(@PathVariable("id") Integer id) {
return ResultUtil.data(KqglAssoBcsz.builder().id(id).build().selectById(),"操作成功!"); return ResultUtil.data(KqglAssoBcsz.builder().id(id).build().selectById(),"操作成功!");
} }
...@@ -179,11 +171,17 @@ public class TimeCardController { ...@@ -179,11 +171,17 @@ public class TimeCardController {
List<KqglAssoOvertimeRules> listAs = pageAs.getRecords(); List<KqglAssoOvertimeRules> listAs = pageAs.getRecords();
List<KqglAssoOvertimeRulesDto> rulesdto = new ArrayList<KqglAssoOvertimeRulesDto>(); List<KqglAssoOvertimeRulesDto> rulesdto = new ArrayList<KqglAssoOvertimeRulesDto>();
for (int i = 0, n = listAs.size(); i < n; i++) { for (int i = 0, n = listAs.size(); i < n; i++) {
String[] arr = listAs.get(i).getAppliedScope().split(","); // 用,分割 String[] nary = null;
String[] nary= new String[arr.length];//用户名 if(listAs.get(i).getAppliedScope() == 0) {//全公司
for(int y=0;y<arr.length;y++){ nary = new String[1];//用户名
KqglMainKqz kqzmc = kqglmainkqzmapper.selectOne(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getId, arr[y])); nary[0] = "全公司";
nary[y] = kqzmc.getName(); }else {
List<KqglAssoOvertimeRange> overtim = kqglassoovertimerangemapper.selectList(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, listAs.get(i).getId()));
nary = new String[overtim.size()];//用户名
for(int y = 0,l = overtim.size(); y < l ; y++) {
KqglMainKqz kqzmc = kqglmainkqzmapper.selectOne(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getId, overtim.get(y).getAttgroupId()));
nary[y] = kqzmc.getName();
}
} }
KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build(); KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build();
ruldto.setApplyrange(nary); ruldto.setApplyrange(nary);
...@@ -193,6 +191,9 @@ public class TimeCardController { ...@@ -193,6 +191,9 @@ public class TimeCardController {
return ResultUtil.data(pageAs, rulesdto, "操作成功!"); return ResultUtil.data(pageAs, rulesdto, "操作成功!");
} }
@Autowired
private KqglAssoOvertimeRangeMapper kqglassoovertimerangemapper;
/** /**
* 新增/修改--加班规则 * 新增/修改--加班规则
*/ */
...@@ -203,21 +204,28 @@ public class TimeCardController { ...@@ -203,21 +204,28 @@ public class TimeCardController {
overrules.setCreateTime(new Date().getTime()); overrules.setCreateTime(new Date().getTime());
overrules.setOrgCode(userBean.getOrgCode()); overrules.setOrgCode(userBean.getOrgCode());
overrules.setCreateUserid(userBean.getEmpNum()); overrules.setCreateUserid(userBean.getEmpNum());
String[] launchs = overrules.getApplyrange();
String appliedscope = StringUtils.join(launchs, ",");
// rul.setAppliedScope(appliedscope);//应用范围
overrules.setAppliedScope(appliedscope);
KqglAssoOvertimeRules rul = KqglAssoOvertimeRules.builder().build(); KqglAssoOvertimeRules rul = KqglAssoOvertimeRules.builder().build();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil.copyProperties(overrules, rul , "starttime","applyrange"); BeanUtil.copyProperties(overrules, rul , "starttime","applyrange");
if (!rul.insertOrUpdate()) if (!rul.insertOrUpdate())
return ResultUtil.error("操作失败"); return ResultUtil.error("操作失败");
Integer id = rul.getId(); Integer id = rul.getId();
Console.log("新增/修改加班规则id: " + id); Console.log("新增/修改加班规则id: " + id);
List<KqglAssoOvertimeRange> overatts=new ArrayList<KqglAssoOvertimeRange>();
String[] launchs = overrules.getApplyrange();
if(launchs.length == 0) {
KqglAssoOvertimeRange.builder().build().delete(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, id));
}else if(launchs != null && launchs.length>0){
for(int p=0;p<launchs.length;p++){
KqglAssoOvertimeRange.builder().build().delete(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, id));
KqglAssoOvertimeRange vice = KqglAssoOvertimeRange.builder().build();
vice.setOvertimeRulesId(id);
vice.setAttgroupId(Integer.valueOf(launchs[p]));
overatts.add(vice);
}
}
if(overatts.size() > 0) {
kqglassoovertimerangemapper.insertovertimerangelist(overatts);
}
List<KqglAssOvertimeVice> overtimes=new ArrayList<KqglAssOvertimeVice>(); List<KqglAssOvertimeVice> overtimes=new ArrayList<KqglAssOvertimeVice>();
StartTimeRestDto[] rest = overrules.getStarttime(); StartTimeRestDto[] rest = overrules.getStarttime();
if(rest != null && rest.length>0){ if(rest != null && rest.length>0){
...@@ -245,16 +253,16 @@ public class TimeCardController { ...@@ -245,16 +253,16 @@ public class TimeCardController {
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public Result<IndividualOvertimeRuleDto> getOvertimeRules(@PathVariable("id") Integer id) { public Result<IndividualOvertimeRuleDto> getOvertimeRules(@PathVariable("id") Integer id) {
IndividualOvertimeRuleDto overrule = IndividualOvertimeRuleDto.builder().build(); IndividualOvertimeRuleDto overrule = IndividualOvertimeRuleDto.builder().build();
KqglAssoOvertimeRules rules = KqglAssoOvertimeRules.builder().id(id).build().selectById(); KqglAssoOvertimeRules rules = KqglAssoOvertimeRules.builder().id(id).build().selectById();
String str = rules.getAppliedScope(); List<KqglAssoOvertimeRange> overtim = kqglassoovertimerangemapper.selectList(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getOvertimeRulesId, rules.getId()));
String[] arr = str.split(","); // 用,分割 String[] arr = new String[overtim.size()];//用户名
for (int i = 0, n = overtim.size(); i < n; i++) {
arr[i] = overtim.get(i).getAttgroupId().toString();
}
KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build(); KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build();
ruldto.setApplyrange(arr); ruldto.setApplyrange(arr);
BeanUtil.copyProperties(rules, ruldto , "starttime","applyrange"); BeanUtil.copyProperties(rules, ruldto , "starttime","applyrange");
overrule.setRules(ruldto); overrule.setRules(ruldto);
List<KqglAssOvertimeVice> vice = new LambdaQueryChainWrapper<KqglAssOvertimeVice>(kqglassovertimevicemapper).eq(KqglAssOvertimeVice::getOvertimeRulesId, id).list(); List<KqglAssOvertimeVice> vice = new LambdaQueryChainWrapper<KqglAssOvertimeVice>(kqglassovertimevicemapper).eq(KqglAssOvertimeVice::getOvertimeRulesId, id).list();
overrule.setStarttime(vice); overrule.setStarttime(vice);
return ResultUtil.data(overrule,"操作成功!"); return ResultUtil.data(overrule,"操作成功!");
...@@ -339,15 +347,12 @@ public class TimeCardController { ...@@ -339,15 +347,12 @@ public class TimeCardController {
BeanUtil.copyProperties(leaverules, learul , "starttime"); BeanUtil.copyProperties(leaverules, learul , "starttime");
if (!learul.insertOrUpdate()) if (!learul.insertOrUpdate())
return ResultUtil.error("操作失败"); return ResultUtil.error("操作失败");
Integer id = learul.getId(); Integer id = learul.getId();
Console.log("新增/修改--假期规则id: " + id); Console.log("新增/修改--假期规则id: " + id);
if(leaverules.getLeaveBalance() == 0) {//假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”) if(leaverules.getLeaveBalance() == 0) {//假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)
KqglAssoLeaveBalance.builder().build().delete(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getLeaveRulesId, id) KqglAssoLeaveBalance.builder().build().delete(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getLeaveRulesId, id)
.eq(KqglAssoLeaveBalance :: getOrgCode, userBean.getOrgCode())); .eq(KqglAssoLeaveBalance :: getOrgCode, userBean.getOrgCode()));
} }
List<KqglAssoRulesVice> vices = new ArrayList<KqglAssoRulesVice>(); List<KqglAssoRulesVice> vices = new ArrayList<KqglAssoRulesVice>();
String[] rest = leaverules.getRange(); String[] rest = leaverules.getRange();
if(rest.length == 0) { if(rest.length == 0) {
...@@ -635,7 +640,6 @@ public class TimeCardController { ...@@ -635,7 +640,6 @@ public class TimeCardController {
public Result<Object> BalanceHeader(@CurrentUser UserBean userBean) { public Result<Object> BalanceHeader(@CurrentUser UserBean userBean) {
List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode()) List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode())
.eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list(); .eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list();
return ResultUtil.data(balheas, "操作成功!"); return ResultUtil.data(balheas, "操作成功!");
} }
...@@ -646,10 +650,8 @@ public class TimeCardController { ...@@ -646,10 +650,8 @@ public class TimeCardController {
@ApiOperation(value = "30: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则") @ApiOperation(value = "30: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
public Result<Object> selectListLeaveRules(@CurrentUser UserBean userBean) { public Result<Object> selectListLeaveRules(@CurrentUser UserBean userBean) {
List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode()) List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode())
.eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list(); .eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list();
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>(); List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
for(KqglAssoLeaveRules rul : balheas) { for(KqglAssoLeaveRules rul : balheas) {
LeaveTypeDto lea = LeaveTypeDto.builder().build(); LeaveTypeDto lea = LeaveTypeDto.builder().build();
...@@ -667,9 +669,7 @@ public class TimeCardController { ...@@ -667,9 +669,7 @@ public class TimeCardController {
@ApiOperation(value = "31:根据组织机构代码 获取考勤组", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "31:根据组织机构代码 获取考勤组", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 31) @ApiOperationSupport(order = 31)
public Result<Object> CheckWorkatt(@CurrentUser UserBean userBean) { public Result<Object> CheckWorkatt(@CurrentUser UserBean userBean) {
List<KqglMainKqz> kqzs = KqglMainKqz.builder().build().selectList(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getQyid, userBean.getOrgCode())); List<KqglMainKqz> kqzs = KqglMainKqz.builder().build().selectList(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getQyid, userBean.getOrgCode()));
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>(); List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
for(KqglMainKqz rul : kqzs) { for(KqglMainKqz rul : kqzs) {
LeaveTypeDto lea = LeaveTypeDto.builder().build(); LeaveTypeDto lea = LeaveTypeDto.builder().build();
...@@ -677,7 +677,6 @@ public class TimeCardController { ...@@ -677,7 +677,6 @@ public class TimeCardController {
lea.setValue(rul.getName()); lea.setValue(rul.getName());
leas.add(lea); leas.add(lea);
} }
return ResultUtil.data(leas, "操作成功!"); return ResultUtil.data(leas, "操作成功!");
} }
...@@ -688,9 +687,7 @@ public class TimeCardController { ...@@ -688,9 +687,7 @@ public class TimeCardController {
@ApiOperation(value = "32:根据组织机构代码 获取加班基础设置信息", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "32:根据组织机构代码 获取加班基础设置信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 32) @ApiOperationSupport(order = 32)
public Result<Object> overtimebasicinformation(@CurrentUser UserBean userBean) { public Result<Object> overtimebasicinformation(@CurrentUser UserBean userBean) {
KqglAssoOvertimeBasics kqjdev = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, userBean.getOrgCode())); KqglAssoOvertimeBasics kqjdev = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, userBean.getOrgCode()));
return ResultUtil.data(kqjdev, "操作成功!"); return ResultUtil.data(kqjdev, "操作成功!");
} }
...@@ -701,7 +698,6 @@ public class TimeCardController { ...@@ -701,7 +698,6 @@ public class TimeCardController {
@ApiOperation(value = "33:获取假期规则数据-分页", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "33:获取假期规则数据-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 33) @ApiOperationSupport(order = 33)
public Result<Object> selectleaverules(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) { public Result<Object> selectleaverules(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoLeaveRules> page = new Page<KqglAssoLeaveRules>( IPage<KqglAssoLeaveRules> page = new Page<KqglAssoLeaveRules>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(), attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage()); attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
...@@ -709,7 +705,6 @@ public class TimeCardController { ...@@ -709,7 +705,6 @@ public class TimeCardController {
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoLeaveRules> pageAs = kqglassoleaverulesmapper.selectPage(page, new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, userBean.getOrgCode())); IPage<KqglAssoLeaveRules> pageAs = kqglassoleaverulesmapper.selectPage(page, new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, userBean.getOrgCode()));
List<KqglAssoLeaveRules> listAs = pageAs.getRecords(); List<KqglAssoLeaveRules> listAs = pageAs.getRecords();
List<KqglAssoLeaveRulesDto> leadto = new ArrayList<KqglAssoLeaveRulesDto>(); List<KqglAssoLeaveRulesDto> leadto = new ArrayList<KqglAssoLeaveRulesDto>();
for (int i = 0, n = listAs.size(); i < n; i++) { for (int i = 0, n = listAs.size(); i < n; i++) {
String[] nary = null; String[] nary = null;
...@@ -724,15 +719,11 @@ public class TimeCardController { ...@@ -724,15 +719,11 @@ public class TimeCardController {
nary[y] = kqzmc.getName(); nary[y] = kqzmc.getName();
} }
} }
KqglAssoLeaveRulesDto learul = KqglAssoLeaveRulesDto.builder().build(); KqglAssoLeaveRulesDto learul = KqglAssoLeaveRulesDto.builder().build();
learul.setApplyrange(nary); learul.setApplyrange(nary);
BeanUtil.copyProperties(listAs.get(i), learul , "range","applyrange"); BeanUtil.copyProperties(listAs.get(i), learul , "range","applyrange");
leadto.add(learul); leadto.add(learul);
} }
return ResultUtil.data(pageAs, leadto, "操作成功!"); return ResultUtil.data(pageAs, leadto, "操作成功!");
} }
...@@ -744,7 +735,6 @@ public class TimeCardController { ...@@ -744,7 +735,6 @@ public class TimeCardController {
@ApiOperation(value = "34:查询列表-我审批的/抄送我的-分页", httpMethod = "POST", notes = "查询列表-我审批的-关键字、审批状态、发起时间-分页") @ApiOperation(value = "34:查询列表-我审批的/抄送我的-分页", httpMethod = "POST", notes = "查询列表-我审批的-关键字、审批状态、发起时间-分页")
@ApiOperationSupport(order = 34) @ApiOperationSupport(order = 34)
public Result<Object> AttendanceGroup(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto){ public Result<Object> AttendanceGroup(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto){
IPage<KqglMainKqzDto> page = new Page<KqglMainKqzDto>( IPage<KqglMainKqzDto> page = new Page<KqglMainKqzDto>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(), attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage()); attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
...@@ -752,7 +742,6 @@ public class TimeCardController { ...@@ -752,7 +742,6 @@ public class TimeCardController {
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
// 缺-部门id 搜索 // 缺-部门id 搜索
IPage<KqglMainKqzDto> pageAs = kqglmainkqzmapper.selectPageByQueryKqglMain(page, attquerycriteriadto); IPage<KqglMainKqzDto> pageAs = kqglmainkqzmapper.selectPageByQueryKqglMain(page, attquerycriteriadto);
List<KqglMainKqzDto> listAs = pageAs.getRecords(); List<KqglMainKqzDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
...@@ -799,7 +788,6 @@ public class TimeCardController { ...@@ -799,7 +788,6 @@ public class TimeCardController {
public Result<Object> getEmployeeData(@CurrentUser UserBean userBean) { public Result<Object> getEmployeeData(@CurrentUser UserBean userBean) {
List<YgglMainEmp> yggl = YgglMainEmp.builder().build().selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); List<YgglMainEmp> yggl = YgglMainEmp.builder().build().selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
return ResultUtil.data(yggl); return ResultUtil.data(yggl);
} }
/** /**
...@@ -809,33 +797,23 @@ public class TimeCardController { ...@@ -809,33 +797,23 @@ public class TimeCardController {
@ApiOperation(value = "39:删除考勤组", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "39:删除考勤组", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 39) @ApiOperationSupport(order = 39)
public Result<Integer> DelAttendanceGroup(@PathVariable("id") Integer id) { public Result<Integer> DelAttendanceGroup(@PathVariable("id") Integer id) {
//删除组
if(KqglMainKqz.builder().id(id).build().deleteById()) { if(KqglMainKqz.builder().id(id).build().deleteById()) {
//删除考勤组绑定的打卡方式 //删除考勤组绑定的打卡方式
KqglAssoKqzdkfs.builder().build().delete(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, id)); KqglAssoKqzdkfs.builder().build().delete(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, id));
//删除用户和考勤组关系表 //删除用户和考勤组关系表
KqglAssoYhkqz.builder().build().delete(new QueryWrapper<KqglAssoYhkqz>().lambda().eq(KqglAssoYhkqz::getKqzid, id)); KqglAssoYhkqz.builder().build().delete(new QueryWrapper<KqglAssoYhkqz>().lambda().eq(KqglAssoYhkqz::getKqzid, id));
//删除特殊日期表 //删除特殊日期表
KqglAssoTeshu.builder().build().delete(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, id)); KqglAssoTeshu.builder().build().delete(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, id));
//删除排班明细表(自由排班) //删除排班明细表(自由排班)
KqglAssoPbmx.builder().build().delete(new QueryWrapper<KqglAssoPbmx>().lambda().eq(KqglAssoPbmx::getKqzid, id)); KqglAssoPbmx.builder().build().delete(new QueryWrapper<KqglAssoPbmx>().lambda().eq(KqglAssoPbmx::getKqzid, id));
//删除考勤周排班 //删除考勤周排班
KqglAssoZhoupaiban.builder().build().delete(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, id)); KqglAssoZhoupaiban.builder().build().delete(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, id));
return ResultUtil.data(id,"删除成功"); return ResultUtil.data(id,"删除成功");
} }
return ResultUtil.error("删除失败"); return ResultUtil.error("删除失败");
} }
/**************************/
/** /**
* 查询列表-加班补偿方式 * 查询列表-加班补偿方式
*/ */
......
...@@ -20,8 +20,8 @@ public class KqglAssoOvertimeRulesDto { ...@@ -20,8 +20,8 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班") @ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name; private String name;
@ApiModelProperty(value = "应用范围", example = "1") @ApiModelProperty(value = "应用范围", example = "(0:全公司 >0:考勤组id)")
private String appliedScope; private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1") @ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime; private Integer isWorkovertime;
......
...@@ -74,6 +74,9 @@ public class KqglMainKqzDto { ...@@ -74,6 +74,9 @@ public class KqglMainKqzDto {
@ApiModelProperty(value = "外勤 外勤", example = "101") @ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq; private Integer isWq;
@ApiModelProperty(value="加班规则 加班规则",example="101")
private Integer overtimeRulesId;
@ApiModelProperty(value = "考勤组人员数", example = "100") @ApiModelProperty(value = "考勤组人员数", example = "100")
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result column="sybc" property="sybc" /> <result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" /> <result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" /> <result column="is_wq" property="isWq" />
<result column="overtime_rules_id" property="overtimeRulesId" />
</resultMap> </resultMap>
<resultMap id="AuxiliaryMap" type="cn.timer.api.dto.kqmk.KqglMainKqzDto" > <resultMap id="AuxiliaryMap" type="cn.timer.api.dto.kqmk.KqglMainKqzDto" >
...@@ -47,6 +48,7 @@ ...@@ -47,6 +48,7 @@
<result column="sybc" property="sybc" /> <result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" /> <result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" /> <result column="is_wq" property="isWq" />
<result column="overtime_rules_id" property="overtimeRulesId" />
<result column="kqznum" property="kqznum" /> <result column="kqznum" property="kqznum" />
<result column="pbfsnm" property="pbfsnm" /> <result column="pbfsnm" property="pbfsnm" />
...@@ -74,7 +76,8 @@ ...@@ -74,7 +76,8 @@
is_wpbsdk, is_wpbsdk,
sybc, sybc,
is_xzbcdk, is_xzbcdk,
is_wq is_wq,
overtime_rules_id
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -97,7 +100,8 @@ ...@@ -97,7 +100,8 @@
is_wpbsdk KqglMainKqz_is_wpbsdk, is_wpbsdk KqglMainKqz_is_wpbsdk,
sybc KqglMainKqz_sybc, sybc KqglMainKqz_sybc,
is_xzbcdk KqglMainKqz_is_xzbcdk, is_xzbcdk KqglMainKqz_is_xzbcdk,
is_wq KqglMainKqz_is_wq is_wq KqglMainKqz_is_wq,
overtime_rules_id KqglMainKqz_overtime_rules_id
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -120,7 +124,8 @@ ...@@ -120,7 +124,8 @@
a.is_wpbsdk, a.is_wpbsdk,
a.sybc, a.sybc,
a.is_xzbcdk, a.is_xzbcdk,
a.is_wq a.is_wq,
a.overtime_rules_id
</sql> </sql>
<select id="selectAttGroupMachineByQyid" resultMap="AuxiliaryMap"> <select id="selectAttGroupMachineByQyid" resultMap="AuxiliaryMap">
...@@ -223,7 +228,10 @@ ...@@ -223,7 +228,10 @@
is_xzbcdk, is_xzbcdk,
</if> </if>
<if test ='null != isWq'> <if test ='null != isWq'>
is_wq is_wq,
</if>
<if test ='null != overtimeRulesId'>
overtime_rules_id
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -282,7 +290,10 @@ ...@@ -282,7 +290,10 @@
#{isXzbcdk}, #{isXzbcdk},
</if> </if>
<if test ='null != isWq'> <if test ='null != isWq'>
#{isWq} #{isWq},
</if>
<if test ='null != overtimeRulesId'>
#{overtimeRulesId}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -313,7 +324,8 @@ ...@@ -313,7 +324,8 @@
<if test ='null != isWpbsdk'>is_wpbsdk = #{isWpbsdk},</if> <if test ='null != isWpbsdk'>is_wpbsdk = #{isWpbsdk},</if>
<if test ='null != sybc'>sybc = #{sybc},</if> <if test ='null != sybc'>sybc = #{sybc},</if>
<if test ='null != isXzbcdk'>is_xzbcdk = #{isXzbcdk},</if> <if test ='null != isXzbcdk'>is_xzbcdk = #{isXzbcdk},</if>
<if test ='null != isWq'>is_wq = #{isWq}</if> <if test ='null != isWq'>is_wq = #{isWq},</if>
<if test ='null != overtimeRulesId'>overtime_rules_id = #{overtimeRulesId}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
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