Commit 59741ed8 by lal

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal

parents 2f126484 2d85a204
...@@ -139,7 +139,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -139,7 +139,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",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")
......
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -29,6 +30,7 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -29,6 +30,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.aspect.lang.annotation.Log; import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.annotation.Role; import cn.timer.api.aspect.lang.annotation.Role;
...@@ -46,6 +48,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting; ...@@ -46,6 +48,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.jxgl.JxglPerformanceAppraisal; import cn.timer.api.bean.jxgl.JxglPerformanceAppraisal;
import cn.timer.api.bean.jxgl.JxglPerformanceRating; import cn.timer.api.bean.jxgl.JxglPerformanceRating;
import cn.timer.api.bean.jxgl.JxglProcessNode; import cn.timer.api.bean.jxgl.JxglProcessNode;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.spmk.SpmkApproveSummary; 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.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
...@@ -61,6 +64,7 @@ import cn.timer.api.config.enuminterface.JxglEnumInterface.IndicatorsType; ...@@ -61,6 +64,7 @@ import cn.timer.api.config.enuminterface.JxglEnumInterface.IndicatorsType;
import cn.timer.api.config.enuminterface.JxglEnumInterface.PerformanceAppraisalSts; import cn.timer.api.config.enuminterface.JxglEnumInterface.PerformanceAppraisalSts;
import cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessNodeSts; import cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessNodeSts;
import cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessType; import cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessType;
import cn.timer.api.config.enums.SysRoleType;
import cn.timer.api.config.exception.CustomException; import cn.timer.api.config.exception.CustomException;
import cn.timer.api.config.validation.ValidList; import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.jxgl.service.JxglService; import cn.timer.api.controller.jxgl.service.JxglService;
...@@ -79,6 +83,7 @@ import cn.timer.api.dao.jxgl.JxglBasicSettingMapper; ...@@ -79,6 +83,7 @@ import cn.timer.api.dao.jxgl.JxglBasicSettingMapper;
import cn.timer.api.dao.jxgl.JxglPerformanceAppraisalMapper; import cn.timer.api.dao.jxgl.JxglPerformanceAppraisalMapper;
import cn.timer.api.dao.jxgl.JxglPerformanceRatingMapper; import cn.timer.api.dao.jxgl.JxglPerformanceRatingMapper;
import cn.timer.api.dao.jxgl.JxglProcessNodeMapper; import cn.timer.api.dao.jxgl.JxglProcessNodeMapper;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper; 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.dto.jxgl.AppraisalAssessment; import cn.timer.api.dto.jxgl.AppraisalAssessment;
...@@ -157,6 +162,9 @@ public class JxglController { ...@@ -157,6 +162,9 @@ public class JxglController {
@Autowired @Autowired
private JxglAppraisalItemMapper jxglAppraisalItemMapper; private JxglAppraisalItemMapper jxglAppraisalItemMapper;
@Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
// TODO 基础设置 // TODO 基础设置
/** /**
...@@ -454,8 +462,26 @@ public class JxglController { ...@@ -454,8 +462,26 @@ public class JxglController {
if (ExecuteType.BEING_APPRAISAL_PERSON.getType().equals(executeType)) { if (ExecuteType.BEING_APPRAISAL_PERSON.getType().equals(executeType)) {
processNode.setExecutorId(bAP); processNode.setExecutorId(bAP);
} else if (ExecuteType.LEADER.getType().equals(executeType)) { } else if (ExecuteType.LEADER.getType().equals(executeType)) {
processNode.setExecutorId(
ygglService.selectLeaderEmpNumById(userBean.getOrgCode(), bAP, pN.getLeaderTier())); Integer leaderId = ygglService.selectLeaderEmpNumById(userBean.getOrgCode(), bAP, pN.getLeaderTier());
Console.log("bAP:"+bAP);
Console.log("leaderTier:"+pN.getLeaderTier());
Console.log("leaderId:"+leaderId);
if (leaderId == null) {
QyzxEmpEntAsso eEA = qyzxEmpEntAssoMapper.selectOne(new QueryWrapper<QyzxEmpEntAsso>().lambda()
.select(QyzxEmpEntAsso::getEmpNum)
.eq(QyzxEmpEntAsso::getOrgCode, orgCode)
.eq(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN.getType()));
leaderId = eEA != null ? eEA.getEmpNum() : null;
// 当 该企业无管理员时 报错
if (leaderId == null) {
throw new CustomException("该企业不存在管理员,请联系客服");
}
}
processNode.setExecutorId(leaderId);
} else if (ExecuteType.SPECIFIED_MEMBER.getType().equals(executeType)) { } else if (ExecuteType.SPECIFIED_MEMBER.getType().equals(executeType)) {
processNode.setExecutorId(pN.getExecutorId()); processNode.setExecutorId(pN.getExecutorId());
} }
...@@ -502,8 +528,10 @@ public class JxglController { ...@@ -502,8 +528,10 @@ public class JxglController {
}); });
YgglMainEmp yME = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda() // YgglMainEmp yME = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.select(YgglMainEmp::getName).eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, bAP)); // .select(YgglMainEmp::getName)
// .eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, bAP));
appraisalLog.setAppraisalId(appraisal.getId()); appraisalLog.setAppraisalId(appraisal.getId());
appraisalLog.setExecutorId(bAP); appraisalLog.setExecutorId(bAP);
......
...@@ -596,6 +596,9 @@ public class SpmkController { ...@@ -596,6 +596,9 @@ public class SpmkController {
return ResultUtil.data(adD); return ResultUtil.data(adD);
} }
@Autowired
private SpmkAssoBusinessFactory spmkAssoBusinessFactory;
//TODO 审批人审批 //TODO 审批人审批
/** /**
* 审批人审批 * 审批人审批
...@@ -669,11 +672,16 @@ public class SpmkController { ...@@ -669,11 +672,16 @@ public class SpmkController {
JSONObject jSONObject = ObjectUtil.deserialize(ad.getRequestData()); JSONObject jSONObject = ObjectUtil.deserialize(ad.getRequestData());
jSONObject.set("approveId", FromData.builder().value(String.valueOf(asId))); jSONObject.set("approveId", FromData.builder().value(String.valueOf(asId)));
jSONObject.set("orgCode", userBean.getOrgCode());
System.out.println("1----------"+ aSummary.getAssoType());
System.out.println("2----------"+ ApproveEnum.getEnums(aSummary.getAssoType()));
//审批完成后 业务 //审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.getFactory().createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType())); SpmkAssoBusiness sab = spmkAssoBusinessFactory.createSpmkService(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null) if (sab != null)
System.out.println("3----------"+ sab);
sab.handleApprove(jSONObject); sab.handleApprove(jSONObject);
System.out.println("4----------"+ aSummary.getAssoType());
} }
} }
......
...@@ -1256,6 +1256,11 @@ public class YgglController { ...@@ -1256,6 +1256,11 @@ public class YgglController {
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda() YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum) .eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) {
return ResultUtil.success("你已在离职中");
}
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts"); BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
......
...@@ -13,4 +13,6 @@ public interface YgglService { ...@@ -13,4 +13,6 @@ public interface YgglService {
* 根据 员工ID 和 主管层级 查询 主管 * 根据 员工ID 和 主管层级 查询 主管
*/ */
Integer selectLeaderEmpNumById(Integer orgCode, Integer id, Integer leave); Integer selectLeaderEmpNumById(Integer orgCode, Integer id, Integer leave);
} }
...@@ -56,11 +56,14 @@ public class YgglServiceImpl implements YgglService { ...@@ -56,11 +56,14 @@ public class YgglServiceImpl implements YgglService {
public void applicationRegularization(YgzzDto ygzzDto) { public void applicationRegularization(YgzzDto ygzzDto) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
YgglMainEmp.builder() YgglMainEmp.builder()
.jobStatus(2) .jobStatus(1)
.zzTime(ygzzDto.getZzTime()) .zzTime(ygzzDto.getZzTime())
.sjzzTime(new Date()) .sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark()) .zzRemark(ygzzDto.getZzRemark())
.build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum())); .build().update(new UpdateWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum())
.eq(YgglMainEmp::getOrgCode, ygzzDto.getOrgCode())
);
} }
@Override @Override
...@@ -68,7 +71,8 @@ public class YgglServiceImpl implements YgglService { ...@@ -68,7 +71,8 @@ public class YgglServiceImpl implements YgglService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
YgglMainEmp mainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda() YgglMainEmp mainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.select(YgglMainEmp::getBmgwId) .select(YgglMainEmp::getBmgwId)
.eq(YgglMainEmp::getEmpNum, id)); .eq(YgglMainEmp::getEmpNum, id)
.eq(YgglMainEmp::getOrgCode, orgCode));
Integer gWId = mainEmp != null ? mainEmp.getBmgwId() : null; Integer gWId = mainEmp != null ? mainEmp.getBmgwId() : null;
// 企业所有部门岗位 // 企业所有部门岗位
...@@ -85,13 +89,13 @@ public class YgglServiceImpl implements YgglService { ...@@ -85,13 +89,13 @@ public class YgglServiceImpl implements YgglService {
// List<ZzglBmgwM> listbM = ListUtil.toList(); // List<ZzglBmgwM> listbM = ListUtil.toList();
// 指定 主管id // 指定 主管id
Integer leaderId = null; Integer leaderId = null;
Integer bmgwLeaderId;
for (int i = 0,n = leave; i < n; i++) { for (int i = 0,n = leave + 1; i < n; i++) {
ZzglBmgwM bmgwM = getLeaderEmp(listBM, baseBmgwId); ZzglBmgwM bmgwM = getLeaderEmp(listBM, baseBmgwId);
baseBmgwId = bmgwM != null ? bmgwM.getId() : null; bmgwLeaderId = bmgwM != null ? bmgwM.getLeader() : null;
if (i == n-1) { if (i == n-1) {
// listbM.add(bmgwM); // listbM.add(bmgwM);
leaderId = baseBmgwId; leaderId = bmgwLeaderId;
} }
} }
......
...@@ -19,6 +19,9 @@ public class YgzzDto implements Serializable{ ...@@ -19,6 +19,9 @@ public class YgzzDto implements Serializable{
@ApiModelProperty(value="工号",example="9527") @ApiModelProperty(value="工号",example="9527")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="企业id",example="12")
private Integer orgCode;
@ApiModelProperty(value="应转正时间",example="1999-12-03") @ApiModelProperty(value="应转正时间",example="1999-12-03")
private Date zzTime; private Date zzTime;
......
...@@ -109,7 +109,7 @@ public class DateFormatUtils { ...@@ -109,7 +109,7 @@ public class DateFormatUtils {
public static Date getDateByString(String date) throws ParseException { public static Date getDateByString(String date) throws ParseException {
if (date == null) { if (date == null || "".equals(date)) {
return null; return null;
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -18,7 +19,7 @@ import lombok.Builder; ...@@ -18,7 +19,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class EvectionBusiness extends SpmkAssoBusiness { public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -55,7 +56,9 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -55,7 +56,9 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("出差:" + eaD);
// 调 考勤管理 业务-出差 // 调 考勤管理 业务-出差
kqglService.attevectionapproval(eaD); kqglService.attevectionapproval(eaD);
} }
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -16,7 +17,7 @@ import lombok.Builder; ...@@ -16,7 +17,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class GoOutBusiness extends SpmkAssoBusiness { public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -54,6 +55,7 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -54,6 +55,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("外出:" + eaD);
// 调 考勤管理 业务-外出 // 调 考勤管理 业务-外出
kqglService.attevectionapproval(eaD); kqglService.attevectionapproval(eaD);
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -20,7 +21,7 @@ import lombok.Builder; ...@@ -20,7 +21,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class LeaveBusiness extends SpmkAssoBusiness { public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -61,6 +62,7 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -61,6 +62,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
System.out.println("请假:" + laD);
// 调 考勤管理 业务-请假 // 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD); kqglService.attleaveapproval(laD);
} }
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.stereotype.Service;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -11,7 +13,7 @@ import lombok.Builder; ...@@ -11,7 +13,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class RecruitBusiness extends SpmkAssoBusiness { public class RecruitBusiness extends SpmkAssoBusiness {
@Override @Override
......
...@@ -3,9 +3,11 @@ package cn.timer.api.utils.router.business; ...@@ -3,9 +3,11 @@ package cn.timer.api.utils.router.business;
import java.util.Date; import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
...@@ -20,7 +22,7 @@ import lombok.Builder; ...@@ -20,7 +22,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class RegularizationBusiness extends SpmkAssoBusiness { public class RegularizationBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -48,6 +50,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -48,6 +50,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
// 发起人id // 发起人id
Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue()); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 企业id
Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 计划转正时间 // 计划转正时间
String confirmationTime = ObjectUtil.isNull(jsonObj.get("confirmationTime",FromData.class)) ? null : jsonObj.get("confirmationTime",FromData.class).getValue(); String confirmationTime = ObjectUtil.isNull(jsonObj.get("confirmationTime",FromData.class)) ? null : jsonObj.get("confirmationTime",FromData.class).getValue();
// 实际转正时间 // 实际转正时间
...@@ -57,19 +61,20 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -57,19 +61,20 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
YgzzDto ygzzDto = YgzzDto.builder() YgzzDto ygzzDto = YgzzDto.builder()
.empNum(id) .empNum(id)
.orgCode(orgCode)
.zzTime(DateFormatUtils.getDateByString(confirmationTime)) .zzTime(DateFormatUtils.getDateByString(confirmationTime))
.sjzzTime(DateFormatUtils.getDateByString(newConfirmationTime)) .sjzzTime(DateFormatUtils.getDateByString(newConfirmationTime))
.zzRemark(Remarks) .zzRemark(Remarks)
.build(); .build();
System.out.println("转正:"+ygzzDto);
// 调 员工管理 业务 // 调 员工管理 业务
YgglMainEmp.builder() // YgglMainEmp.builder()
.jobStatus(2) // .jobStatus(2)
.zzTime(ygzzDto.getZzTime()) // .zzTime(ygzzDto.getZzTime())
.sjzzTime(new Date()) // .sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark()) // .zzRemark(ygzzDto.getZzRemark())
.build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum())); // .build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()));
// ygglService.applicationRegularization(ygzzDto); ygglService.applicationRegularization(ygzzDto);
} }
} }
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -18,7 +19,7 @@ import lombok.Builder; ...@@ -18,7 +19,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class ReissueACardBusiness extends SpmkAssoBusiness { public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -54,6 +55,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -54,6 +55,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.cardreplperiod(Convert.toInt(cardreplperiod)) .cardreplperiod(Convert.toInt(cardreplperiod))
.build(); .build();
System.out.println("补卡:"+raD);
// 调 考勤管理 业务-补卡 // 调 考勤管理 业务-补卡
kqglService.attrepairapproval(raD); kqglService.attrepairapproval(raD);
} }
......
...@@ -2,7 +2,10 @@ package cn.timer.api.utils.router.business; ...@@ -2,7 +2,10 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;import cn.hutool.core.date.DateUtil; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService; import cn.timer.api.controller.yggl.service.YgglService;
...@@ -16,7 +19,7 @@ import lombok.Builder; ...@@ -16,7 +19,7 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class ResignationBusiness extends SpmkAssoBusiness { public class ResignationBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -41,15 +44,16 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -41,15 +44,16 @@ public class ResignationBusiness extends SpmkAssoBusiness {
// 备注 // 备注
String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue(); String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
LzygQueryDto dto = LzygQueryDto.builder() LzygQueryDto dtO = LzygQueryDto.builder()
.orgCode(orgCode) .orgCode(orgCode)
.empNum(id) .empNum(id)
.lzTime(DateFormatUtils.getDateByString(terminationDate)) .lzTime(DateFormatUtils.getDateByString(terminationDate))
.lzyy(ReasonForResignation) .lzyy(ReasonForResignation)
.lzbz(Remarks) .lzbz(Remarks)
.build(); .build();
System.out.println("离职:"+dtO);
// 调 员工管理 业务 // 调 员工管理 业务
ygglService.applicationResignation(dto); ygglService.applicationResignation(dtO);
} }
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import cn.timer.api.utils.router.enums.ApproveEnum; import cn.timer.api.utils.router.enums.ApproveEnum;
/** /**
* 审批关联业务工厂类 * 审批关联业务工厂类
*
* @author Tang * @author Tang
* *
*/ */
public class SpmkAssoBusinessFactory { public class SpmkAssoBusinessFactory {
static SpmkAssoBusinessFactory factory;
public static SpmkAssoBusinessFactory getFactory() {
return factory == null ? new SpmkAssoBusinessFactory() : factory;
}
public SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) { /*
SpmkAssoBusiness sat = null; * Map中的Value是 ServiceBean
*/
private Map<String, SpmkAssoBusiness> serviceMap;
public SpmkAssoBusiness createSpmkService(ApproveEnum assotype) {
switch (assotype) { switch (assotype) {
case DEFAULT: case DEFAULT:
break; break;
case REGULARIZATION: case REGULARIZATION:
sat = RegularizationBusiness.builder().build(); return serviceMap.get("regularizationBusiness");
break;
case RESIGNATION: case RESIGNATION:
sat = ResignationBusiness.builder().build(); return serviceMap.get("resignationBusiness");
break;
case TRANSFER_POSITION: case TRANSFER_POSITION:
sat = TransferPositionBusiness.builder().build(); return serviceMap.get("transferPositionBusiness");
break;
case RECRUIT: case RECRUIT:
sat = RecruitBusiness.builder().build(); return serviceMap.get("recruitBusiness");
break;
case WORK_OVERTIME: case WORK_OVERTIME:
sat = WorkOvertimeBusiness.builder().build(); return serviceMap.get("workOvertimeBusiness");
break;
case LEAVE: case LEAVE:
sat = LeaveBusiness.builder().build(); return serviceMap.get("leaveBusiness");
break;
case EVECTION: case EVECTION:
sat = EvectionBusiness.builder().build(); return serviceMap.get("evectionBusiness");
break;
case GO_OUT: case GO_OUT:
sat = GoOutBusiness.builder().build(); return serviceMap.get("goOutBusiness");
break;
case REISSUE_A_CARD: case REISSUE_A_CARD:
sat = ReissueACardBusiness.builder().build(); return serviceMap.get("reissueACardBusiness");
break;
default: default:
break; break;
} }
return sat; return serviceMap.get("regularizationBusiness");
}
public void setServiceMap(Map<String, SpmkAssoBusiness> serviceMap) {
this.serviceMap = serviceMap;
} }
} }
package cn.timer.api.utils.router.business;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SpmkConfig {
@Autowired
private RegularizationBusiness regularizationBusiness;
@Autowired
private TransferPositionBusiness transferPositionBusiness;
@Autowired
private ResignationBusiness resignationBusiness;
@Autowired
private RecruitBusiness recruitBusiness;
@Autowired
private WorkOvertimeBusiness workOvertimeBusiness;
@Autowired
private LeaveBusiness leaveBusiness;
@Autowired
private EvectionBusiness evectionBusiness;
@Autowired
private GoOutBusiness goOutBusiness;
@Autowired
private ReissueACardBusiness reissueACardBusiness;
@Bean
public SpmkAssoBusinessFactory createFactory () {
SpmkAssoBusinessFactory factory = new SpmkAssoBusinessFactory();
Map<String, SpmkAssoBusiness> serviceMap = new HashMap<>();
serviceMap.put("regularizationBusiness",regularizationBusiness);
serviceMap.put("transferPositionBusiness",transferPositionBusiness);
serviceMap.put("resignationBusiness",resignationBusiness);
serviceMap.put("recruitBusiness",recruitBusiness);
serviceMap.put("workOvertimeBusiness",workOvertimeBusiness);
serviceMap.put("leaveBusiness",leaveBusiness);
serviceMap.put("evectionBusiness",evectionBusiness);
serviceMap.put("goOutBusiness",goOutBusiness);
serviceMap.put("reissueACardBusiness",reissueACardBusiness);
factory.setServiceMap(serviceMap);
return factory;
}
}
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
...@@ -14,7 +15,8 @@ import lombok.Builder; ...@@ -14,7 +15,8 @@ import lombok.Builder;
* @author Tang * @author Tang
* *
*/ */
@Builder
@Service
public class TransferPositionBusiness extends SpmkAssoBusiness { public class TransferPositionBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -50,6 +52,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -50,6 +52,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
.isdg(1) .isdg(1)
.build(); .build();
System.out.println("调岗:"+upEmpDeptDto);
// 调 员工管理 业务 // 调 员工管理 业务
zzglBmgwMService.applicationTransferPosition(id, orgCode, upEmpDeptDto); zzglBmgwMService.applicationTransferPosition(id, orgCode, upEmpDeptDto);
} }
......
...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business; ...@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException; import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -11,14 +12,13 @@ import cn.timer.api.controller.kqgl.service.KqglService; ...@@ -11,14 +12,13 @@ import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttOvertimeApprovalDto; import cn.timer.api.dto.kqmk.AttOvertimeApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil; import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/** /**
* 加班-业务 * 加班-业务
* @author Tang * @author Tang
* *
*/ */
@Builder @Service
public class WorkOvertimeBusiness extends SpmkAssoBusiness { public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired @Autowired
...@@ -61,7 +61,8 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -61,7 +61,8 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.duration(Convert.toDouble(timeLong)) .duration(Convert.toDouble(timeLong))
.compensate(Convert.toInt(compensate)) .compensate(Convert.toInt(compensate))
.build(); .build();
System.out.println("加班:"+oaD);
// 调 考勤管理 业务-加班 // 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD); kqglService.attovertimeapproval(oaD);
......
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