LG88888888 3 年 前
コミット
119affcfbf

+ 2 - 1
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/attendance/mapper/xml/AttendanceMapper.xml

@@ -67,7 +67,8 @@ where 1=1
     <select id="getOneWork" resultType="java.util.Map">
         select *from bd_work_overtime where 1=1
 <if test="date!=null and ''!=date">
-    and date_format(begin_date,'%Y-%m-%d')>=#{date}  and date_format(end_date,'%Y-%m-%d')&lt;=#{date}</if>
+    and  date_format(begin_date,'%Y-%m-%d')= date_format(#{date},'%Y-%m-%d')
+   </if>
 <if test="userId!=null and ''!=userId">
     and person=#{userId}
 </if>

+ 0 - 1
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/attendance/service/impl/AttendanceServiceImpl.java

@@ -91,7 +91,6 @@ public class AttendanceServiceImpl extends ServiceImpl<AttendanceMapper, Attenda
                         if (hou.size() < 1) {
                             if (ae.get(0).getUsDate().getTime() > sd.parse(sdf.format(ae.get(0).getUsDate()) + " " + oneUserShift.get(oneUserShift.size() - 1).get("endDate").toString()).getTime()) {
                                 ae.get(0).setExceptionType("");
-                                ;
                                 b = true;
                             }
                         }

+ 167 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/userquit/controller/UserQuitController.java

@@ -0,0 +1,167 @@
+package org.jeecg.modules.geke.userquit.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.geke.userquit.entity.UserQuit;
+import org.jeecg.modules.geke.userquit.service.IUserQuitService;
+import java.util.Date;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * @Description: 入职,离职信息
+ * @Author: jeecg-boot
+ * @Date:   2021-12-27
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="入职,离职信息")
+@RestController
+@RequestMapping("/userquit/userQuit")
+public class UserQuitController extends JeecgController<UserQuit, IUserQuitService> {
+	@Autowired
+	private IUserQuitService userQuitService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param userQuit
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-分页列表查询")
+	@ApiOperation(value="入职,离职信息-分页列表查询", notes="入职,离职信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(UserQuit userQuit,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<UserQuit> queryWrapper = QueryGenerator.initQueryWrapper(userQuit, req.getParameterMap());
+		Page<UserQuit> page = new Page<UserQuit>(pageNo, pageSize);
+		IPage<UserQuit> pageList = userQuitService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param userQuit
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-添加")
+	@ApiOperation(value="入职,离职信息-添加", notes="入职,离职信息-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody UserQuit userQuit) {
+		userQuitService.save(userQuit);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param userQuit
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-编辑")
+	@ApiOperation(value="入职,离职信息-编辑", notes="入职,离职信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<?> edit(@RequestBody UserQuit userQuit) {
+		userQuitService.updateById(userQuit);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-通过id删除")
+	@ApiOperation(value="入职,离职信息-通过id删除", notes="入职,离职信息-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		userQuitService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-批量删除")
+	@ApiOperation(value="入职,离职信息-批量删除", notes="入职,离职信息-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.userQuitService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "入职,离职信息-通过id查询")
+	@ApiOperation(value="入职,离职信息-通过id查询", notes="入职,离职信息-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
+		UserQuit userQuit = userQuitService.getById(id);
+		return Result.OK(userQuit);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param userQuit
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, UserQuit userQuit) {
+      return super.exportXls(request, userQuit, UserQuit.class, "入职,离职信息");
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      return super.importExcel(request, response, UserQuit.class);
+  }
+
+}

+ 94 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/userquit/entity/UserQuit.java

@@ -0,0 +1,94 @@
+package org.jeecg.modules.geke.userquit.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 入职,离职信息
+ * @Author: jeecg-boot
+ * @Date:   2021-12-27
+ * @Version: V1.0
+ */
+@Data
+@TableName("geke_user_quit")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="geke_user_quit对象", description="入职,离职信息")
+public class UserQuit {
+    
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+	private java.lang.String id;
+	/**spNo*/
+	@Excel(name = "spNo", width = 15)
+    @ApiModelProperty(value = "spNo")
+	private java.lang.String spNo;
+	/**spName*/
+	@Excel(name = "spName", width = 15)
+    @ApiModelProperty(value = "spName")
+	private java.lang.String spName;
+	/**applyTime*/
+	@Excel(name = "applyTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "applyTime")
+	private java.util.Date applyTime;
+	/**userId*/
+	@Excel(name = "userId", width = 15)
+    @ApiModelProperty(value = "userId")
+	private java.lang.String userId;
+	/**userName*/
+	@Excel(name = "userName", width = 15)
+    @ApiModelProperty(value = "userName")
+	private java.lang.String userName;
+	/**dept*/
+	@Excel(name = "dept", width = 15)
+    @ApiModelProperty(value = "dept")
+	private java.lang.String dept;
+	/**deptId*/
+	@Excel(name = "deptId", width = 15)
+    @ApiModelProperty(value = "deptId")
+	private java.lang.String deptId;
+	/**startDate*/
+	@Excel(name = "startDate", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "startDate")
+	private java.util.Date startDate;
+	/**endDate*/
+	@Excel(name = "endDate", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "endDate")
+	private java.util.Date endDate;
+	/**workDate*/
+	@Excel(name = "workDate", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "workDate")
+	private java.util.Date workDate;
+	/**zzDate*/
+	@Excel(name = "zzDate", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty(value = "zzDate")
+	private java.util.Date zzDate;
+
+	/**remarks*/
+	@Excel(name = "remarks", width = 15)
+	@ApiModelProperty(value = "remarks")
+	private java.lang.String remarks;
+}

+ 18 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/userquit/mapper/UserQuitMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.geke.userquit.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.geke.userquit.entity.UserQuit;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 入职,离职信息
+ * @Author: jeecg-boot
+ * @Date:   2021-12-27
+ * @Version: V1.0
+ */
+public interface UserQuitMapper extends BaseMapper<UserQuit> {
+    int deleteDate(@Param("startDate")String startDate,@Param("endDate")String endDate);
+
+}

+ 11 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/userquit/mapper/xml/UserQuitMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.geke.userquit.mapper.UserQuitMapper">
+
+    <delete id="deleteDate">
+        delete from geke_user_quit where 1=1
+        <if test="startDate!=null and ''!=startDate and endDate!=null and ''!=endDate">
+            and date_format(apply_time,'%Y-%m-%d') between date_format(#{startDate},'%Y-%m-%d') and date_format(#{endDate},'%Y-%m-%d')
+        </if>
+    </delete>
+</mapper>

+ 18 - 0
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/userquit/service/IUserQuitService.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.geke.userquit.service;
+
+import org.jeecg.modules.geke.userquit.entity.UserQuit;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 入职,离职信息
+ * @Author: jeecg-boot
+ * @Date:   2021-12-27
+ * @Version: V1.0
+ */
+public interface IUserQuitService extends IService<UserQuit> {
+    int deleteQuit(String startDate,String  endDate);
+    boolean saveQuits(List<UserQuit>list);
+
+}

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/UserQuitJob.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.quartz.job;
+
+import lombok.SneakyThrows;
+import org.jeecg.modules.system.service.IWeixinUserService;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 微信同步入职,转正,离职数据到平台
+ */
+public class UserQuitJob implements Job {
+    @Autowired
+    IWeixinUserService weixinUserService;
+
+
+    @SneakyThrows
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+        System.out.println("=======================开始执行======================");
+                weixinUserService.WeixinQuit();
+        System.out.println("=======================执行完成======================");
+
+    }
+
+}

+ 2 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IWeixinUserService.java

@@ -42,5 +42,6 @@ public interface IWeixinUserService {
         //同步工资到平台
         public Map<String,Object>SalaryByU8() throws OpenAPIException, IOException, ParseException;
 
-
+        //微信入职,转正,离职信息
+        public Map<String, Object> WeixinQuit() throws IOException, ParseException;
 }

+ 164 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/WeixinUserImpl.java

@@ -19,6 +19,8 @@ import org.jeecg.modules.geke.attendance.entity.Attendance;
 import org.jeecg.modules.geke.attendance.service.IAttendanceService;
 import org.jeecg.modules.geke.salary.entity.Salary;
 import org.jeecg.modules.geke.salary.service.ISalaryService;
+import org.jeecg.modules.geke.userquit.entity.UserQuit;
+import org.jeecg.modules.geke.userquit.service.IUserQuitService;
 import org.jeecg.modules.geke.vacation.entity.Vacation;
 import org.jeecg.modules.geke.vacation.mapper.VacationMapper;
 import org.jeecg.modules.geke.vacation.service.IVacationService;
@@ -90,6 +92,10 @@ public class WeixinUserImpl implements IWeixinUserService{
     @Autowired
     private RedisUtil redisUtil;
 
+    @Autowired
+    private IUserQuitService userQuitService;
+
+
     private DepartmentService departmentService=new DepartmentService();
 
 
@@ -144,6 +150,7 @@ public class WeixinUserImpl implements IWeixinUserService{
         String depids="";
         SysUser sysUser = new SysUser();
         String b="ok";
+        ObjectMapper mapper=new ObjectMapper();
         try {
             sysUser.setId(ls.getUserid());
             sysUser.setRealname(ls.getName());
@@ -153,6 +160,19 @@ public class WeixinUserImpl implements IWeixinUserService{
             }if (ls.getMobile()!=null&&!ls.getMobile().equals("")) {
                 sysUser.setPhone(ls.getMobile());
             }
+            Map map=(Map)ls.getExtattr();
+            List<Map<String,Object>> list = (List)map.get("attrs");
+            String workNo=null;
+            if (list.size()>0&&list!=null){
+                for (Map o:list){
+                    if (o.get("name").equals("工号")){
+                        if (!o.get("value").equals("")&&o.get("value")!=null) {
+                            workNo = o.get("value").toString();
+                        }
+                    }
+                }
+            }
+
             sysUser.setDelFlag(Integer.parseInt(CommonConstant.DEL_FLAG_0.toString()));
             sysUser.setStatus(1);
             sysUser.setCreateTime(new Date());
@@ -187,7 +207,7 @@ public class WeixinUserImpl implements IWeixinUserService{
             }
             sysUser.setCode(ls.getUserid());
             sysUser.setUsername(ls.getUserid());
-            sysUser.setWorkNo(ls.getUserid());
+            sysUser.setWorkNo(workNo);
             sysUser.setDepartIds(depids);
             Boolean add = sysUserService.add(sysUser,sysUserRole);
         }catch (Exception e){
@@ -309,6 +329,10 @@ public class WeixinUserImpl implements IWeixinUserService{
         String msg="ok";
         UrlData.getToken();
         Map<String, Object> map = Maps.newHashMap();
+        Map<String,Object>m=new HashMap<>();
+        Map<String,Object>ms=new HashMap<>();
+        List<Map<String,Object>>lstm=new ArrayList<>();
+        Map<String,Object>pm=new HashMap<>();
         try{
             SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
             Map<String, Object> params = Maps.newHashMap();
@@ -343,7 +367,17 @@ public class WeixinUserImpl implements IWeixinUserService{
             params.put("telephone", ls.getTelephone());
             params.put("enable", ls.getStatus());
             params.put("is_leader_in_dept", idents);
+            pm.put("value",ls.getWorkNo());
+            m.put("type",0);
+            m.put("name","工号");
+            m.put("text",pm);
+            m.put("value",ls.getWorkNo());
+            lstm.add(m);
+            ms.put("attrs",lstm);
+            params.put("extattr",ms);
+                    System.out.println(JSONObject.toJSONString(params));
             String s = WeixinUser(params);
+
             idents=new ArrayList<>();
                 }
             }
@@ -595,6 +629,48 @@ public class WeixinUserImpl implements IWeixinUserService{
         return null;
     }
 
+
+    /**
+     * 入职,转正,离职信息
+     * @return
+     */
+    @Override
+    public Map<String, Object> WeixinQuit() throws IOException, ParseException {
+        Map<String,Object>map=new HashMap<>();
+        UrlData.getVacationToken();
+        UrlData.getToken();
+        String msg="ok";
+        List<UserQuit>lst=new ArrayList<>();
+        Calendar calendar = Calendar.getInstance();//获取系统时间实列
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");//日期格式化
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);//获取前端传过来的时间获取月份的总天数
+        String sDate = "";
+        String eDate = "";
+        Date stDate = null;
+        Date enDate = null;
+        long startDate;
+        long endDate;
+        sDate = simpleDateFormat.format(new Date()) + "-01 00:00:00";
+        eDate = simpleDateFormat.format(new Date()) + "-" + actualMaximum + " 23:59:59";
+        stDate = sdf.parse(sDate);
+        enDate = sdf.parse(eDate);
+        startDate = stDate.getTime() / 1000;
+        endDate = enDate.getTime() / 1000;
+        List<String> list = WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),null);
+        userQuitService.deleteQuit(sDate,eDate);
+        for (String ls:list){//循环审批id
+            UserQuit quit = WeixinUserQuit(ls);
+            if (quit!=null){
+                lst.add(quit);
+            }
+        }
+        if (lst.size()>0){
+            userQuitService.saveQuits(lst);
+        }
+        return null;
+    }
+
     /**
      * 获取微信审批实列id
      * @param startDate
@@ -785,6 +861,91 @@ public class WeixinUserImpl implements IWeixinUserService{
         }
         return work;
     }
+
+
+
+    /**
+     * 获取微信审批实列-入职,转正,离职信息
+     * @param ls
+     * @return
+     * @throws IOException
+     */
+    public UserQuit WeixinUserQuit(String ls) throws IOException {
+        Map<String, Object> headers = Maps.newHashMap();//请求头集合
+        headers.put("Content-Type", "application/json; charset=utf-8");
+        ObjectMapper mapper = new ObjectMapper();//json转换实列
+        Map<String, Object> params = Maps.newHashMap();
+        UserQuit quit=null;
+        String errcode = "";
+        Map mapTypes = null;
+        try {
+            String createUrl = "https://qyapi.weixin.qq.com/cgi-bin/oa/getapprovaldetail?access_token=" + UrlData.VacationToken;//调用企业微信审批详情接口
+            params.put("sp_no", ls);//审批id参数
+            String res = MyHttpUtils.httpPostRequestWithJson(createUrl, headers, params);//发送请求
+            mapTypes = JSON.parseObject(res);//json格式转换为map集合
+            errcode = mapTypes.get("errcode").toString();//获取接口返回的状态码
+            if (errcode.equals("0")) {//判断接口是否请求成功
+                WeixinApproval weixinApproval = JSONArray.parseObject(mapTypes.get("info").toString(), WeixinApproval.class);//字符串转实体类
+                if (weixinApproval != null && weixinApproval.getSp_status().equals("2")) {//获取数据库字段所需的数据
+                    if (weixinApproval.getSp_name().equals("入职") || weixinApproval.getSp_name().equals("转正") || weixinApproval.getSp_name().equals("离职")) {
+                        quit = new UserQuit();
+                        quit.setSpNo(weixinApproval.getSp_no());
+                        quit.setSpName(weixinApproval.getSp_name());
+                        String us = weixinApproval.getApplyer().toString();
+                        mapTypes = JSON.parseObject(us);
+                        quit.setUserId(mapTypes.get("userid").toString());
+                        quit.setDeptId(mapTypes.get("partyid").toString());
+                        quit.setApplyTime(new Date(Long.valueOf(weixinApproval.getApply_time()) * 1000));
+                        List<Object> apply_data = weixinApproval.getApply_data();
+                        String o = apply_data.get(0).toString();
+                        mapTypes = JSON.parseObject(o);
+                        String contents = mapTypes.get("contents").toString();
+                        List<Map<String, Object>> tl = mapper.readValue(contents, new TypeReference<List<Map<String, Object>>>() {
+                        });
+                        Map value = null;
+                        Map types = null;
+                        if (weixinApproval.getSp_name().equals("离职") || weixinApproval.getSp_name().equals("转正")) {
+                            for (Map ll : tl) {
+                                Object s = ll.get("control");
+                                types = (Map) ll;
+                                if (s.equals("Date")) {
+                                    List<Map<String, Object>> tt = (List<Map<String, Object>>) types.get("title");
+                                    for (Map m : tt) {
+                                        types = (Map) ll.get("value");
+                                        types = (Map) types.get("date");
+                                        if (m.get("text").equals("入职日期")) {
+                                            if (!types.get("s_timestamp").equals("") && types.get("s_timestamp") != null) {
+                                                quit.setWorkDate(new Date(Long.valueOf(types.get("s_timestamp").toString()) * 1000));
+                                            }
+
+                                        } else if (m.get("text").equals("申请离职日期")) {
+                                            if (!types.get("s_timestamp").equals("") && types.get("s_timestamp") != null) {
+                                                quit.setStartDate(new Date(Long.valueOf(types.get("s_timestamp").toString()) * 1000));
+                                            }
+                                        } else if (m.get("text").equals("预计离职日期")) {
+                                            if (!types.get("s_timestamp").equals("") && types.get("s_timestamp") != null) {
+                                                quit.setEndDate(new Date(Long.valueOf(types.get("s_timestamp").toString()) * 1000));
+                                            }
+                                        } else if (m.get("text").equals("转正日期")) {
+                                            if (!types.get("s_timestamp").equals("") && types.get("s_timestamp") != null) {
+                                                quit.setZzDate(new Date(Long.valueOf(types.get("s_timestamp").toString()) * 1000));
+                                            }
+                                        }
+                                    }
+                                } else if (s.equals("Textarea")) {
+                                    types = (Map) types.get("value");
+                                    quit.setRemarks(types.get("text").toString());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return quit;
+    }
     @Override
     public Map<String, Object> synchronizationVacation() throws ParseException, IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {
       Map<String,Object>map=new HashMap<>();
@@ -859,7 +1020,6 @@ public class WeixinUserImpl implements IWeixinUserService{
                     if (!s1.equals("0")){
                         msg=s1;
                     }
-                System.out.println("编码:"+depart.getOrgCode()+"名称:"+depart.getDepartName());
             }
         }
 
@@ -915,9 +1075,11 @@ public class WeixinUserImpl implements IWeixinUserService{
                     if (!depart.getId().equals("1")){
                         map.put("cdept_num",depart.getOrgCode());
                         map.put("cdept_name", depart.getDepartName());
+                      //  map.put("cdepcode",depart.getOrgCode());
                         break;
                     }
                 }
+               // map.put("bpsnperson","1");
                 map.put("code", ls.getWorkNo());
                 map.put("name", ls.getRealname());
                     map.put("rsex", ls.getSex());