RegularizationBusiness.java 1.94 KB
Newer Older
1 2
package cn.timer.api.utils.router.business;

3 4 5 6
import java.text.ParseException;

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

7
import cn.hutool.json.JSONObject;
8
import cn.timer.api.controller.yggl.service.YgglService;
9
import cn.timer.api.dto.spmk.FromData;
10 11
import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.DateFormatUtils;
12 13 14 15 16 17 18 19 20 21
import lombok.Builder;

/**
 * 转正-业务
 * @author Tang
 *
 */
@Builder
public class RegularizationBusiness extends SpmkAssoBusiness {

22 23 24
	@Autowired
	private YgglService ygglService;
	
25
	@Override
26
	public void handleApprove(JSONObject jsonObj) throws Exception {
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
		// TODO Auto-generated method stub
		// 发起人企业id
		String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
		// 发起人名称
		String initiator = jsonObj.get("initiator",FromData.class).getValue();
		
		// 申请人名称
		String applicant = jsonObj.get("__applicant",FromData.class).getValue();
		// 试用期内主要工作和成绩
		String WorkAndAchievement = jsonObj.get("WorkAndAchievement",FromData.class).getValue();
		// 存在问题及改进意见
		String problem = jsonObj.get("problem",FromData.class).getValue();
		// 上传文件
		String file = jsonObj.get("file",FromData.class).getValue();
		
42 43 44
		
		
		// 发起人id
45 46 47
		Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
		// 计划转正时间
		String confirmationTime = jsonObj.get("confirmationTime",FromData.class).getValue();
48 49 50 51 52
		// 实际转正时间
		String newConfirmationTime = jsonObj.get("__newConfirmationTime",FromData.class).getValue();
		// 备注
		String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
		
53 54 55 56 57 58
		YgzzDto ygzzDto = YgzzDto.builder()
				.empNum(id)
				.zzTime(DateFormatUtils.getDateByString(confirmationTime))
				.sjzzTime(DateFormatUtils.getDateByString(newConfirmationTime))
				.zzRemark(Remarks)
				.build();
59
		
60
		// 调 员工管理 业务
61
		ygglService.applicationRegularization(ygzzDto);
62 63 64
	}

}