@@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig { | |||||
} | } | ||||
public static void main(String[] args) { | public static void main(String[] args) { | ||||
generate("Lierbao", "signature", PATH_LXX, "nd_company_signature"); | |||||
generate("Lierbao", "organization", PATH_LXX, "ding_employee_info"); | |||||
} | } | ||||
} | } |
@@ -10,6 +10,7 @@ import com.ningdatech.zwdd.model.Page; | |||||
import com.ningdatech.zwdd.model.query.PageOrganizationEmployeePositionsQuery; | import com.ningdatech.zwdd.model.query.PageOrganizationEmployeePositionsQuery; | ||||
import com.ningdatech.zwdd.model.response.OrganizationEmployeePosition; | import com.ningdatech.zwdd.model.response.OrganizationEmployeePosition; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
@@ -20,6 +21,7 @@ import java.util.List; | |||||
* @date 2023/2/10 上午9:52 | * @date 2023/2/10 上午9:52 | ||||
*/ | */ | ||||
@Component | |||||
public class EmployeeBatchGetTask { | public class EmployeeBatchGetTask { | ||||
private final static Integer PAGE_SIZE = 20; | private final static Integer PAGE_SIZE = 20; | ||||
@@ -48,27 +50,23 @@ public class EmployeeBatchGetTask { | |||||
GenericResult<Page<OrganizationEmployeePosition>> firstPageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | GenericResult<Page<OrganizationEmployeePosition>> firstPageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | ||||
Page<OrganizationEmployeePosition> data = firstPageGenericResult.getData(); | Page<OrganizationEmployeePosition> data = firstPageGenericResult.getData(); | ||||
if (CollUtil.isNotEmpty(data.getData())) { | if (CollUtil.isNotEmpty(data.getData())) { | ||||
allOrganizationEmployeePositionList.addAll(data.getData()); | allOrganizationEmployeePositionList.addAll(data.getData()); | ||||
} | } | ||||
Long totalSize = data.getTotalSize(); | Long totalSize = data.getTotalSize(); | ||||
if (totalSize > PAGE_SIZE) { | if (totalSize > PAGE_SIZE) { | ||||
int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE); | int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE); | ||||
for (pageNo = 2; pageNo <= maxPageNo; pageNo++) { | for (pageNo = 2; pageNo <= maxPageNo; pageNo++) { | ||||
query.setPageNo(maxPageNo); | query.setPageNo(maxPageNo); | ||||
GenericResult<Page<OrganizationEmployeePosition>> pageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | GenericResult<Page<OrganizationEmployeePosition>> pageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | ||||
if (CollUtil.isNotEmpty(pageGenericResult.getData().getData())) { | if (CollUtil.isNotEmpty(pageGenericResult.getData().getData())) { | ||||
allOrganizationEmployeePositionList.addAll(pageGenericResult.getData().getData()); | allOrganizationEmployeePositionList.addAll(pageGenericResult.getData().getData()); | ||||
} | } | ||||
} | } | ||||
} else { | |||||
} | } | ||||
} | } | ||||
// zwddClient.pageOrganizationEmployeePositions(query); | // zwddClient.pageOrganizationEmployeePositions(query); | ||||
@@ -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 { | |||||
} |
@@ -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; | |||||
} |
@@ -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> { | |||||
} |
@@ -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> |
@@ -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> { | |||||
} |
@@ -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 { | |||||
} |