TransferPositionBusiness.java 2.55 KB
Newer Older
1 2
package cn.timer.api.utils.router.business;

3 4
import org.springframework.beans.factory.annotation.Autowired;

5
import cn.hutool.core.util.ObjectUtil;
6
import cn.hutool.json.JSONObject;
7
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
8
import cn.timer.api.dto.spmk.FromData;
9
import cn.timer.api.dto.zzgl.UpEmpDeptDto;
10 11 12 13 14 15 16 17 18 19
import lombok.Builder;

/**
 * 调岗-业务
 * @author Tang
 *
 */
@Builder
public class TransferPositionBusiness extends SpmkAssoBusiness {

20 21 22
	@Autowired
	ZzglBmgwMService zzglBmgwMService;
	
23 24 25 26
	@Override
	public void handleApprove(JSONObject jsonObj) {
		// TODO Auto-generated method stub
		// 发起人企业id
27
		Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
28
		// 发起人id
29
		Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
30
		// 发起人名称
31
		String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
32 33
		
		// 申请人
34
		String applicant = ObjectUtil.isNull(jsonObj.get("__applicant",FromData.class)) ? null : jsonObj.get("__applicant",FromData.class).getValue();
35
		// 申请原因
36
		String ReasonForApplication = ObjectUtil.isNull(jsonObj.get("__ReasonForApplication",FromData.class)) ? null : jsonObj.get("__ReasonForApplication",FromData.class).getValue();
37
		// 调入部门
38
		Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
39
		// 调入岗位
40
		String TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : jsonObj.get("__TransferInPosition",FromData.class).getValue();
41
		// 生效日期
42
		String effectiveDate = ObjectUtil.isNull(jsonObj.get("__effectiveDate",FromData.class)) ? null : jsonObj.get("__effectiveDate",FromData.class).getValue();
43
		// 备注
44
		String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
45
		// 上传文件
46
		String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
47
		
48 49 50 51 52
		UpEmpDeptDto upEmpDeptDto = UpEmpDeptDto.builder()
				.dpetId(TransferInDepartment)
				.isdg(1)
				.build();
		
53
		// 调 员工管理 业务
54
		zzglBmgwMService.applicationTransferPosition(id, orgCode, upEmpDeptDto);
55 56 57
	}

}