diff --git a/jcl-hrmorganization/build.gradle b/jcl-hrmorganization/build.gradle index 95578ff..7c25b32 100644 --- a/jcl-hrmorganization/build.gradle +++ b/jcl-hrmorganization/build.gradle @@ -43,17 +43,20 @@ configure(allprojects) { project -> if (!ignoredProjectNames.contains(project.name)) { dependencies { // implementation group: 'junit', name: 'junit', version: '4.12' - // compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.20' - // annotationProcessor 'org.projectlombok:lombok:1.18.20' + compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.20' + annotationProcessor 'org.projectlombok:lombok:1.18.20' // implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1' // 添加二开服务拉取的清单依赖 + def includeType = ['**/*.jar', '**/*.class'] implementation files(rootProject.projectDir.getPath() + "/secDevClasses") implementation fileTree(dir: rootProject.projectDir.getPath() + '/secDevLib', includes: includeType) // 项目二开自定义依赖 implementation files(rootProject.projectDir.getPath() + "/devLibClasses") implementation fileTree(dir: rootProject.projectDir.getPath() + "/devLib", includes: includeType) + // implementation 'org.projectlombok:lombok:1.18.12' + //compileOnly 'org.projectlombok:lombok:1.18.12' } } diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/secondev-jcl-hrmorganization.gradle b/jcl-hrmorganization/secondev-jcl-hrmorganization/secondev-jcl-hrmorganization.gradle index 92394fc..058a4fe 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/secondev-jcl-hrmorganization.gradle +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/secondev-jcl-hrmorganization.gradle @@ -3,4 +3,6 @@ description = "" dependencies { // 子项目私有依赖添加 + compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.20' + annotationProcessor 'org.projectlombok:lombok:1.18.20' } \ No newline at end of file diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/EmployeeInformationController.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/EmployeeInformationController.java new file mode 100644 index 0000000..380e7f1 --- /dev/null +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/EmployeeInformationController.java @@ -0,0 +1,47 @@ +package com.weaver.seconddev.jcl.organization.controller; + + +import com.weaver.common.authority.annotation.WeaPermission; +import com.weaver.seconddev.jcl.organization.entity.Employee; +import com.weaver.seconddev.jcl.organization.service.EmployeeInformationService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Author: liuliang + * @Description: 员工信息管理界面 + * @Date: 2025/03/17 + **/ + + +@Slf4j +@RestController +@RequestMapping("/api/secondev/jcl/employeeInformation") +public class EmployeeInformationController { + + @Autowired + private EmployeeInformationService employeeInformationService; + + /** + * 查询结果回写数据 + * @return + */ + @WeaPermission(publicPermission = true) + @Produces(MediaType.APPLICATION_JSON) + @PostMapping("/getInformation") + public Map getInformation(@RequestBody Employee employee){ + log.info("getInformation Employee:[{}]",employee); + Map actionMap = new HashMap<>(); + List> resultList = employeeInformationService.getInformation(employee); + actionMap.put("resultList",resultList); + + return actionMap; + } +} diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/entity/Employee.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/entity/Employee.java new file mode 100644 index 0000000..8279630 --- /dev/null +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/entity/Employee.java @@ -0,0 +1,50 @@ +package com.weaver.seconddev.jcl.organization.entity; + + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * uf_jcl_employee_information + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Employee { + + /** + * 姓名 + */ + private String xm; + /** + * 员工状态 + */ + private String ygzt; + /** + * 入职日期 + */ + private String rzrq; + /** + *手机 + */ + private String sj_woiy; + /** + *邮箱 + */ + private String yx_gvex; + /** + *身份证 + */ + private String sfz_1mhf; + /** + *所属部门 + */ + private String ssbm; + /** + *所属公司 + */ + private String ssgs; +} diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/EmployeeInformationService.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/EmployeeInformationService.java new file mode 100644 index 0000000..22e066c --- /dev/null +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/EmployeeInformationService.java @@ -0,0 +1,12 @@ +package com.weaver.seconddev.jcl.organization.service; + +import com.weaver.seconddev.jcl.organization.entity.Employee; + +import java.util.List; +import java.util.Map; + +public interface EmployeeInformationService { + + List> getInformation(Employee employee); + +} diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java new file mode 100644 index 0000000..1e81e05 --- /dev/null +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java @@ -0,0 +1,41 @@ +package com.weaver.seconddev.jcl.organization.service.impl; + +import com.google.common.collect.Lists; +import com.weaver.seconddev.jcl.organization.entity.Employee; +import com.weaver.seconddev.jcl.organization.service.EmployeeInformationService; +import com.weaver.seconddev.jcl.organization.util.DatabaseUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Service +public class EmployeeInformationServiceImpl implements EmployeeInformationService { + + @Autowired + private DatabaseUtils databaseUtils; + + + @Override + public List> getInformation(Employee employee) { + + String sql = "select * from uf_jcl_employee_information where 1=1"; + List paramList = Lists.newArrayList(); + if (employee.getSj_woiy() != null){ + sql = sql+ " and sj_woiy=?"; + paramList.add(employee.getSj_woiy()); + }else if (employee.getYx_gvex() != null){ + sql = sql+ " and yx_gvex=?"; + paramList.add(employee.getYx_gvex()); + }else if (employee.getSfz_1mhf() != null){ + sql = sql+ " and sfz_1mhf=?"; + paramList.add(employee.getSfz_1mhf()); + } + + List> recordList = databaseUtils.getSqlList("LOGIC", "weaver-ebuilder-form-service",sql,paramList); + + + return recordList; + } +}