package com.xjrsoft.module.liteflow.node;

import cn.hutool.core.convert.Convert;
import com.xjrsoft.XjrSoftApplication;
import com.xjrsoft.module.personnel.entity.ReservationSchool;
import com.xjrsoft.module.personnel.service.IReservationSchoolService;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Map;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author dzx
 * @date 2024/5/20
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = XjrSoftApplication.class)
class ReservationSchoolNodeTest {
    @Autowired
    private IReservationSchoolService reservationSchoolService;
    @Test
    public void process() throws Exception {
        // 获取表单中数据编号
        Long formId = 1792446887763165184L;
        if (formId != null) {
            // 数据处理
            ReservationSchool dataObj = reservationSchoolService.getByIdDeep(formId);
            dataObj.setStatus(1);
            dataObj.setExamStatus(1);
            reservationSchoolService.updateById(dataObj);

            reservationSchoolService.registration(dataObj);
        }
    }

}