Commit 5377e2bb by 邓实川

冲突解决

parents 3b3ec5de 5ad449c7
...@@ -289,7 +289,7 @@ public class AttController { ...@@ -289,7 +289,7 @@ public class AttController {
* 查询列表-考勤组-分页【新】 * 查询列表-考勤组-分页【新】
*/ */
@PostMapping(value = "/attendance_group") @PostMapping(value = "/attendance_group")
@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>(
......
...@@ -155,7 +155,7 @@ public class TimeCardController { ...@@ -155,7 +155,7 @@ 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, new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getQyid, userBean.getOrgCode())); IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getQyid, userBean.getOrgCode()).orderByDesc(KqglAssoBcsz::getId));
List<KqglAssoBcsz> listAs = pageAs.getRecords(); List<KqglAssoBcsz> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
...@@ -731,7 +731,7 @@ public class TimeCardController { ...@@ -731,7 +731,7 @@ public class TimeCardController {
attquerycriteriadto.setOrgCode(userBean.getOrgCode()); attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoDkdz> pageAs = kqglassodkdzmapper.selectPage(page, new QueryWrapper<KqglAssoDkdz>().lambda().eq(KqglAssoDkdz::getQyid, userBean.getOrgCode())); IPage<KqglAssoDkdz> pageAs = kqglassodkdzmapper.selectPage(page, new QueryWrapper<KqglAssoDkdz>().lambda().eq(KqglAssoDkdz::getQyid, userBean.getOrgCode()).orderByDesc(KqglAssoDkdz::getId));
List<KqglAssoDkdz> listAs = pageAs.getRecords(); List<KqglAssoDkdz> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
...@@ -789,7 +789,7 @@ public class TimeCardController { ...@@ -789,7 +789,7 @@ public class TimeCardController {
attquerycriteriadto.setOrgCode(userBean.getOrgCode()); attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoDkwx> pageAs = kqglassodkwxmapper.selectPage(page, new QueryWrapper<KqglAssoDkwx>().lambda().eq(KqglAssoDkwx::getQyid, userBean.getOrgCode())); IPage<KqglAssoDkwx> pageAs = kqglassodkwxmapper.selectPage(page, new QueryWrapper<KqglAssoDkwx>().lambda().eq(KqglAssoDkwx::getQyid, userBean.getOrgCode()).orderByDesc(KqglAssoDkwx::getId));
List<KqglAssoDkwx> listAs = pageAs.getRecords(); List<KqglAssoDkwx> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
...@@ -1007,7 +1007,7 @@ public class TimeCardController { ...@@ -1007,7 +1007,7 @@ public class TimeCardController {
@ApiOperation(value = "38:获取员工数据-根据 组织机构代码", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "38:获取员工数据-根据 组织机构代码", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 38) @ApiOperationSupport(order = 38)
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()).eq(YgglMainEmp::getJobStatus, "1")); List<YgglMainEmp> yggl = YgglMainEmp.builder().build().selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).ne(YgglMainEmp::getJobStatus, "3"));
return ResultUtil.data(yggl); return ResultUtil.data(yggl);
} }
......
...@@ -442,7 +442,7 @@ public class AttendanceTaskTiming{ ...@@ -442,7 +442,7 @@ public class AttendanceTaskTiming{
//排查请假是否在最后一次打卡范围内 查询当月的请假所有日期 //排查请假是否在最后一次打卡范围内 查询当月的请假所有日期
List<KqglAssoRelationSummary> leainv = kqglassorelationsummarymapper.LeaveInvestigation(user.getEmpnum(), 2, ttstr); List<KqglAssoRelationSummary> leainv = kqglassorelationsummarymapper.LeaveInvestigation(user.getEmpnum(), 2, ttstr);
KqglAssoBcsz shif = KqglAssoBcsz.builder().build(); // KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
String beginTime = sdf1.format(new Date()); String beginTime = sdf1.format(new Date());
// List<String> rowData = new ArrayList<String>(); // List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合 //遍历目前为止所有日期 结合该用户发起的审批进行结合
...@@ -543,6 +543,8 @@ public class AttendanceTaskTiming{ ...@@ -543,6 +543,8 @@ public class AttendanceTaskTiming{
} }
} }
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attgro.getPbfs() == 1){ if(attgro.getPbfs() == 1){
int several = Integer.valueOf(ClockInTool.dateToWeek(num));// int several = Integer.valueOf(ClockInTool.dateToWeek(num));//
KqglAssoTeshu tesu = KqglAssoTeshu.builder().build().selectOne(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId()).eq(KqglAssoTeshu::getTsrq, num)); KqglAssoTeshu tesu = KqglAssoTeshu.builder().build().selectOne(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId()).eq(KqglAssoTeshu::getTsrq, num));
...@@ -563,6 +565,7 @@ public class AttendanceTaskTiming{ ...@@ -563,6 +565,7 @@ public class AttendanceTaskTiming{
KqglAssoZhoupaiban gudingpb = KqglAssoZhoupaiban.builder().build().selectOne(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, attgro.getId()) KqglAssoZhoupaiban gudingpb = KqglAssoZhoupaiban.builder().build().selectOne(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, attgro.getId())
.eq(KqglAssoZhoupaiban::getType, several)); .eq(KqglAssoZhoupaiban::getType, several));
if(gudingpb != null) { if(gudingpb != null) {
shif = KqglAssoBcsz.builder().build();
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, gudingpb.getBcid())); shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, gudingpb.getBcid()));
} }
}else if(attgro.getPbfs() == 2){ }else if(attgro.getPbfs() == 2){
......
...@@ -36,7 +36,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -36,7 +36,7 @@ public class KqglServiceImpl implements KqglService {
public boolean attleaveapproval(AttLeaveApprovalDto leaveappr) { public boolean attleaveapproval(AttLeaveApprovalDto leaveappr) {
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(leaveappr.getStarttime()); String startdate = new SimpleDateFormat("yyyy-MM-dd").format(leaveappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(leaveappr.getEndtime()); String enddate = new SimpleDateFormat("yyyy-MM-dd").format(leaveappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(";"); String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
for(String num : days) { for(String num : days) {
//记入打卡月汇总关联表 //记入打卡月汇总关联表
KqglAssoRelationSummary.builder().userId(leaveappr.getUserid()).appTime(num).approvalId(leaveappr.getLeaveid()).approvalType(2).duration(leaveappr.getDuration()) KqglAssoRelationSummary.builder().userId(leaveappr.getUserid()).appTime(num).approvalId(leaveappr.getLeaveid()).approvalType(2).duration(leaveappr.getDuration())
...@@ -46,7 +46,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -46,7 +46,7 @@ public class KqglServiceImpl implements KqglService {
YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, leaveappr.getUserid())); YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, leaveappr.getUserid()));
int modifynumber = 1; int modifynumber = 1;
KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, leaveappr.getUserid()) KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, leaveappr.getUserid()).eq(KqglAssoLeaveBalance::getOrgCode, leaveappr.getOrgcode())
.orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1")); .orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1"));
if(balan != null) { if(balan != null) {
modifynumber = balan.getModifyNumber()+1; modifynumber = balan.getModifyNumber()+1;
...@@ -63,7 +63,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -63,7 +63,7 @@ public class KqglServiceImpl implements KqglService {
public boolean attovertimeapproval(AttOvertimeApprovalDto overappr) { public boolean attovertimeapproval(AttOvertimeApprovalDto overappr) {
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getStarttime()); String startdate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getEndtime()); String enddate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(";"); String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
for(String num : days) { for(String num : days) {
//记入打卡月汇总关联表 //记入打卡月汇总关联表
...@@ -72,7 +72,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -72,7 +72,7 @@ public class KqglServiceImpl implements KqglService {
.endTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getEndtime())).build().insert(); .endTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getEndtime())).build().insert();
} }
YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, overappr.getUserid())); YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, overappr.getUserid()).eq(YgglMainEmp::getOrgCode, overappr.getOrgcode()));
//查询当前公司调休的id //查询当前公司调休的id
KqglAssoLeaveRules learul = KqglAssoLeaveRules.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, emp.getOrgCode()).eq(KqglAssoLeaveRules::getRulesType, 2)); KqglAssoLeaveRules learul = KqglAssoLeaveRules.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, emp.getOrgCode()).eq(KqglAssoLeaveRules::getRulesType, 2));
...@@ -80,7 +80,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -80,7 +80,7 @@ public class KqglServiceImpl implements KqglService {
if(overappr.getCompensate() == 1) { if(overappr.getCompensate() == 1) {
int modifynumber = 1; int modifynumber = 1;
KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, overappr.getUserid()) KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, overappr.getUserid()).eq(KqglAssoLeaveBalance::getOrgCode, overappr.getOrgcode())
.orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1")); .orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1"));
if(balan != null) { if(balan != null) {
modifynumber = balan.getModifyNumber()+1; modifynumber = balan.getModifyNumber()+1;
...@@ -101,7 +101,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -101,7 +101,7 @@ public class KqglServiceImpl implements KqglService {
if(evecappr.getEvectiontype() == 1) { //出差 if(evecappr.getEvectiontype() == 1) { //出差
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getStarttime()); String startdate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getEndtime()); String enddate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(";"); String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
for(String num : days) { for(String num : days) {
//记入打卡月汇总关联表 //记入打卡月汇总关联表
KqglAssoRelationSummary.builder().userId(evecappr.getUserid()).appTime(num).approvalId(evecappr.getEvectionid()).approvalType(3) KqglAssoRelationSummary.builder().userId(evecappr.getUserid()).appTime(num).approvalId(evecappr.getEvectionid()).approvalType(3)
...@@ -110,7 +110,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -110,7 +110,7 @@ public class KqglServiceImpl implements KqglService {
}else { //外出 }else { //外出
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getStarttime()); String startdate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getEndtime()); String enddate = new SimpleDateFormat("yyyy-MM-dd").format(evecappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(";"); String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
for(String num : days) { for(String num : days) {
//记入打卡月汇总关联表 //记入打卡月汇总关联表
KqglAssoRelationSummary.builder().userId(evecappr.getUserid()).appTime(num).approvalId(evecappr.getEvectionid()).approvalType(4) KqglAssoRelationSummary.builder().userId(evecappr.getUserid()).appTime(num).approvalId(evecappr.getEvectionid()).approvalType(4)
......
...@@ -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 审批人审批
/** /**
* 审批人审批 * 审批人审批
...@@ -668,11 +671,17 @@ public class SpmkController { ...@@ -668,11 +671,17 @@ public class SpmkController {
SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById(); SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
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)).build());
jSONObject.set("orgCode", userBean.getOrgCode());
System.out.println("0----------"+ FromData.builder().value(String.valueOf(asId)));
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);
System.out.println("4----------"+ jSONObject);
sab.handleApprove(jSONObject); sab.handleApprove(jSONObject);
} }
} }
......
...@@ -454,7 +454,12 @@ public class YgglController { ...@@ -454,7 +454,12 @@ public class YgglController {
break; break;
case 1: case 1:
String[] strs = IdcardUtil.isValidCard10(zjNum); String[] strs = IdcardUtil.isValidCard10(zjNum);
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(strs[2]); if (strs == null) {
isvalid = false;
break;
}
String str2 = strs != null && strs.length > 2 ? strs[2] : "false";
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(str2);
break; break;
case 2: case 2:
isvalid = IdcardUtil.isValidTWCard(zjNum); isvalid = IdcardUtil.isValidTWCard(zjNum);
......
...@@ -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);
} }
...@@ -16,10 +16,12 @@ import cn.timer.api.bean.yggl.YgglMainEmp; ...@@ -16,10 +16,12 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.yggl.YgglMainLzb; import cn.timer.api.bean.yggl.YgglMainLzb;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.enuminterface.YgEnumInterface; import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.enuminterface.YgEnumInterface.jobStatus;
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.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgzzDto; import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.ResultUtil;
@Service @Service
public class YgglServiceImpl implements YgglService { public class YgglServiceImpl implements YgglService {
...@@ -33,34 +35,50 @@ public class YgglServiceImpl implements YgglService { ...@@ -33,34 +35,50 @@ public class YgglServiceImpl implements YgglService {
@Override @Override
public void applicationResignation(LzygQueryDto lzygQueryDto) { public void applicationResignation(LzygQueryDto lzygQueryDto) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
Integer empNum = lzygQueryDto.getEmpNum(); Integer empNum = lzygQueryDto.getEmpNum();
Integer orgCode = lzygQueryDto.getOrgCode();
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, orgCode));
// if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) {
// return ResultUtil.success("你已在离职中");
// }
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>();
queryWrapper.eq("emp_num", empNum).eq("org_code", lzygQueryDto.getOrgCode());
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb); BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
ygglMainLzb.insert(); ygglMainLzb.insert();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(jobStatus.LIZHIZHONG.getType())
updateWrapper.eq("emp_num", empNum); .beforeLeavingSts(ygglMainEmp.getJobStatus()).build()
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>(); .update(new UpdateWrapper<YgglMainEmp>().lambda()
updateWrapper1.eq("emp_num", empNum); .eq(YgglMainEmp::getEmpNum, empNum)
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()).build().update(updateWrapper); .eq(YgglMainEmp::getOrgCode, orgCode));
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1); YgglMainLzb.builder()
.jobStatus(jobStatus.LIZHIZHONG.getType())
.lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build()
.update(new UpdateWrapper<YgglMainLzb>().lambda()
.eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, orgCode));
} }
@Override @Override
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 +86,8 @@ public class YgglServiceImpl implements YgglService { ...@@ -68,7 +86,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 +104,13 @@ public class YgglServiceImpl implements YgglService { ...@@ -85,13 +104,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;
} }
} }
......
...@@ -20,6 +20,9 @@ public class AttEvectionApprovalDto { ...@@ -20,6 +20,9 @@ public class AttEvectionApprovalDto {
@ApiModelProperty(value = "用户id", example = "") @ApiModelProperty(value = "用户id", example = "")
private int userid; private int userid;
@ApiModelProperty(value = "公司id", example = "")
private int orgcode;
@ApiModelProperty(value = "开始时间", example = "时间戳") @ApiModelProperty(value = "开始时间", example = "时间戳")
private long starttime; private long starttime;
......
...@@ -20,6 +20,9 @@ public class AttLeaveApprovalDto { ...@@ -20,6 +20,9 @@ public class AttLeaveApprovalDto {
@ApiModelProperty(value = "用户id", example = "") @ApiModelProperty(value = "用户id", example = "")
private int userid; private int userid;
@ApiModelProperty(value = "公司id", example = "")
private int orgcode;
@ApiModelProperty(value = "请假类型", example = "具体传ID") @ApiModelProperty(value = "请假类型", example = "具体传ID")
private int leavetype; private int leavetype;
......
...@@ -21,6 +21,9 @@ public class AttOvertimeApprovalDto { ...@@ -21,6 +21,9 @@ public class AttOvertimeApprovalDto {
@ApiModelProperty(value = "用户id", example = "") @ApiModelProperty(value = "用户id", example = "")
private int userid; private int userid;
@ApiModelProperty(value = "公司id", example = "")
private int orgcode;
@ApiModelProperty(value = "加班类型", example = "具体传ID") @ApiModelProperty(value = "加班类型", example = "具体传ID")
private int overtimetype; private int overtimetype;
......
...@@ -20,6 +20,9 @@ public class AttRepairApprovalDto { ...@@ -20,6 +20,9 @@ public class AttRepairApprovalDto {
@ApiModelProperty(value = "用户id", example = "") @ApiModelProperty(value = "用户id", example = "")
private int userid; private int userid;
@ApiModelProperty(value = "公司id", example = "")
private int orgcode;
@ApiModelProperty(value = "补卡时间", example = "时间戳") @ApiModelProperty(value = "补卡时间", example = "时间戳")
private long cardrepltime; private long cardrepltime;
......
...@@ -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;
} }
......
...@@ -31,9 +31,9 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -31,9 +31,9 @@ public class EvectionBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
...@@ -52,13 +52,17 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -52,13 +52,17 @@ public class EvectionBusiness extends SpmkAssoBusiness {
System.out.println(approveId); System.out.println(approveId);
AttEvectionApprovalDto eaD = AttEvectionApprovalDto AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder() .builder()
.userid(id)
.orgcode(orgCode)
.evectionid(Convert.toInt(approveId)) .evectionid(Convert.toInt(approveId))
.evectiontype(1) .evectiontype(1)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.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);
} }
......
...@@ -27,9 +27,9 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -27,9 +27,9 @@ public class GoOutBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue(); String initiator = jsonObj.get("initiator",FromData.class).getValue();
...@@ -48,6 +48,8 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -48,6 +48,8 @@ public class GoOutBusiness extends SpmkAssoBusiness {
AttEvectionApprovalDto eaD = AttEvectionApprovalDto AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder() .builder()
.userid(id)
.orgcode(orgCode)
.evectionid(Convert.toInt(approveId)) .evectionid(Convert.toInt(approveId))
.evectiontype(2) .evectiontype(2)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
...@@ -55,6 +57,7 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -55,6 +57,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);
} }
......
...@@ -31,16 +31,16 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -31,16 +31,16 @@ public class LeaveBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id // 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue(); String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 请假类型 // 请假类型 - 前端传中文
String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue(); String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue();
// 开始时间 // 开始时间
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue(); String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
...@@ -55,13 +55,16 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -55,13 +55,16 @@ public class LeaveBusiness extends SpmkAssoBusiness {
AttLeaveApprovalDto laD = AttLeaveApprovalDto AttLeaveApprovalDto laD = AttLeaveApprovalDto
.builder() .builder()
.userid(id)
.orgcode(orgCode)
.leaveid(Convert.toInt(approveId)) .leaveid(Convert.toInt(approveId))
.leavetype(Convert.toInt(LeaveType)) .leavetype(Convert.toInt(1))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.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("请假:" + laD);
// 调 考勤管理 业务-请假 // 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD); kqglService.attleaveapproval(laD);
} }
......
...@@ -2,6 +2,7 @@ package cn.timer.api.utils.router.business; ...@@ -2,6 +2,7 @@ package cn.timer.api.utils.router.business;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
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.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -20,9 +21,9 @@ public class RecruitBusiness extends SpmkAssoBusiness { ...@@ -20,9 +21,9 @@ public class RecruitBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
......
...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service; ...@@ -7,6 +7,7 @@ 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;
...@@ -49,6 +50,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -49,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();
// 实际转正时间 // 实际转正时间
...@@ -58,11 +61,12 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -58,11 +61,12 @@ 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)
......
...@@ -29,9 +29,9 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -29,9 +29,9 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
...@@ -50,11 +50,14 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -50,11 +50,14 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
AttRepairApprovalDto raD = AttRepairApprovalDto AttRepairApprovalDto raD = AttRepairApprovalDto
.builder() .builder()
.userid(id)
.orgcode(orgCode)
.repairid(Convert.toInt(approveId)) .repairid(Convert.toInt(approveId))
.cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss")) .cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss"))
.cardreplperiod(Convert.toInt(cardreplperiod)) .cardreplperiod(Convert.toInt(cardreplperiod))
.build(); .build();
System.out.println("补卡:"+raD);
// 调 考勤管理 业务-补卡 // 调 考勤管理 业务-补卡
kqglService.attrepairapproval(raD); kqglService.attrepairapproval(raD);
} }
......
...@@ -5,6 +5,7 @@ import java.text.ParseException; ...@@ -5,6 +5,7 @@ import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil; 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;
...@@ -29,9 +30,9 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -29,9 +30,9 @@ public class ResignationBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue()); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("",FromData.class).getValue()); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
...@@ -44,15 +45,16 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -44,15 +45,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 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 {
@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;
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; return serviceMap.get("regularizationBusiness");
break;
case RESIGNATION: case RESIGNATION:
sat = resignationBusiness; return serviceMap.get("resignationBusiness");
break;
case TRANSFER_POSITION: case TRANSFER_POSITION:
sat = transferPositionBusiness; return serviceMap.get("transferPositionBusiness");
break;
case RECRUIT: case RECRUIT:
sat = recruitBusiness; return serviceMap.get("recruitBusiness");
break;
case WORK_OVERTIME: case WORK_OVERTIME:
sat = workOvertimeBusiness; return serviceMap.get("workOvertimeBusiness");
break;
case LEAVE: case LEAVE:
sat = leaveBusiness; return serviceMap.get("leaveBusiness");
break;
case EVECTION: case EVECTION:
sat = evectionBusiness; return serviceMap.get("evectionBusiness");
break;
case GO_OUT: case GO_OUT:
sat = goOutBusiness; return serviceMap.get("goOutBusiness");
break;
case REISSUE_A_CARD: case REISSUE_A_CARD:
sat = reissueACardBusiness; 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;
}
}
...@@ -3,8 +3,10 @@ package cn.timer.api.utils.router.business; ...@@ -3,8 +3,10 @@ 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 org.springframework.stereotype.Service;
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.config.exception.CustomException;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService; import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.zzgl.UpEmpDeptDto; import cn.timer.api.dto.zzgl.UpEmpDeptDto;
...@@ -26,7 +28,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -26,7 +28,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue()); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人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());
// 发起人名称 // 发起人名称
...@@ -37,9 +39,12 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -37,9 +39,12 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
// 申请原因 // 申请原因
String ReasonForApplication = ObjectUtil.isNull(jsonObj.get("__ReasonForApplication",FromData.class)) ? null : jsonObj.get("__ReasonForApplication",FromData.class).getValue(); String ReasonForApplication = ObjectUtil.isNull(jsonObj.get("__ReasonForApplication",FromData.class)) ? null : jsonObj.get("__ReasonForApplication",FromData.class).getValue();
// 调入部门 // 调入部门
Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue()); Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Convert.toInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
// 调入岗位 // 调入岗位
String TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : jsonObj.get("__TransferInPosition",FromData.class).getValue(); Integer TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInPosition",FromData.class).getValue());
if (TransferInDepartment == null || TransferInPosition == null) {
throw new CustomException("部门或岗位 未填写,审批失败");
}
// 生效日期 // 生效日期
String effectiveDate = ObjectUtil.isNull(jsonObj.get("__effectiveDate",FromData.class)) ? null : jsonObj.get("__effectiveDate",FromData.class).getValue(); String effectiveDate = ObjectUtil.isNull(jsonObj.get("__effectiveDate",FromData.class)) ? null : jsonObj.get("__effectiveDate",FromData.class).getValue();
// 备注 // 备注
...@@ -52,6 +57,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -52,6 +57,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);
} }
......
...@@ -12,7 +12,6 @@ import cn.timer.api.controller.kqgl.service.KqglService; ...@@ -12,7 +12,6 @@ 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;
/** /**
* 加班-业务 * 加班-业务
...@@ -29,9 +28,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -29,9 +28,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws ParseException { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode")) ? null : Convert.toInt(jsonObj.get("orgCode"));
// 发起人id // 发起人id
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
...@@ -44,25 +43,28 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -44,25 +43,28 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
String endTime = ObjectUtil.isNull(jsonObj.get("__endTime",FromData.class)) ? null : jsonObj.get("__endTime",FromData.class).getValue(); String endTime = ObjectUtil.isNull(jsonObj.get("__endTime",FromData.class)) ? null : jsonObj.get("__endTime",FromData.class).getValue();
// 时长 // 时长
String timeLong = ObjectUtil.isNull(jsonObj.get("__timeLong",FromData.class)) ? null : jsonObj.get("__timeLong",FromData.class).getValue(); String timeLong = ObjectUtil.isNull(jsonObj.get("__timeLong",FromData.class)) ? null : jsonObj.get("__timeLong",FromData.class).getValue();
// 加班补偿方式 // 加班补偿方式 -前端传中文
String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue(); String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue();
// 加班原因 // 加班原因
String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue(); String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue();
// 加班类型-前端未给 // 加班类型-前端未给
String overtimetype = ObjectUtil.isNull(jsonObj.get("__overtimetype",FromData.class)) ? null : jsonObj.get("__overtimetype",FromData.class).getValue(); String workOvertimeType = ObjectUtil.isNull(jsonObj.get("__workOvertimeType",FromData.class)) ? null : jsonObj.get("__workOvertimeType",FromData.class).getValue();
// 上传文件 // 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
AttOvertimeApprovalDto oaD = AttOvertimeApprovalDto AttOvertimeApprovalDto oaD = AttOvertimeApprovalDto
.builder() .builder()
.userid(id)
.orgcode(orgCode)
.overtimeid(Convert.toInt(approveId)) .overtimeid(Convert.toInt(approveId))
.overtimetype(Convert.toInt(overtimetype)) .overtimetype(Convert.toInt(1))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm"))
.duration(Convert.toDouble(timeLong)) .duration(Convert.toDouble(timeLong))
.compensate(Convert.toInt(compensate)) .compensate(Convert.toInt(1))
.build(); .build();
System.out.println("加班:"+oaD);
// 调 考勤管理 业务-加班 // 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD); kqglService.attovertimeapproval(oaD);
......
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name (SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name
FROM jxgl_appraisal a FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode} LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1 LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.process_type = a.sts
WHERE a.performance_appraisal_id = #{param.id} WHERE a.performance_appraisal_id = #{param.id}
<if test="param.empNums != null and param.empNums.size() > 0"> <if test="param.empNums != null and param.empNums.size() > 0">
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and kqz.`name` like CONCAT('%',#{param.query},'%') and kqz.`name` like CONCAT('%',#{param.query},'%')
</if> </if>
ORDER BY kqz.id DESC;
</select> </select>
<!-- <!--
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
FROM yggl_main_emp a FROM yggl_main_emp a
<where> <where>
AND a.org_code = #{param.orgCode} AND a.org_code = #{param.orgCode}
AND a.job_status != 3 AND a.job_status IN (0,1,2)
<if test="param.jobType != null"> <if test="param.jobType != null">
AND a.job_type = #{param.jobType} AND a.job_type = #{param.jobType}
</if> </if>
......
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