Browse Source

浙政钉员工信息

master
liuxinxin 1 year ago
parent
commit
56d41d84fb
8 changed files with 153 additions and 7 deletions
  1. +1
    -1
      ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java
  2. +4
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java
  3. +20
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingEmployeeInfoController.java
  4. +71
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/entity/DingEmployeeInfo.java
  5. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.java
  6. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.xml
  7. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingEmployeeInfoService.java
  8. +20
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingEmployeeInfoServiceImpl.java

+ 1
- 1
ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java View File

@@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig {
}

public static void main(String[] args) {
generate("Lierbao", "signature", PATH_LXX, "nd_company_signature");
generate("Lierbao", "organization", PATH_LXX, "ding_employee_info");
}

}

+ 4
- 6
pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java View File

@@ -10,6 +10,7 @@ import com.ningdatech.zwdd.model.Page;
import com.ningdatech.zwdd.model.query.PageOrganizationEmployeePositionsQuery;
import com.ningdatech.zwdd.model.response.OrganizationEmployeePosition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
@@ -20,6 +21,7 @@ import java.util.List;
* @date 2023/2/10 上午9:52
*/

@Component
public class EmployeeBatchGetTask {

private final static Integer PAGE_SIZE = 20;
@@ -48,27 +50,23 @@ public class EmployeeBatchGetTask {

GenericResult<Page<OrganizationEmployeePosition>> firstPageGenericResult = zwddClient.pageOrganizationEmployeePositions(query);
Page<OrganizationEmployeePosition> data = firstPageGenericResult.getData();

if (CollUtil.isNotEmpty(data.getData())) {
allOrganizationEmployeePositionList.addAll(data.getData());
}

Long totalSize = data.getTotalSize();
if (totalSize > PAGE_SIZE) {
int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE);
for (pageNo = 2; pageNo <= maxPageNo; pageNo++) {
query.setPageNo(maxPageNo);
GenericResult<Page<OrganizationEmployeePosition>> pageGenericResult = zwddClient.pageOrganizationEmployeePositions(query);

if (CollUtil.isNotEmpty(pageGenericResult.getData().getData())) {
allOrganizationEmployeePositionList.addAll(pageGenericResult.getData().getData());

}
}
} else {

}



}

// zwddClient.pageOrganizationEmployeePositions(query);


+ 20
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingEmployeeInfoController.java View File

@@ -0,0 +1,20 @@
package com.ningdatech.pmapi.organization.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
* <p>
* 前端控制器
* </p>
*
* @author Lierbao
* @since 2023-02-11
*/
@Controller
@RequestMapping("/pmapi.organization/ding-employee-info")
public class DingEmployeeInfoController {

}

+ 71
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/entity/DingEmployeeInfo.java View File

@@ -0,0 +1,71 @@
package com.ningdatech.pmapi.organization.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
*
* </p>
*
* @author Lierbao
* @since 2023-02-11
*/
@TableName("ding_employee_info")
@Data
@ApiModel(value = "DingEmployeeInfo对象", description = "")
public class DingEmployeeInfo implements Serializable {

private static final long serialVersionUID = 1L;

private Long id;

private LocalDateTime createOn;

private LocalDateTime updateOn;

private Long createBy;

private Long updateBy;

private String emplyeeName;

private String gmtCreate;

private String empGender;

private String empPoliticalStatusCode;

private String empJobLevelCode;

private String empBudgetedPostCode;

private String status;

private String posJobRankCode;

private String orderInOrganization;

private String mainJob;

private String empPosUnitCode;

private String empPosEmployeeRoleCode;

private String empPosInnerInstitutionCode;

private String employeeCode;

private String jobAttributesCode;

private String organizationCode;

private String empPosVirtualOrganizationCode;

private String empStatus;

}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.java View File

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.organization.mapper;

import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* <p>
* Mapper 接口
* </p>
*
* @author Lierbao
* @since 2023-02-11
*/
public interface DingEmployeeInfoMapper extends BaseMapper<DingEmployeeInfo> {

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.xml View File

@@ -0,0 +1,5 @@
<?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="com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper">

</mapper>

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingEmployeeInfoService.java View File

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.organization.service;

import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* <p>
* 服务类
* </p>
*
* @author Lierbao
* @since 2023-02-11
*/
public interface IDingEmployeeInfoService extends IService<DingEmployeeInfo> {

}

+ 20
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingEmployeeInfoServiceImpl.java View File

@@ -0,0 +1,20 @@
package com.ningdatech.pmapi.organization.service.impl;

import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper;
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author Lierbao
* @since 2023-02-11
*/
@Service
public class DingEmployeeInfoServiceImpl extends ServiceImpl<DingEmployeeInfoMapper, DingEmployeeInfo> implements IDingEmployeeInfoService {

}

Loading…
Cancel
Save