package test.com.philisense.www.controller.http.web;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.philisense.www.core.text.Convert;
import com.philisense.www.utils.StringUtils;
import com.philisense.www.utils.des.RegistCodeCript;
import io.swagger.annotations.ApiImplicitParam;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;


import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import test.base.HttpUtilsForm;

import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.philisense.www.common.config.CommonConst;

public class TestProUserControllerWithHttpClientForWeb  {




            @BeforeEach
            public void setUpTestDataWithinTransaction() {

            // set up test data within the transaction

            }

            @AfterEach
            public void tearDownWithinTransaction() {

            // execute "tear down" logic within the transaction

            }

            @Test
            @Disabled
            public void testProUserDeleteByPrimaryKeyForWeb(){
                String id = UUID.randomUUID().toString().replaceAll("-","");
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/delete?recordid="+id;
            	String charset = HttpUtilsForm.UTF8;
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doGet(url, charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserSelectByPrimaryKeyForWeb(){
                String id = UUID.randomUUID().toString().replaceAll("-","");
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/get?recordid="+id;
            	String charset = HttpUtilsForm.UTF8;
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doGet(url, charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserInsertForWeb(){
            	
            	Map<String, Object> headerMap = new HashMap<String, Object>();
            	
            	headerMap.put("Content-Type", "application/json");
            	
            	
            	
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/insert";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                }               
                
            }

            @Test
            @Disabled
            public void testProUserUpdateForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/update";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserDeleteByMapForWeb(){
	        	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/deleteByMap";
	        	String charset = HttpUtilsForm.UTF8;
	        	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
	            try {
	                //括号里的是前台发送的url连接
	                String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
	                System.out.println(body);                                                       
	            } catch (Exception e) {
	                e.printStackTrace();
	            } 
                
            }

            @Test
            @Disabled
            public void testProUserUpdateByMapForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/updateByMap";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testProUserGetOneForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/getOne";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testProUserGetAllForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/getAll";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserCountForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/count";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testProUserQueryPageForWeb(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/queryPage";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserInsertBatchForWeb(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg



                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


               	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/insertBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            @Test
            @Disabled
            public void testProUserDeleteBatchForWeb(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg

                list.add(params);


            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/deleteBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testProUserUpdateBatchForWeb(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


                params = new HashMap<String, Object>();

                //设置 请求参数
                params.put("user_id","user_id");//用户Id
                params.put("user_name","user_name");//用户名
                params.put("sex","sex");//性别
                params.put("user_name_cn","user_name_cn");//用户名称
                params.put("password","password");//密码
                params.put("enabled",0);//是否禁用
                params.put("is_system_user",0);//是否是系统用户
                params.put("creator_id","creator_id");//创建人
                params.put("dept_code","dept_code");//部门代码
                params.put("inner_dept_code","inner_dept_code");//内部部门代码
                params.put("org_code","org_code");//机构代码
                params.put("inner_org_code","inner_org_code");//内部机构代码
                params.put("memos","memos");//备注
                params.put("avatar","avatar");//头像图标路径
                params.put("id_card","id_card");//身份证号
                params.put("email","email");//邮箱
                params.put("phone","phone");//手机号
                params.put("landline","landline");//座机号
                params.put("dept","dept");//部门
                params.put("job","job");//职位
                params.put("work_addr","work_addr");//工作地点 01>总部飞利信大厦  选择楼层 02>非总部 选择省份
                params.put("floor","floor");//所在楼层
                params.put("inprovince","inprovince");//所在省份
                params.put("hiredate",new Date());//入职时间
                params.put("departure_time",new Date());//离职时间
                params.put("createTime",new Date());//创建时间
                params.put("org","org");//机构
                params.put("tags","tags");//标签
                params.put("country","country");//国家/地区
                params.put("profile","profile");//个人简介
                params.put("province","province");//省
                params.put("city","city");//市
                params.put("address","address");//街道地址
                params.put("deviceNum","deviceNum");//设备号
                params.put("openid","openid");//微信
                params.put("mpopenid","mpopenid");//微信公众号openid
                params.put("miniopenid","miniopenid");//微信小程序openid
                params.put("wxUnionID","wxUnionID");//微信UnionID
                params.put("taobao","taobao");//淘宝
                params.put("alipay","alipay");//支付宝
                params.put("dingding","dingding");//钉钉
                params.put("zindex","zindex");//索引
                params.put("empid","empid");// 门禁id
                params.put("empno","empno");//员工号
                params.put("wx_msg","wx_msg");//wx_msg
                params.put("email_msg","email_msg");//email_msg
                params.put("system_msg","system_msg");//system_msg


                list.add(params);


            	String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/updateBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testexportForProUserForWeb() throws IOException {
                    /*
                    // 待下载的文件地址
                    String url = CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/export";
                    ResponseEntity<byte[]> rsp = template.getForEntity(url, byte[].class);
                    System.out.println("文件下载请求结果状态码：" + rsp.getStatusCode());

                    String filename = "客户用户表";
                    // 将下载下来的文件内容保存到本地
                    String targetPath = "path_xxx/"+filename+"_ProUser.xlsx";
                    Files.write(Paths.get(targetPath), Objects.requireNonNull(rsp.getBody(),
                    "未获取到下载文件"));
                    */
            }

            @Test
            @Disabled
            public void testexportTemplateForProUserForWeb() throws IOException {
                    /*
            	    // 待下载的文件地址
                    String url = CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/exportTemplate";
                    ResponseEntity<byte[]> rsp = template.getForEntity(url, byte[].class);
                    System.out.println("文件下载请求结果状态码：" + rsp.getStatusCode());

                    // 将下载下来的文件内容保存到本地
                    String filename = "客户用户表";
                    // 将下载下来的文件内容保存到本地
                    String targetPath = "path_xxx/"+filename+"_ProUser.xlsx";
                    Files.write(Paths.get(targetPath), Objects.requireNonNull(rsp.getBody(),
                    "未获取到下载文件"));
                    */
            }

            @Test
            @Disabled
            public void testimportExcelForProUserForWeb()  {
                /*
            	// 文件上传服务上传接口
                String url = CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/importExcel";
                // 待上传的文件（存在客户端本地磁盘）
                String filename = "客户用户表";
                // 将下载下来的文件内容保存到本地
                String targetPath = "path_xxx/"+filename+"_ProUser.xlsx";
                // 封装请求参数
                FileSystemResource resource = new FileSystemResource(new File(targetPath));
                MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
                param.add("file", resource);  //服务端MultipartFile uploadFile
                //param.add("param1", "test");   //服务端如果接受额外参数，可以传递


                // 发送请求并输出结果
                System.out.println("--- 开始上传文件 ---");
                String result = template.postForObject(url, param, String.class);
                System.out.println("--- 访问地址：" + result);
                */
            }

    @Test
    public void testSyncProUserInsertBatchForWeb(){
        try {
            /*
             用户sql: SELECT su.*,  su.PWD XPWD, aa01.* FROM SYSUSER su LEFT JOIN (select * from AA01  a
               where a.ZA0100 = (select max(b.ZA0100)
               from AA01 b
               where a.AA0105 = b.AA0105 )) aa01 on su.id = aa01.AA0105
             部门sql: SELECT DEPTID, DEPARTMENTNAME FROM SYSDEPARTMENT
            */
            File file = new File("E:\\tmp\\nksyncdata\\user-20230104.json");
            File deptFile = new File("E:\\tmp\\nksyncdata\\deptMap-20230104.json");

            SimpleDateFormat sdf_day =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );

            Map<String, String> job = new HashMap<>();
            job.put("T17U2", "总经理");
            job.put("T17U3", "副总经理");
            job.put("T17U4", "经理");
            job.put("T17U5", "副经理");
            job.put("T17U6", "主管");
            job.put("T17U7", "负责人");

            String jsonStr = readerMethod(file);
            String deptJsonStr = readerMethod(deptFile);
            Map<String, Object> depts = new HashMap<>();
            if(StringUtils.isNotEmpty(deptJsonStr)) {
                depts = JSONObject.parseObject(deptJsonStr, Map.class);
            }
            if(StringUtils.isNotEmpty(jsonStr)) {
                List<JSONObject> userList = JSONArray.parseObject(jsonStr, List.class);
                List<Map<String, Object>> list = new ArrayList<>();
                for (JSONObject user : userList) {
                    Map<String, Object> params = new HashMap<>();
                    params.put("user_id", user.getString("ID"));//用户Id
                    params.put("user_name", user.getString("USERID"));//用户名
                    params.put("user_name_cn", user.getString("USERNAME"));//用户名称
                    params.put("user_name_en", null);//员工英文名
                    String xpwd = RegistCodeCript.DecriptData(user.getString("XPWD"));
                    BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
                    params.put("password", bCryptPasswordEncoder.encode(xpwd));//登录密码
                    params.put("email", user.getString("AA010F"));//电子邮箱
                    params.put("phone", user.getString("AA0104"));//手机号码
                    params.put("landline", user.getString("AA0103"));//办公电话
                    params.put("sex", user.getString("AA0107"));//用户性别
                    params.put("avatar", user.getString("ZA9998"));//头像路径
                    params.put("sign", null);//个性签名
                    params.put("tags", null);//用户标签
                    params.put("id_type", user.getString("AE0117"));//证件类型
                    params.put("id_no", user.getString("AA0177"));//证件号码
                    params.put("birthday", StringUtils.isNotEmpty(user.getString("AA0111")) ? sdf_day.format(sdf_day.parse(user.getString("AA0111"))) : null);//用户生日
                    params.put("job_status", "T".equals(user.get("ENABLEFLAG")) ? "1" : "0");//用户状态（0离职,1在职）
                    params.put("hiredate", StringUtils.isNotEmpty(user.getString("AA0144")) ? sdf_day.format(sdf_day.parse(user.getString("AA0144"))) : null);//入职时间
                    params.put("departure_time", StringUtils.isNotEmpty(user.getString("AE0112")) ? sdf_day.format(sdf_day.parse(user.getString("AE0112"))) : null);//离职时间
                    params.put("user_type", "employee");//用户类型（员工）
                    params.put("emp_no", null);//员工工号
                    params.put("access_card_no", user.getString("AA010C"));//门禁卡号
                    params.put("country", null);//国家/地区
                    params.put("province", null);//省
                    params.put("city", null);//市
                    params.put("address", null);//街道地址
                    params.put("work_addr", user.getString("AA010L"));//工作地点（01>总部飞利信大厦  选择楼层 02>非总部 选择省份）
                    params.put("floor", user.getString("AA010M"));//所在楼层
                    params.put("inprovince", user.getString("AA010N"));//所在省份
                    params.put("dept_code", user.getString("DEPTID"));//部门代码
                    String deptname = Convert.toStr(depts.get(user.getString("DEPTID")), "");
                    params.put("dept_name", StringUtils.isNotEmpty(deptname) ? deptname : user.getString("ZA9992_2"));//部门名称
                    params.put("inner_dept_code", null);//内部部门代码
                    params.put("org_code", user.getString("DEPTID"));//机构代码
                    params.put("org_name", StringUtils.isNotEmpty(deptname) ? deptname : user.getString("ZA9992_2"));//机构名称
                    params.put("inner_org_code", null);//内部机构代码
                    String ac0125 = job.get(user.getString("AC0125"));
                    String ac0125Json = null;
                    if(StringUtils.isNotEmpty(ac0125)) {
                        List<String> ac0125List = new ArrayList<>();
                        ac0125List.add(ac0125);
                        ac0125Json = JSONObject.toJSONString(ac0125List);
                    }
                    params.put("posts", ac0125Json);//职位
                    params.put("wx_openid", null);//绑定的微信号
                    params.put("wx_mpopenid", null);//绑定的微信公众号
                    params.put("wx_miniopenid", null);//绑定的微信小程序
                    params.put("wx_unionid", null);//绑定微信UnionID
                    params.put("mobile_imei", null);//绑定的手机串号
                    params.put("device_num", null);//绑定的手机设备号
                    params.put("al_taobao", null);//绑定的淘宝
                    params.put("al_alipay", null);//绑定的支付宝
                    params.put("al_dingding", null);//绑定的钉钉
                    params.put("is_system_user", "1");//是否是系统用户(0否1是)
                    params.put("mgr_type", "0");//管理员类型（0非管理员 1系统管理员）
                    params.put("pwd_security_level", "123456".equals(xpwd) ? "0" : "3");//密码安全级别（0初始 1很弱 2弱 3安全 4很安全）
                    params.put("pwd_update_date", null);//密码最后更新时间
                    params.put("last_login_ip", null);//最后登陆IP
                    params.put("last_login_date", null);//最后登陆时间
                    params.put("freeze_date", null);//冻结时间
                    params.put("freeze_cause", null);//冻结原因
                    params.put("zindex", StringUtils.isNotEmpty(user.getString("ID")) ? user.getString("ID").substring(0, 1).toUpperCase() : "");//索引
                    params.put("wx_msg", "0");//微信消息通知(0否1是)
                    params.put("email_msg", "0");//邮件消息通知(0否1是)
                    params.put("system_msg", "0");//系统消息通知(0否1是)
                    params.put("remarks", user.getString("AA0108"));//备注
                    params.put("status", "T".equals(user.getString("ENABLEFLAG")) ? "1" : "2");//状态（0删除 1正常 2停用 3冻结）
                    params.put("creator", user.getString("ZB9994"));//创建者
                    params.put("create_date", StringUtils.isNotEmpty(user.getString("CREATIONTIME")) ? sdf_day.format(sdf_day.parse(user.getString("CREATIONTIME"))) : null);//创建时间
                    params.put("updater", user.getString("ZB9994"));//更新者
                    params.put("update_date", StringUtils.isNotEmpty(user.getString("ZB9992")) ? sdf_day.format(sdf_day.parse(user.getString("ZB9992"))) : null);//更新时间

                    readerLocalFile(params);
//                    list.add(params);
                }
                /*System.out.println(list);
                String url = HttpUtilsForm.WebconnectURL+CommonConst.WEB_REST_SERVICE_PREFICX+"prouser/insertBatch";
                String charset = HttpUtilsForm.UTF8;
                Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
                paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(list), charset);
                    System.out.println(body);
                } catch (Exception e) {
                    e.printStackTrace();
                }*/
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static String readerMethod(File file) throws IOException {
        FileReader fileReader = new FileReader(file);
        Reader reader = new InputStreamReader(new FileInputStream(file), "Utf-8");
        int ch = 0;
        StringBuffer sb = new StringBuffer();
        while ((ch = reader.read()) != -1) {
            sb.append((char) ch);
        }
        fileReader.close();
        reader.close();
        String jsonStr = sb.toString();
        return jsonStr;
    }

    private static void readerLocalFile(Map<String, Object> map) throws Exception {
        boolean mapflag = false;
        StringBuilder keySb = new StringBuilder("INSERT INTO `pro_user` (");
        StringBuilder valueSb = new StringBuilder(" VALUES (");
        for (Map.Entry<String, Object> stringObjectEntry : map.entrySet()) {
            if(null != stringObjectEntry.getValue()) {
                keySb.append("`").append(stringObjectEntry.getKey()).append("`, ");
                valueSb.append("'").append(stringObjectEntry.getValue()).append("', ");
                mapflag = true;
            }
        }
        if(mapflag) {
            String keyStr = keySb.toString().substring(0, keySb.toString().length() - 2) + ")";
            String valueStr = valueSb.toString().substring(0, valueSb.toString().length() - 2) + ")";
            String sqls = keyStr + valueStr + ";";
            StringToSql(sqls,  "E:\\tmp\\prouser-20230109.sql");
        }
    }

    /**
     * 将生成等String字符串 写进sql文件
     *
     * @param str  String字符串
     * @param path sql文件路径路径
     */
    public static void StringToSql(String str, String path) {
        System.out.println(str);
        byte[] sourceByte = str.getBytes();
        BufferedWriter out = null;
        if (null != sourceByte) {
            try {
                //文件路径（路径+文件名）
                File file = new File(path);
                //文件不存在则创建文件，先创建目录
                if (!file.exists()) {
                    File dir = new File(file.getParent());
                    dir.mkdirs();
                    file.createNewFile();
                }
                out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true)));
                out.write(str + "\r\n");
                System.out.println("生成成功!!");
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                // 关闭文件输出流
                try {
                    if (out != null) {
                        out.close();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
