package com.engine.shuzhi.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.engine.core.impl.Service;
import com.engine.shuzhi.service.SzDataCenterService;
import com.ibm.db2.jcc.am.sg;
import com.time.util.DateUtil;
import weaver.conn.BatchRecordSet;
import weaver.conn.RecordSet;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;

import java.util.*;

/**
 * 类的详细说明
 *
 * @author wangj
 * @version 1.00版本
 * @Date 2023/6/26
 */

public class SzDataCenterServiceImpl extends Service implements SzDataCenterService {
    @Override
    public Map<String, Object> updateResume(Map<String, Object> params, User user) {
        Map<String, Object> res = new HashMap<>();
        String id = Util.null2String(params.get("id"));
        RecordSet rs = new RecordSet();

        //###################起始数据#######################

        //候选人姓名
        String field001 = "";
        //性别
        String field002 = "";
        //年龄
        String field008 = "";
        //身份证号
        String field004 = "";
        //手机号码
        String field005 = "";
        //民族
        String field051 = "";
        //应聘企业
        String field037 = "";
        //最高学历
        String field052 = "";
        //专业
        String field053 = "";
        //毕业院校
        String field054 = "";
        //意向岗位
        String field007 = "";
        //简历状态
        String field010 = "";

        //######################基础数据#########################
        //曾用名
        String field015 = "";
        //英文名
        String field016 = "";
        //国家地区
        String field017 = "";
        //所属国籍
        String field018 = "";
        //其他证件类型
        String field019 = "";
        //其他证件号码
        String field020 = "";
        //政治面貌
        String field038 = "";
        //籍贯（省份+市/县名）
        String field021 = "";
        //户籍城市（省份+市/县名）
        String field022 = "";
        //户籍地址（具体到门牌号）
        String field023 = "";
        //户口性质
        String field024 = "";
        //现居住地（具体到门牌号）
        String field025 = "";
        //首次参加工作日期
        String field026 = "";
        //个人邮箱
        String field027 = "";
        //婚姻状况
        String field029 = "";
        //生育状况
        String field030 = "";
        //血型
        String field028 = "";
        //健康状况
        String field039 = "";
        //出生日期
        String csrq = "";
        //属相
        String field062 = "";
        //身高
        String field063 = "";
        //体重
        String field064 = "";
        //是否为内部推荐
        String field067 = "";
        //推荐人
        String field066 = "";
        //工资卡卡号
        String field031 = "";
        //工资卡开户支行
        String field040 = "";

        //###############亲属信息 edc_uf_table185_dt1##################
        //亲属姓名
        String field001dt1 = "";
        //亲属关系
        String field006dt1 = "";
        //联系方式
        String field003dt1 = "";
        //联系人地址
        String field004dt1 = "";
        //是否紧急联系人
        String field005dt1 = "";

        //###############教育经历 edc_uf_table185_dt3##################
        //毕业院校
        String field001dt3 = "";
        //毕业专业
        String field002dt3 = "";
        //开始日期
        String field003dt3 = "";
        //结束日期
        String field004dt3 = "";
        //学历
        String field008dt3 = "";
        //学习形式
        String field006dt3 = "";
        //学位类型
        String field007dt3 = "";

        //###############工作经历 edc_uf_table185_dt2##################
        //起止日期(x年x月-x年x月)
        String field001dt2 = "";
        //上家工作单位名称
        String field002dt2 = "";
        //上家工作单位职务
        String field003dt2 = "";
        //工作地点
        String field004dt2 = "";
        //证明人及联系方式
        String field005dt2 = "";

        //###############证书列表 edc_uf_table185_dt4##################
        //证书名称
        String field001dt4 = "";
        //发证机关
        String field003dt4 = "";
        //发证日期
        String field004dt4 = "";
        //证书有效期
        String field005dt4 = "";


        String sql = "select field001,field002,field008,field004,field005,field051,field037,field052,field053,field054,field007,field010," +
                "field015,field016,field017,field018,field019,field020,field038,field021,field022,field023,field024,field025,field026," +
                "field027,field029,field030,field028,field039,csrq,field062,field063,field064,field067,field066,field031,field040 from edc_uf_table185 where id = '" + id + "'";

        rs.execute(sql);
        while (rs.next()) {
            field001 = rs.getString("field001");
            field002 = rs.getString("field002");
            field008 = rs.getString("field008");
            field004 = rs.getString("field004");
            field005 = rs.getString("field005");
            field051 = rs.getString("field051");
            field037 = rs.getString("field037");
            field052 = rs.getString("field052");
            field053 = rs.getString("field053");
            field054 = rs.getString("field054");
            field007 = rs.getString("field007");
            field010 = rs.getString("field010");
            field015 = rs.getString("field015");
            field016 = rs.getString("field016");
            field017 = rs.getString("field017");
            field018 = rs.getString("field018");
            field019 = rs.getString("field019");
            field020 = rs.getString("field020");
            field038 = rs.getString("field038");
            field021 = rs.getString("field021");
            field022 = rs.getString("field022");
            field023 = rs.getString("field023");
            field024 = rs.getString("field024");
            field025 = rs.getString("field025");
            field026 = rs.getString("field026");
            field027 = rs.getString("field027");
            field029 = rs.getString("field029");
            field030 = rs.getString("field030");
            field028 = rs.getString("field028");
            field039 = rs.getString("field039");
            csrq = rs.getString("csrq");

            //属相
            field062 = rs.getString("field062");
            //身高
            field063 = rs.getString("field063");
            //体重
            field064 = rs.getString("field064");
            //是否为内部推荐
            field067 = rs.getString("field067");
            //推荐人
            field066 = rs.getString("field066");
            field031 = rs.getString("field031");
            field040 = rs.getString("field040");
        }

        //亲属信息
        List<Map<String, Object>> qsxx = new ArrayList<>();
        //教育经历
        List<Map<String, Object>> jyjl = new ArrayList<>();
        //工作经历
        List<Map<String, Object>> gzjl = new ArrayList<>();
        //证书列表
        List<Map<String, Object>> zslb = new ArrayList<>();


        sql = "select field001,field006,field003,field004,field005 from edc_uf_table185_dt1 where mainid = '" + id + "'";
        rs.execute(sql);
        while (rs.next()) {
            field001dt1 = rs.getString("field001");
            field006dt1 = rs.getString("field006");
            field003dt1 = rs.getString("field003");
            field004dt1 = rs.getString("field004");
            field005dt1 = rs.getString("field005");

            Map<String, Object> map = new HashMap<>();
            map.put("field001", field001dt1);
            map.put("field006", field006dt1);
            map.put("field003", field003dt1);
            map.put("field004", field004dt1);
            map.put("field005", field005dt1);
            qsxx.add(map);
        }


        sql = "select field001,field002,field003,field004,field008,field006,field007 from edc_uf_table185_dt3 where mainid = '" + id + "'";
        rs.execute(sql);
        while (rs.next()) {
            field001dt3 = rs.getString("field001");
            field002dt3 = rs.getString("field002");
            field003dt3 = rs.getString("field003");
            field004dt3 = rs.getString("field004");
            field008dt3 = rs.getString("field008");
            field006dt3 = rs.getString("field006");
            field007dt3 = rs.getString("field007");

            Map<String, Object> map = new HashMap<>();
            map.put("field001", field001dt3);
            map.put("field002", field002dt3);
            map.put("field003", field003dt3);
            map.put("field004", field004dt3);
            map.put("field008", field008dt3);
            map.put("field006", field006dt3);
            map.put("field007", field007dt3);
            jyjl.add(map);
        }


        sql = "select field001,field002,field003,field004,field005 from edc_uf_table185_dt2 where mainid = '" + id + "'";
        rs.execute(sql);
        while (rs.next()) {
            field001dt2 = rs.getString("field001");
            field002dt2 = rs.getString("field002");
            field003dt2 = rs.getString("field003");
            field004dt2 = rs.getString("field004");
            field005dt2 = rs.getString("field005");

            Map<String, Object> map = new HashMap<>();
            map.put("field001", field001dt2);
            map.put("field002", field002dt2);
            map.put("field003", field003dt2);
            map.put("field004", field004dt2);
            map.put("field005", field005dt2);
            gzjl.add(map);
        }

        sql = "select field001,field003,field004,field005 from edc_uf_table185_dt4 where mainid = '" + id + "'";
        rs.execute(sql);
        while (rs.next()) {
            field001dt4 = rs.getString("field001");
            field003dt4 = rs.getString("field003");
            field004dt4 = rs.getString("field004");
            field005dt4 = rs.getString("field005");

            Map<String, Object> map = new HashMap<>();
            map.put("field001", field001dt4);
            map.put("field003", field003dt4);
            map.put("field004", field004dt4);
            map.put("field005", field005dt4);
            zslb.add(map);
        }


        //更新简历中心(edc_uf_table160) 基础数据 //更具手机号
        String edcid = "";
        sql = "select id from edc_uf_table160 where field005 = '" + field005 + "'";
        rs.execute(sql);
        while (rs.next()) {
            edcid = Util.null2String(rs.getString("id"));
        }
        boolean jlflag = updateEdcInfo(field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field010, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, edcid, qsxx, jyjl, gzjl, zslb);


        //更新待入职模板(uf_drztzbd) 基础数据 明细数据
        boolean rzflag = false;

        String ufid = "";
        sql = "select id from uf_drztzbd where sjhm = '" + field005 + "'";
        rs.execute(sql);
        while (rs.next()) {
            ufid = rs.getString("id");
        }

        rzflag = updateUfInfo(field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, ufid, qsxx, jyjl, gzjl, zslb);


        res.put("jlflag", jlflag);
        res.put("rzflag", rzflag);
        return res;
    }



    private boolean updateEdcInfo(String field001, String field002, String field008, String field004, String field005, String field051, String field037, String field052, String field053, String field054, String field007, String field010, String field015, String field016, String field017, String field018, String field019, String field020, String field038, String field021, String field022, String field023, String field024, String field025, String field026, String field027, String field029, String field030, String field028, String field039, String csrq, String field062, String field063, String field064, String field067, String field066, String field031, String field040, String edcid, List<Map<String, Object>> qsxx, List<Map<String, Object>> jyjl, List<Map<String, Object>> gzjl, List<Map<String, Object>> zslb) {
        boolean flag = false;
        RecordSet rs = new RecordSet();
        String sql = "";

        BaseBean bb = new BaseBean();

        String formmodeid = bb.getPropValue("dataCenter_config", "edc_formmodeid");

        if ("".equals(edcid)) {
            String uuid = UUID.randomUUID().toString();
            int modedatacreater = 1;
            int modedatacreatertype = 0;
            String modedatacreatedate = DateUtil.getCurrentTime("yyyy-MM-dd");
            String modedatacreatetime = DateUtil.getCurrentTime("HH:mm:ss");


            sql = "insert into edc_uf_table160 (field001,field002,field008,field004,field005,field013,field011,xl,zy,byyx,field007,field010,zym, ywm, gjdq, szgj, qtzjlx, qtzjhm, zzmm, jgsfsxm, hjcshjcssfsxm, hjdzjtdmph, hkxz, xjzd, sccjgzrq, gryx, hyzk, syzk, xx, jkzk, csrq, zx, sg, tz, sfwnbrytj, tjr, gzkkh, gzkkhzx,modeuuid,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
            flag = rs.executeUpdate(sql, field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field010, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, uuid, formmodeid, modedatacreater, modedatacreatertype, modedatacreatedate, modedatacreatetime);


            if (flag) {
                sql = "select id from edc_uf_table160 where modeuuid = '" + uuid + "'";
                rs.execute(sql);
                rs.next();
                String billid = rs.getString("id");
                edcid = billid;
                ModeRightInfo modeRightInfo = new ModeRightInfo();
                modeRightInfo.editModeDataShare(modedatacreater, Integer.parseInt(formmodeid), Integer.parseInt(billid));
            }

        } else {
            sql = "update edc_uf_table160 set field001 = ?,field002 = ?,field008 = ?,field004 = ?,field005 = ?,field013 = ?,field011 = ?,xl = ?,zy = ?,byyx = ?,field007 = ?,field010 = ?,zym = ?, ywm = ?, gjdq = ?, szgj = ?, qtzjlx = ?, qtzjhm = ?, zzmm = ?, jgsfsxm = ?, hjcshjcssfsxm = ?, hjdzjtdmph = ?, hkxz = ?, xjzd = ?, sccjgzrq = ?, gryx = ?, hyzk = ?, syzk = ?, xx = ?, jkzk = ?, csrq = ?, zx = ?, sg = ?, tz = ?, sfwnbrytj = ?, tjr = ?, gzkkh = ?, gzkkhzx = ? where id = ?";
            flag = rs.executeUpdate(sql, field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field010, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, edcid);
        }

        if (!"".equals(edcid)) {

            sql = "delete from edc_uf_table160_dt1 where mainid = '" + edcid + "'";
            rs.execute(sql);

            sql = "delete from edc_uf_table160_dt2 where mainid = '" + edcid + "'";
            rs.execute(sql);

            sql = "delete from edc_uf_table160_dt3 where mainid = '" + edcid + "'";
            rs.execute(sql);

            sql = "delete from edc_uf_table160_dt4 where mainid = '" + edcid + "'";
            rs.execute(sql);

            BatchRecordSet batchRecordSet = new BatchRecordSet();

            //亲属信息
            List<List<Object>> qsxxlist = new ArrayList<>();
            for (int i = 0; i < qsxx.size(); i++) {
                Map<String, Object> map = qsxx.get(i);
                String field001dt1 = (String) map.get("field001");
                String field006dt1 = (String) map.get("field006");
                String field003dt1 = (String) map.get("field003");
                String field004dt1 = (String) map.get("field004");
                String field005dt1 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(edcid);
                list.add(field001dt1);
                list.add(field006dt1);
                list.add(field003dt1);
                list.add(field004dt1);
                list.add(field005dt1);
                qsxxlist.add(list);
            }

            sql = "insert into edc_uf_table160_dt1 (mainid,qzxm,qzgx,lxfs,lxrgzdw,sfjjlxr) values (?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, qsxxlist);

            //教育经历
            List<List<Object>> jyjllist = new ArrayList<>();
            for (int i = 0; i < jyjl.size(); i++) {
                Map<String, Object> map = jyjl.get(i);

                String field001dt3 = (String) map.get("field001");
                String field002dt3 = (String) map.get("field002");
                String field003dt3 = (String) map.get("field003");
                String field004dt3 = (String) map.get("field004");
                String field008dt3 = (String) map.get("field008");
                String field006dt3 = (String) map.get("field006");
                String field007dt3 = (String) map.get("field007");

                List<Object> list = new ArrayList<>();
                list.add(edcid);
                list.add(field001dt3);
                list.add(field002dt3);
                list.add(field003dt3);
                list.add(field004dt3);
                list.add(field008dt3);
                list.add(field006dt3);
                list.add(field007dt3);
                jyjllist.add(list);
            }

            sql = "insert into edc_uf_table160_dt2 (mainid,byyx,byzy,ksrq,jsrq,xl,xxxs,xwlx) values (?,?,?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, jyjllist);

            //工作经历
            List<List<Object>> gzjllist = new ArrayList<>();
            for (int i = 0; i < gzjl.size(); i++) {
                Map<String, Object> map = new HashMap<>();
                String field001dt2 = (String) map.get("field001");
                String field002dt2 = (String) map.get("field002");
                String field003dt2 = (String) map.get("field003");
                String field004dt2 = (String) map.get("field004");
                String field005dt2 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(edcid);
                list.add(field001dt2);
                list.add(field002dt2);
                list.add(field003dt2);
                list.add(field004dt2);
                list.add(field005dt2);
                gzjllist.add(list);
            }

            sql = "insert into edc_uf_table160_dt3 (mainid,qzrqxnxyxnxy,sjgzdwmc,sjgzdwzw,gzdd,zmrjlxfs) values (?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, gzjllist);

            //证书列表
            List<List<Object>> zslblist = new ArrayList<>();
            for (int i = 0; i < zslb.size(); i++) {
                Map<String, Object> map = new HashMap<>();
                String field001dt4 = (String) map.get("field001");
                String field003dt4 = (String) map.get("field003");
                String field004dt4 = (String) map.get("field004");
                String field005dt4 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(edcid);
                list.add(field001dt4);
                list.add(field003dt4);
                list.add(field004dt4);
                list.add(field005dt4);
                zslblist.add(list);
            }

            sql = "insert into edc_uf_table160_dt4 (mainid,zsmc,fzjg,fzrq,zsyxq) values (?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, zslblist);
        }


        return flag;
    }


    private boolean updateUfInfo(String field001, String field002, String field008, String field004, String field005, String field051, String field037, String field052, String field053, String field054, String field007, String field015, String field016, String field017, String field018, String field019, String field020, String field038, String field021, String field022, String field023, String field024, String field025, String field026, String field027, String field029, String field030, String field028, String field039, String csrq, String field062, String field063, String field064, String field067, String field066, String field031, String field040, String ufid, List<Map<String, Object>> qsxx, List<Map<String, Object>> jyjl, List<Map<String, Object>> gzjl, List<Map<String, Object>> zslb) {

        boolean flag = false;
        RecordSet rs = new RecordSet();
        String sql = "";

        BaseBean bb = new BaseBean();

        String formmodeid = bb.getPropValue("dataCenter_config", "uf_formmodeid");

        if ("".equals(ufid)) {
            String uuid = UUID.randomUUID().toString();
            int modedatacreater = 1;
            int modedatacreatertype = 0;
            String modedatacreatedate = DateUtil.getCurrentTime("yyyy-MM-dd");
            String modedatacreatetime = DateUtil.getCurrentTime("HH:mm:ss");

            sql = "insert into uf_drztzbd (xm,xb,nl,sfzh,sjhm,mz,szqy,dyxl,zy,byyx,yxgw,zym,ywm,gjdq,szgj,zjlx,zjhm,zzmm,jgxxsxxs,hjcs,hjdz,hkxz,xjdz,cjgzsj,gryx,sfyh,sfyy,xx,jkzk,csrq,zx,sg,tz,sfwnbtj,tjr,gzkkh,gzkkhx,modeuuid,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
            flag = rs.executeUpdate(sql, field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, uuid, formmodeid, modedatacreater, modedatacreatertype, modedatacreatedate, modedatacreatetime);

            if (flag) {
                sql = "select id from uf_drztzbd where modeuuid = '" + uuid + "'";
                rs.execute(sql);
                rs.next();
                String billid = rs.getString("id");
                ufid = billid;
                ModeRightInfo modeRightInfo = new ModeRightInfo();
                modeRightInfo.editModeDataShare(modedatacreater, Integer.parseInt(formmodeid), Integer.parseInt(billid));


            }
        } else {
            sql = "update uf_drztzbd set xm = ?,xb = ?,nl = ?,sfzh = ?,sjhm = ?,mz = ?,szqy = ?,dyxl = ?,zy = ?,byyx = ?,yxgw = ?,zym = ?,ywm = ?,gjdq = ?,szgj = ?,zjlx = ?,zjhm = ?,zzmm = ?,jgxxsxxs = ?,hjcs = ?,hjdz = ?,hkxz = ?,xjdz = ?,cjgzsj = ?,gryx = ?,sfyh = ?,sfyy = ?,xx = ?,jkzk = ?,csrq = ?,zx = ?,sg = ?,tz = ?,sfwnbtj = ?,tjr = ?,gzkkh = ?,gzkkhx = ? where id = ?";
            flag = rs.executeUpdate(sql, field001, field002, field008, field004, field005, field051, field037, field052, field053, field054, field007, field015, field016, field017, field018, field019, field020, field038, field021, field022, field023, field024, field025, field026, field027, field029, field030, field028, field039, csrq, field062, field063, field064, field067, field066, field031, field040, ufid);
        }


        //操作明细表数据
        if (!"".equals(ufid)) {
            sql = "delete from uf_drztzbd_dt1 where mainid = '" + ufid + "'";
            rs.execute(sql);

            sql = "delete from uf_drztzbd_dt4 where mainid = '" + ufid + "'";
            rs.execute(sql);

            sql = "delete from uf_drztzbd_dt3 where mainid = '" + ufid + "'";
            rs.execute(sql);

            sql = "delete from uf_drztzbd_dt5 where mainid = '" + ufid + "'";
            rs.execute(sql);

            BatchRecordSet batchRecordSet = new BatchRecordSet();

            //亲属信息
            List<List<Object>> qsxxlist = new ArrayList<>();
            for (int i = 0; i < qsxx.size(); i++) {
                Map<String, Object> map = qsxx.get(i);
                String field001dt1 = (String) map.get("field001");
                String field006dt1 = (String) map.get("field006");
                String field003dt1 = (String) map.get("field003");
                String field004dt1 = (String) map.get("field004");
                String field005dt1 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(ufid);
                list.add(field001dt1);
                list.add(field006dt1);
                list.add(field003dt1);
                list.add(field004dt1);
                list.add(field005dt1);
                qsxxlist.add(list);
            }
            sql = "insert into uf_drztzbd_dt1 (mainid,xm,qzgx,nl,lxfs,sfjjlxr) values (?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, qsxxlist);

            //教育经历
            List<List<Object>> jyjllist = new ArrayList<>();
            for (int i = 0; i < jyjl.size(); i++) {
                Map<String, Object> map = jyjl.get(i);

                String field001dt3 = (String) map.get("field001");
                String field002dt3 = (String) map.get("field002");
                String field003dt3 = (String) map.get("field003");
                String field004dt3 = (String) map.get("field004");
                String field008dt3 = (String) map.get("field008");
                String field006dt3 = (String) map.get("field006");
                String field007dt3 = (String) map.get("field007");

                List<Object> list = new ArrayList<>();
                list.add(ufid);
                list.add(field001dt3);
                list.add(field002dt3);
                list.add(field003dt3);
                list.add(field004dt3);
                list.add(field008dt3);
                list.add(field006dt3);
                list.add(field007dt3);
                jyjllist.add(list);
            }

            sql = "insert into uf_drztzbd_dt4 (mainid,qzsj,zgxlbyzy,zgxljykssj,zgxljyjssj,xl,xxxs,xwlx) values (?,?,?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, jyjllist);

            //工作经历 uf_drztzbd_dt3
            List<List<Object>> gzjllist = new ArrayList<>();
            for (int i = 0; i < gzjl.size(); i++) {
                Map<String, Object> map = new HashMap<>();
                String field001dt2 = (String) map.get("field001");
                String field002dt2 = (String) map.get("field002");
                String field003dt2 = (String) map.get("field003");
                String field004dt2 = (String) map.get("field004");
                String field005dt2 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(ufid);
                list.add(field001dt2);
                list.add(field002dt2);
                list.add(field003dt2);
                list.add(field004dt2);
                list.add(field005dt2);
                gzjllist.add(list);
            }

            sql = "insert into uf_drztzbd_dt3 (mainid,qzrq,jzdw,gw,gzdd,zmrjlxfs) values (?,?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, gzjllist);

            //证书列表
            List<List<Object>> zslblist = new ArrayList<>();
            for (int i = 0; i < zslb.size(); i++) {
                Map<String, Object> map = new HashMap<>();
                String field001dt4 = (String) map.get("field001");
                String field003dt4 = (String) map.get("field003");
                String field004dt4 = (String) map.get("field004");
                String field005dt4 = (String) map.get("field005");

                List<Object> list = new ArrayList<>();
                list.add(ufid);
                list.add(field001dt4);
                list.add(field003dt4);
                list.add(field004dt4);
                list.add(field005dt4);
                zslblist.add(list);
            }

            sql = "insert into uf_drztzbd_dt5 (mainid,zsmc,fzjg,fzsj,zsyxq) values (?,?,?,?,?)";
            batchRecordSet.executeBatchSql(sql, zslblist);
        }
        return flag;
    }

}
