Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
|
8e93e13ed5 | 3 weeks ago |
|
8cd457bcf6 | 3 weeks ago |
|
a7a00a5a83 | 1 month ago |
|
b601ed8f09 | 2 months ago |
|
70d69fb039 | 2 months ago |
|
7faf9eb4af | 2 months ago |
|
ea6eb3c355 | 2 months ago |
|
92ceea58dc | 3 months ago |
|
0c0226d62d | 3 months ago |
|
2118b56a94 | 3 months ago |
|
fc1e776611 | 3 months ago |
|
a23e01ab92 | 3 months ago |
|
93ee7661b5 | 3 months ago |
|
671df80a9c | 3 months ago |
|
ddb6e038a2 | 3 months ago |
|
20bb581122 | 3 months ago |
@ -0,0 +1,5 @@
|
|||||||
|
#\u4EBA\u5458\u4EFB\u804C\u8BB0\u5F55\u8868
|
||||||
|
eModeId=336
|
||||||
|
|
||||||
|
#\u65F6\u70B9\u529F\u80FD\u542F\u7528\u65E5\u671F
|
||||||
|
startDate=
|
@ -0,0 +1,144 @@
|
|||||||
|
####### \u57FA\u672C\u4FE1\u606F ###########
|
||||||
|
#\u5458\u5DE5\u7C7B\u522B
|
||||||
|
workPeopleType=field1
|
||||||
|
#\u5728\u5C97\u72B6\u6001
|
||||||
|
workStatus=field2
|
||||||
|
#\u653F\u6CBB\u9762\u8C8C
|
||||||
|
policy=field3
|
||||||
|
#\u5EA7\u673A\u53F7\u7801
|
||||||
|
landNumber=field6
|
||||||
|
#\u529E\u516C\u90AE\u7BB1
|
||||||
|
officeEmail=field7
|
||||||
|
#\u804C\u52A1(\u65B0)
|
||||||
|
position=field58
|
||||||
|
#\u4EBA\u5458\u7C7B\u522B
|
||||||
|
personType=field63
|
||||||
|
#\u5C97\u4F4D\u65B0
|
||||||
|
jobTitle=field69
|
||||||
|
|
||||||
|
####### \u4E2A\u4EBA\u4FE1\u606F ###########
|
||||||
|
#\u5E74\u9F84
|
||||||
|
age=field9
|
||||||
|
#\u6C11\u65CF
|
||||||
|
nation=field59
|
||||||
|
#\u51FA\u751F\u5730
|
||||||
|
birthplace=field38
|
||||||
|
#\u6237\u7C4D\u5730\u5740
|
||||||
|
residenceAddress=field39
|
||||||
|
#\u73B0\u901A\u8BAF\u5730\u5740
|
||||||
|
currentAddress=field40
|
||||||
|
#\u6237\u53E3\u7C7B\u522B
|
||||||
|
residenceType=field10
|
||||||
|
#\u5A5A\u59FB\u72B6\u51B5\u65B0
|
||||||
|
maritalStatus=field60
|
||||||
|
#\u9886\u8BC1\u65F6\u95F4
|
||||||
|
marryDate=field41
|
||||||
|
#\u5B97\u6559\u4FE1\u4EF0
|
||||||
|
religious=field11
|
||||||
|
#\u5165\u56E2\u65F6\u95F4
|
||||||
|
joinLeagueDate=field12
|
||||||
|
#\u53C2\u52A0\u515A\u6D3E\u65F6\u95F4
|
||||||
|
joinPartyDate=field42
|
||||||
|
#\u8054\u7CFB\u4F4F\u5740
|
||||||
|
contactAddress=field4
|
||||||
|
#\u79FB\u52A8\u7535\u8BDD
|
||||||
|
mobile=field7
|
||||||
|
#\u4E2A\u4EBA\u90AE\u7BB1
|
||||||
|
email=field5
|
||||||
|
#\u7D27\u6025\u8054\u7CFB\u4EBA\u59D3\u540D
|
||||||
|
emergencyName=field6
|
||||||
|
#\u7D27\u6025\u8054\u7CFB\u4EBA\u5173\u7CFB
|
||||||
|
emergencyType=field13
|
||||||
|
#\u7D27\u6025\u8054\u7CFB\u4EBA\u7535\u8BDD
|
||||||
|
emergencyPhone=field14
|
||||||
|
#\u6700\u9AD8\u5B66\u5386
|
||||||
|
highEducation=field43
|
||||||
|
#\u6700\u9AD8\u5B66\u4F4D
|
||||||
|
highDegree=field44
|
||||||
|
#\u6700\u9AD8\u5B66\u5386/\u5B66\u4F4D\u4E13\u4E1A
|
||||||
|
highMajor=field15
|
||||||
|
#\u6BD5\u4E1A\u9662\u6821\u7C7B\u578B
|
||||||
|
schollType=field16
|
||||||
|
#\u4E13\u4E1A\u6280\u672F\u8D44\u683C\u540D\u79F0
|
||||||
|
jobCall=field45
|
||||||
|
#\u6700\u9AD8\u5B66\u5386\uFF08\u5B66\u4F4D\uFF09\u6BD5\u4E1A\u5B66\u6821
|
||||||
|
schoolName=field46
|
||||||
|
|
||||||
|
####### \u5DE5\u4F5C\u4FE1\u606F ###########
|
||||||
|
#\u94F6\u884C\u5361\u53F7
|
||||||
|
cardNumber=field4
|
||||||
|
#\u94F6\u884C\u5F00\u6237\u884C\u5168\u79F0
|
||||||
|
bankName=field7
|
||||||
|
#\u676D\u5DDE\u5E02\u9AD8\u5C42\u6B21\u4EBA\u624D\u4FE1\u606F
|
||||||
|
highPersonType=field17
|
||||||
|
#\u4E2A\u4EBA\u8EAB\u4EFD
|
||||||
|
identity=field18
|
||||||
|
#\u6263\u51CF\u793E\u4F1A\u5DE5\u9F84
|
||||||
|
socialWorkYear=field19
|
||||||
|
#\u515A\u5185\u804C\u52A1
|
||||||
|
partyPosition=field14
|
||||||
|
#\u5DE5\u4F1A\u804C\u52A1
|
||||||
|
tradePosition=field15
|
||||||
|
#\u8BD5\u7528\u671F\u5F00\u59CB\u65E5\u671F
|
||||||
|
trialStartDate=field64
|
||||||
|
#\u8BD5\u7528\u671F\u622A\u6B62\u65E5\u671F
|
||||||
|
trialEndDate=field61
|
||||||
|
#\u8F6C\u6B63\u65E5\u671F
|
||||||
|
regularDate=field12
|
||||||
|
#\u9996\u6B21\u53C2\u52A0\u5DE5\u4F5C\u65F6\u95F4
|
||||||
|
workStartDate=field42
|
||||||
|
#\u662F\u5426\u5E94\u5C4A\u751F\u5165\u804C
|
||||||
|
graduatesJoin=field20
|
||||||
|
#\u4E13\u4E1A\u6280\u672F\u8D44\u683C\u7CFB\u5217
|
||||||
|
proTechnical=field21
|
||||||
|
#\u4E13\u4E1A\u6280\u672F\u8D44\u683C\u7EA7\u522B
|
||||||
|
proLevel=field22
|
||||||
|
#\u4E1A\u52A1\u804C\u52A1\u5E8F\u5217
|
||||||
|
postionType=field65
|
||||||
|
#\u4E1A\u52A1\u804C\u52A1\u5C42\u7EA7
|
||||||
|
postion=field67
|
||||||
|
#\u6D3E\u9A7B\u8D77\u59CB\u65F6\u95F4
|
||||||
|
beStartDate=field41
|
||||||
|
#\u6D3E\u9A7B\u7EC8\u6B62\u65F6\u95F4
|
||||||
|
beEndDate=field47
|
||||||
|
#\u52B3\u52A8\u5173\u7CFB\u6240\u5C5E\u5355\u4F4D
|
||||||
|
belongUnit=field37
|
||||||
|
#\u5B9E\u4E60\u5F00\u59CB\u65E5\u671F
|
||||||
|
interStartDate=field48
|
||||||
|
#\u6D3E\u9A7B\u4EBA\u5458\u6240\u5C5E\u5355\u4F4D\u62C5\u4EFB\u804C\u52A1/\u5C97\u4F4D
|
||||||
|
beJob=field38
|
||||||
|
#\u5B9E\u4E60\u5230\u671F\u65E5\u671F
|
||||||
|
interEndDate=field49
|
||||||
|
#\u5B9E\u4E60\u6700\u540E\u5DE5\u4F5C\u65E5
|
||||||
|
interLastDay=field50
|
||||||
|
#\u5728\u8BFB\u5B66\u5386
|
||||||
|
onDegree=field62
|
||||||
|
#\u5728\u8BFB\u4E13\u4E1A
|
||||||
|
onMajor=field40
|
||||||
|
#\u5728\u8BFB\u9662\u6821\u7C7B\u578B
|
||||||
|
onSchollType=field51
|
||||||
|
#\u5728\u8BFB\u9662\u6821
|
||||||
|
onSchollName=field46
|
||||||
|
#\u6D89\u5BC6\u7B49\u7EA7
|
||||||
|
classifiedLevel=field52
|
||||||
|
#\u52A0\u5165\u5F53\u524D\u90E8\u95E8\u65F6\u95F4
|
||||||
|
joinDeptDate=field53
|
||||||
|
#\u52A0\u5165\u5F53\u524D\u5C97\u4F4D\u65F6\u95F4
|
||||||
|
joinJobDate=field54
|
||||||
|
#\u5C97\u4F4D\u7C7B\u522B
|
||||||
|
jobType=field55
|
||||||
|
#\u804C\u4E1A\u6280\u80FD\u7B49\u7EA7
|
||||||
|
skillLevel=field56
|
||||||
|
#\u6240\u5C5E\u73ED\u7EC4
|
||||||
|
belongTeam=field5
|
||||||
|
#\u662F\u5426\u4E3A\u73ED\u7EC4\u957F
|
||||||
|
teamLeader=field57
|
||||||
|
#\u9489\u9489id
|
||||||
|
dingId=field68
|
||||||
|
|
||||||
|
|
||||||
|
#\u4EBA\u5458\u5FEB\u7167\u5EFA\u6A21\u8868modeId
|
||||||
|
modeId=77
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.api.jclproduct.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 11:06 AM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Path("/jclproduct/report")
|
||||||
|
public class EmployeeRecordReportAction extends com.engine.jclproduct.web.EmployeeRecordReportAction{
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.api.jclproduct.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 4:12 PM
|
||||||
|
* @Description: 人员任职记录
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Path("/jclproduct/employee")
|
||||||
|
public class EmploymentRecordAction extends com.engine.jclproduct.web.EmploymentRecordAction{
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.api.wysecond.web;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author apple
|
||||||
|
*/
|
||||||
|
@Path("/wy/second/personnelresume")
|
||||||
|
public class PersonnelResumeAction extends com.engine.wysecond.web.PersonnelResumeAction {
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.api.wysecond.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
@Path("/wysecond/postion")
|
||||||
|
public class PostionMatrixAction extends com.engine.wysecond.web.PostionMatrixAction {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.api.wysecond.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/3/6 11:32
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Path("/wysecond/resourceCard")
|
||||||
|
public class ResourceCardAction extends com.engine.wysecond.web.ResourceCardAction{
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.engine.jclproduct.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 1:48 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.ANNOTATION_TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface CheckboxPopedom {
|
||||||
|
|
||||||
|
String id() default "";
|
||||||
|
|
||||||
|
String showmethod() default "";
|
||||||
|
|
||||||
|
String popedompara() default "";
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.engine.jclproduct.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 1:48 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.ANNOTATION_TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface OperatePopedom {
|
||||||
|
|
||||||
|
boolean async() default true;
|
||||||
|
|
||||||
|
String transmethod() default "";
|
||||||
|
|
||||||
|
String otherpara() default "";
|
||||||
|
|
||||||
|
String otherpara2() default "";
|
||||||
|
|
||||||
|
String column() default "";
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.engine.jclproduct.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 1:48 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface TableTitle {
|
||||||
|
int labelId() default -1;
|
||||||
|
String title();
|
||||||
|
String dataIndex();
|
||||||
|
String key();
|
||||||
|
boolean display() default true;
|
||||||
|
String width() default "";
|
||||||
|
boolean sorter() default false;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.engine.jclproduct.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 1:48 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface WeaverTableColumn {
|
||||||
|
|
||||||
|
String text() default "";
|
||||||
|
|
||||||
|
int labelId() default -1;
|
||||||
|
|
||||||
|
String width() default "";
|
||||||
|
|
||||||
|
String column() default "";
|
||||||
|
|
||||||
|
boolean display() default true;
|
||||||
|
|
||||||
|
String orderkey() default "";
|
||||||
|
|
||||||
|
String transmethod() default "";
|
||||||
|
|
||||||
|
// 额外参数
|
||||||
|
String otherPara() default "";
|
||||||
|
|
||||||
|
// 多语言转换
|
||||||
|
boolean multiLanguage() default false;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.engine.jclproduct.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 1:48 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.ANNOTATION_TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface WeaverTableOperate {
|
||||||
|
|
||||||
|
String text() default "";
|
||||||
|
|
||||||
|
int labelId() default -1;
|
||||||
|
|
||||||
|
String href() default "";
|
||||||
|
|
||||||
|
String index() default "0";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.engine.jclproduct.component;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||||
|
import com.cloudstore.eccom.pc.table.*;
|
||||||
|
import com.engine.jclproduct.annotation.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.general.PageIdConst;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class WeaverWeaTable<T> extends WeaTable {
|
||||||
|
|
||||||
|
public WeaverWeaTable(User user, Class clazz) {
|
||||||
|
|
||||||
|
boolean isAnno = clazz.isAnnotationPresent(WeaverTable.class);
|
||||||
|
if (isAnno) {
|
||||||
|
WeaverTable table = (WeaverTable) clazz.getAnnotation(WeaverTable.class);
|
||||||
|
String pageId = table.pageId();
|
||||||
|
super.setPageID(pageId);
|
||||||
|
String pageUid = pageId + "_" + user.getUID();
|
||||||
|
super.setPageUID(pageUid);
|
||||||
|
String pageSize = PageIdConst.getPageSize(pageId, user.getUID());
|
||||||
|
super.setPagesize(pageSize);
|
||||||
|
String backfields = table.fields();
|
||||||
|
super.setBackfields(backfields);
|
||||||
|
String sql = table.fromSql();
|
||||||
|
super.setSqlform(sql);
|
||||||
|
String where = table.where();
|
||||||
|
if (StringUtils.isNotBlank(where)) {
|
||||||
|
super.setSqlwhere(where);
|
||||||
|
}
|
||||||
|
String orderby = table.orderby();
|
||||||
|
if (StringUtils.isNotBlank(orderby)) {
|
||||||
|
super.setSqlorderby(orderby);
|
||||||
|
}
|
||||||
|
String sortway = table.sortway();
|
||||||
|
if (StringUtils.isNotBlank(sortway)) {
|
||||||
|
super.setSqlsortway(sortway);
|
||||||
|
}
|
||||||
|
String groupby = table.groupby();
|
||||||
|
if (StringUtils.isNotBlank(groupby)) {
|
||||||
|
super.setSqlgroupby(groupby);
|
||||||
|
}
|
||||||
|
boolean distinct = table.distinct();
|
||||||
|
super.setSqlisdistinct(String.valueOf(distinct));
|
||||||
|
String primarykey = table.primarykey();
|
||||||
|
if (StringUtils.isNotBlank(primarykey)) {
|
||||||
|
super.setSqlprimarykey(primarykey);
|
||||||
|
}
|
||||||
|
WeaverTableOperate[] operates = table.operates();
|
||||||
|
if (operates != null && operates.length > 0) {
|
||||||
|
List<WeaTableOperate> operateList = new ArrayList<>();
|
||||||
|
Arrays.stream(operates).forEach(o -> {
|
||||||
|
String text = o.text();
|
||||||
|
int labelId = o.labelId();
|
||||||
|
String htmlLabelName = SystemEnv.getHtmlLabelName(labelId, user.getLanguage());
|
||||||
|
if (StringUtils.isNotBlank(htmlLabelName)) {
|
||||||
|
text = htmlLabelName;
|
||||||
|
}
|
||||||
|
WeaTableOperate weaTableOperate = new WeaTableOperate(text, o.href(), o.index());
|
||||||
|
operateList.add(weaTableOperate);
|
||||||
|
});
|
||||||
|
WeaTableOperates weaTableOperates = new WeaTableOperates();
|
||||||
|
OperatePopedom popedoms = table.operatePopedom();
|
||||||
|
WeaTablePopedom popedom = new WeaTablePopedom();
|
||||||
|
if (popedoms != null && !"".equals(popedoms.transmethod())) {
|
||||||
|
popedom.setTransmethod(popedoms.transmethod());
|
||||||
|
popedom.setOtherpara(popedoms.otherpara());
|
||||||
|
weaTableOperates.setPopedom(popedom);
|
||||||
|
}
|
||||||
|
weaTableOperates.setOperate(operateList);
|
||||||
|
super.setOperates(weaTableOperates);
|
||||||
|
}
|
||||||
|
|
||||||
|
WeaTableType weaTableTypeEnum = table.tableType();
|
||||||
|
//设置check是否可用
|
||||||
|
if (weaTableTypeEnum == WeaTableType.CHECKBOX) {
|
||||||
|
super.setTableType(weaTableTypeEnum);
|
||||||
|
CheckboxPopedom checkPopedom = table.checkboxPopedom();
|
||||||
|
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||||
|
if (checkPopedom != null && !"".equals(checkPopedom.showmethod())) {
|
||||||
|
checkboxpopedom.setShowmethod(checkPopedom.showmethod());
|
||||||
|
checkboxpopedom.setPopedompara(checkPopedom.popedompara());
|
||||||
|
}
|
||||||
|
super.setCheckboxpopedom(checkboxpopedom);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Field[] fields = clazz.getDeclaredFields();
|
||||||
|
for (Field f : fields) {
|
||||||
|
boolean isanno = f.isAnnotationPresent(WeaverTableColumn.class);
|
||||||
|
if (isanno) {
|
||||||
|
WeaverTableColumn columnAnn = f.getAnnotation(WeaverTableColumn.class);
|
||||||
|
String text = columnAnn.text();
|
||||||
|
int labelId = columnAnn.labelId();
|
||||||
|
String htmlLabelName = SystemEnv.getHtmlLabelName(labelId, user.getLanguage());
|
||||||
|
if (StringUtils.isNotBlank(htmlLabelName)) {
|
||||||
|
text = htmlLabelName;
|
||||||
|
}
|
||||||
|
String width = columnAnn.width();
|
||||||
|
String column = columnAnn.column();
|
||||||
|
String orderkey = columnAnn.orderkey();
|
||||||
|
boolean display = columnAnn.display();
|
||||||
|
WeaTableColumn weaTableColumn = new WeaTableColumn(width, text, column, orderkey);
|
||||||
|
String transmethod = columnAnn.transmethod();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(transmethod)) {
|
||||||
|
weaTableColumn.setTransmethod(transmethod);
|
||||||
|
}
|
||||||
|
String otherPara = columnAnn.otherPara();
|
||||||
|
if (StringUtils.isNotBlank(otherPara)) {
|
||||||
|
weaTableColumn.setOtherpara(otherPara);
|
||||||
|
} else {
|
||||||
|
// 未设置其他参数,但是设置了多语言,自动添加其它参数为语言类型
|
||||||
|
if (columnAnn.multiLanguage()) {
|
||||||
|
weaTableColumn.setOtherpara(String.valueOf(user.getLanguage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!display) {
|
||||||
|
weaTableColumn.setDisplay(WeaBoolAttr.FALSE);
|
||||||
|
}
|
||||||
|
super.getColumns().add(weaTableColumn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,126 @@
|
|||||||
|
package com.engine.jclproduct.entity.bo;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.engine.jclproduct.entity.po.*;
|
||||||
|
import com.engine.jclproduct.utils.EmploymentUtil;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 5:31 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmploymentRecordBo {
|
||||||
|
|
||||||
|
|
||||||
|
public static List<EmploymentRecordPo> buildEmploymentRecordPo(List<HrmresourcePo> hrmresourcePos) {
|
||||||
|
List<EmploymentRecordPo> employmentRecordPos = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isEmpty(hrmresourcePos)) {
|
||||||
|
return employmentRecordPos;
|
||||||
|
}
|
||||||
|
String currentDate = DateUtil.getCurrentDate();
|
||||||
|
//失效日期默认最大值
|
||||||
|
return hrmresourcePos.stream().map(e-> {
|
||||||
|
Map<String, Integer> map = EmploymentUtil.dateSplitExample(e.getCompanyStartDate());
|
||||||
|
return EmploymentRecordPo.builder()
|
||||||
|
.userId(e.getUserId())
|
||||||
|
.workcode(e.getWorkcode())
|
||||||
|
.employeeStatus(e.getStatus())
|
||||||
|
.changType(EmploymentUtil.getChangeType(e.getStatus()))
|
||||||
|
.startDate("".equals(e.getCompanyStartDate())?currentDate:e.getCompanyStartDate())
|
||||||
|
.stopDate("9999-12-31") //失效日期默认最大值
|
||||||
|
.departmentId(e.getDepartmentId())
|
||||||
|
.subCompanyId(e.getSubcompanyId())
|
||||||
|
.superior(e.getManagerId())
|
||||||
|
.position(e.getJobTitle())
|
||||||
|
.companyStartDate(e.getCompanyStartDate())
|
||||||
|
.workyear(e.getCompanyWorkyear())
|
||||||
|
.entryDateYear(map.get("year"))
|
||||||
|
.entryDateMonth(map.get("month"))
|
||||||
|
.entryDateDay(map.get("day"))
|
||||||
|
.sex(e.getSex())
|
||||||
|
.birthday(e.getBirthday())
|
||||||
|
.build();}
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<OrganizationRecordPo> buildOrganizationRecordPo(List<SubCompanyPo> subCompanyPos, List<DepartmentPo> departmentPos) {
|
||||||
|
List<OrganizationRecordPo> organizationRecordPos = new ArrayList<>();
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(subCompanyPos)){
|
||||||
|
subCompanyPos.forEach(e -> organizationRecordPos.add(setOrganizationRecordPo(e,null,0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(departmentPos)) {
|
||||||
|
departmentPos.forEach(e -> organizationRecordPos.add(setOrganizationRecordPo(null,e,1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return organizationRecordPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static OrganizationRecordPo setOrganizationRecordPo(SubCompanyPo sub,DepartmentPo dept,Integer type) {
|
||||||
|
String currentDate = DateUtil.getCurrentDate();
|
||||||
|
if (type == 0) {
|
||||||
|
return OrganizationRecordPo.builder()
|
||||||
|
.orgStatus(sub.getCanceled() == 1 ? 1 : 0)
|
||||||
|
.startDate(currentDate)
|
||||||
|
.stopDate("9999-12-31")
|
||||||
|
.oId(sub.getSubcompanyId())
|
||||||
|
.oType(0)
|
||||||
|
.oName(sub.getSubcompanyName())
|
||||||
|
.oParentId(sub.getSupsubcomId())
|
||||||
|
.changeType(sub.getCanceled() == 1 ? 2 : 0)
|
||||||
|
.showorder(sub.getShoworder())
|
||||||
|
.organizationCode(sub.getSubcompanyCode())
|
||||||
|
.build();
|
||||||
|
}else {
|
||||||
|
return OrganizationRecordPo.builder()
|
||||||
|
.orgStatus(dept.getCanceled() == 1 ? 1 : 0)
|
||||||
|
.startDate(currentDate)
|
||||||
|
.stopDate("9999-12-31")
|
||||||
|
.oId(dept.getDepartmentId())
|
||||||
|
.oType(1)
|
||||||
|
.oName(dept.getDepartmentmark())
|
||||||
|
.oParentId(dept.getSupdepId())
|
||||||
|
.oChargeId(dept.getBmfzr())
|
||||||
|
.changeType(dept.getCanceled() == 1 ? 2 : 0)
|
||||||
|
.showorder(dept.getShoworder())
|
||||||
|
.organizationCode(dept.getDepartmentCode())
|
||||||
|
.belongSub(dept.getSubcompanyId())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static EmploymentRecordPo setEmploymentRecordPo(HrmresourcePo h){
|
||||||
|
Map<String, Integer> map = EmploymentUtil.dateSplitExample(h.getCompanyStartDate());
|
||||||
|
|
||||||
|
//处理其他参数
|
||||||
|
return EmploymentRecordPo.builder()
|
||||||
|
.userId(h.getUserId())
|
||||||
|
.workcode(h.getWorkcode())
|
||||||
|
.employeeStatus(h.getStatus())
|
||||||
|
.changType(EmploymentUtil.getChangeType(h.getStatus()))
|
||||||
|
.startDate(DateUtil.getCurrentDate())
|
||||||
|
.stopDate("9999-12-31")
|
||||||
|
.departmentId(h.getDepartmentId())
|
||||||
|
.subCompanyId(h.getSubcompanyId())
|
||||||
|
.superior(h.getManagerId())
|
||||||
|
.position(h.getJobTitle())
|
||||||
|
.companyStartDate(h.getCompanyStartDate())
|
||||||
|
.workyear(h.getCompanyWorkyear())
|
||||||
|
.entryDateYear(map.get("year"))
|
||||||
|
.entryDateMonth(map.get("month"))
|
||||||
|
.entryDateDay(map.get("day"))
|
||||||
|
.sex(h.getSex())
|
||||||
|
.birthday(h.getBirthday())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.engine.jclproduct.entity.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/31 10:38 AM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TransferParam {
|
||||||
|
|
||||||
|
private Integer changeOldDept;
|
||||||
|
|
||||||
|
private Integer changeNewDept;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.engine.jclproduct.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/23 3:43 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DataDutyPo {
|
||||||
|
|
||||||
|
private HrmresourcePo hrmresourceUpdate;
|
||||||
|
|
||||||
|
private HrmresourcePo hrmresourceInsert;
|
||||||
|
|
||||||
|
private List<EmploymentRecordPo> employmentRecordInsert;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.engine.jclproduct.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/7 2:58 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DepartmentPo {
|
||||||
|
|
||||||
|
private Integer departmentId;
|
||||||
|
|
||||||
|
private String departmentmark;
|
||||||
|
|
||||||
|
private Integer subcompanyId;
|
||||||
|
|
||||||
|
private Integer supdepId;
|
||||||
|
|
||||||
|
private float showorder;
|
||||||
|
|
||||||
|
private Integer canceled;
|
||||||
|
|
||||||
|
private String departmentCode;
|
||||||
|
|
||||||
|
private String bmfzr;
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.engine.jclproduct.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 4:22 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EmploymentRecordPo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
private String workcode;
|
||||||
|
|
||||||
|
private Integer employeeStatus;
|
||||||
|
|
||||||
|
private Integer changType;
|
||||||
|
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
private String stopDate;
|
||||||
|
|
||||||
|
private Integer departmentId;
|
||||||
|
|
||||||
|
private Integer subCompanyId;
|
||||||
|
|
||||||
|
private Integer superior;
|
||||||
|
|
||||||
|
private Integer position;
|
||||||
|
|
||||||
|
private Integer changeOldSuperior;
|
||||||
|
|
||||||
|
private Integer changeNewSuperior;
|
||||||
|
|
||||||
|
private Integer changeOldJob;
|
||||||
|
|
||||||
|
private Integer changeNewJob;
|
||||||
|
|
||||||
|
private Integer changeOldDept;
|
||||||
|
|
||||||
|
private Integer changeNewDept;
|
||||||
|
|
||||||
|
private String companyStartDate;
|
||||||
|
|
||||||
|
private String workyear;
|
||||||
|
|
||||||
|
private Integer entryDateYear;
|
||||||
|
|
||||||
|
private Integer entryDateMonth;
|
||||||
|
|
||||||
|
private Integer entryDateDay;
|
||||||
|
|
||||||
|
private String expectedLastWorkDate;
|
||||||
|
|
||||||
|
private String lastWorkDate;
|
||||||
|
|
||||||
|
private String probationStartDate;
|
||||||
|
|
||||||
|
private String probationActualStopDate;
|
||||||
|
|
||||||
|
private String regularizationDate;
|
||||||
|
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模默认字段
|
||||||
|
*/
|
||||||
|
private Integer formModeId;
|
||||||
|
private String modeDataCreateDate;
|
||||||
|
private String modeDataCreateTime;
|
||||||
|
private Integer modeDataCreater;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.engine.jclproduct.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/8 3:04 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class OrganizationRecordPo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer orgStatus;
|
||||||
|
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
private String stopDate;
|
||||||
|
|
||||||
|
private Integer oId;
|
||||||
|
|
||||||
|
private Integer oType;
|
||||||
|
|
||||||
|
private String oName;
|
||||||
|
|
||||||
|
private Integer oParentId;
|
||||||
|
|
||||||
|
private String oChargeId;
|
||||||
|
|
||||||
|
private Integer changeType;
|
||||||
|
|
||||||
|
private String newName;
|
||||||
|
|
||||||
|
private Integer newParentId;
|
||||||
|
|
||||||
|
private String newOChargeId;
|
||||||
|
|
||||||
|
private String oldName;
|
||||||
|
|
||||||
|
private Integer oldParentId;
|
||||||
|
|
||||||
|
private String oldOChargeId;
|
||||||
|
|
||||||
|
private float showorder;
|
||||||
|
|
||||||
|
private String organizationCode;
|
||||||
|
|
||||||
|
//部门所属分部
|
||||||
|
private Integer belongSub;
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.engine.jclproduct.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/7 2:53 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SubCompanyPo {
|
||||||
|
|
||||||
|
private Integer subcompanyId;
|
||||||
|
|
||||||
|
private String subcompanyName;
|
||||||
|
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
private Integer supsubcomId;
|
||||||
|
|
||||||
|
private float showorder;
|
||||||
|
|
||||||
|
private Integer canceled;
|
||||||
|
|
||||||
|
private String subcompanyCode;
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/30 2:24 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CaluResourceVo {
|
||||||
|
|
||||||
|
private Integer key;
|
||||||
|
|
||||||
|
private Integer superKey;
|
||||||
|
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
private Integer startNumber;
|
||||||
|
|
||||||
|
private Integer entryNumber;
|
||||||
|
|
||||||
|
private Integer transferNumber;
|
||||||
|
|
||||||
|
private Integer leaveNumber;
|
||||||
|
|
||||||
|
private Integer onNumber;
|
||||||
|
|
||||||
|
private Integer outNumber;
|
||||||
|
|
||||||
|
private Integer endNumber;
|
||||||
|
|
||||||
|
private List<CaluResourceVo> children;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "3824ecae-fa94-4020-be40-b78eb2831f32",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.startDate," +
|
||||||
|
"t.stopDate," +
|
||||||
|
"t.userId," +
|
||||||
|
"t.workcode," +
|
||||||
|
"t.employeeStatus," +
|
||||||
|
"t.subCompanyId," +
|
||||||
|
"t.departmentId," +
|
||||||
|
"t.position," +
|
||||||
|
"t.superior," +
|
||||||
|
"t.companyStartDate," +
|
||||||
|
"t.expectedLastWorkDate," +
|
||||||
|
"t.lastWorkDate," +
|
||||||
|
"t.probationActualStopDate," +
|
||||||
|
"t.regularizationDate," +
|
||||||
|
"t.workyear," +
|
||||||
|
"t.sex," +
|
||||||
|
"t.birthday",
|
||||||
|
fromSql = "FROM uf_EmploymentRecord t ",
|
||||||
|
orderby = "userid",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class LeaveResourceVo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "startDate",text = "生效日期", display = false)
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "stopDate",text = "失效日期", display = false)
|
||||||
|
private String stopDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "姓名", width = "10%", column = "userId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "工号", width = "10%", column = "workcode")
|
||||||
|
private String workcode;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "employeeStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.statusName")
|
||||||
|
private String employeeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部", width = "10%", column = "subCompanyId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String subCompanyId;
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门", width = "10%", column = "departmentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String departmentId;
|
||||||
|
/**
|
||||||
|
* 岗位
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "岗位", width = "10%", column = "position",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.jobTitleName")
|
||||||
|
private String position;
|
||||||
|
/**
|
||||||
|
* 直接上级
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "直接上级", width = "10%", column = "superior",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private Integer superior;
|
||||||
|
/**
|
||||||
|
* 入职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "入职日期", width = "10%", column = "companyStartDate")
|
||||||
|
private Integer companyStartDate;
|
||||||
|
/**
|
||||||
|
* 退休日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "退休日期", width = "10%", column = "expectedLastWorkDate")
|
||||||
|
private Integer expectedLastWorkDate;
|
||||||
|
/**
|
||||||
|
* 离职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "离职日期", width = "10%", column = "lastWorkDate")
|
||||||
|
private Integer lastWorkDate;
|
||||||
|
/**
|
||||||
|
* 转正日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "转正日期", width = "10%", column = "regularizationDate")
|
||||||
|
private Integer regularizationDate;
|
||||||
|
/**
|
||||||
|
* 司龄
|
||||||
|
*/
|
||||||
|
// @WeaverTableColumn( text = "司龄", width = "10%", column = "workyear")
|
||||||
|
// private Integer workyear;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "性别", width = "10%", column = "sex",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexName")
|
||||||
|
private String sex;
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "生日", width = "10%", column = "birthday")
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "195fd81d-95fb-4568-af05-1a564c863e21",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.orgStatus," +
|
||||||
|
"t.organizationCode," +
|
||||||
|
"t.oName," +
|
||||||
|
"t.oParentId," +
|
||||||
|
"t.oChargeId," +
|
||||||
|
"t.belongSub," +
|
||||||
|
"t.showorder",
|
||||||
|
fromSql = "FROM uf_orgChange t",
|
||||||
|
orderby = "showorder",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TimeDepartmentVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "orgStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexOrgStatus")
|
||||||
|
private String orgStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门编码
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门编码", width = "10%", column = "organizationCode")
|
||||||
|
private String organizationCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门名称", width = "10%", column = "oName")
|
||||||
|
private String oName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "上级部门", width = "10%", column = "oParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String oParentId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门负责人
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门负责人", width = "10%", column = "oChargeId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String oChargeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "所属分部", width = "10%", column = "belongSub",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String belongSub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "显示顺序", width = "10%", column = "showorder")
|
||||||
|
private String showorder;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,136 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "6f201832-a940-4225-a4c9-3f4b96ff5b89",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.startDate," +
|
||||||
|
"t.stopDate," +
|
||||||
|
"t.userId," +
|
||||||
|
"t.workcode," +
|
||||||
|
"t.employeeStatus," +
|
||||||
|
"t.subCompanyId," +
|
||||||
|
"t.departmentId," +
|
||||||
|
"t.position," +
|
||||||
|
"t.superior," +
|
||||||
|
"t.companyStartDate," +
|
||||||
|
"t.expectedLastWorkDate," +
|
||||||
|
"t.lastWorkDate," +
|
||||||
|
"t.probationActualStopDate," +
|
||||||
|
"t.regularizationDate," +
|
||||||
|
"t.workyear," +
|
||||||
|
"t.sex," +
|
||||||
|
"t.birthday",
|
||||||
|
fromSql = "FROM uf_EmploymentRecord t ",
|
||||||
|
orderby = "userid",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TimeResourceVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "startDate",text = "生效日期", display = false)
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "stopDate",text = "失效日期", display = false)
|
||||||
|
private String stopDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "姓名", width = "10%", column = "userId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "工号", width = "10%", column = "workcode")
|
||||||
|
private String workcode;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "employeeStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.statusName")
|
||||||
|
private String employeeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部", width = "10%", column = "subCompanyId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String subCompanyId;
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门", width = "10%", column = "departmentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String departmentId;
|
||||||
|
/**
|
||||||
|
* 岗位
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "岗位", width = "10%", column = "position",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.jobTitleName")
|
||||||
|
private String position;
|
||||||
|
/**
|
||||||
|
* 直接上级
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "直接上级", width = "10%", column = "superior",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private Integer superior;
|
||||||
|
/**
|
||||||
|
* 入职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "入职日期", width = "10%", column = "companyStartDate")
|
||||||
|
private Integer companyStartDate;
|
||||||
|
/**
|
||||||
|
* 退休日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "退休日期", width = "10%", column = "expectedLastWorkDate")
|
||||||
|
private Integer expectedLastWorkDate;
|
||||||
|
/**
|
||||||
|
* 离职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "离职日期", width = "10%", column = "lastWorkDate")
|
||||||
|
private Integer lastWorkDate;
|
||||||
|
/**
|
||||||
|
* 转正日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "转正日期", width = "10%", column = "regularizationDate")
|
||||||
|
private Integer regularizationDate;
|
||||||
|
/**
|
||||||
|
* 司龄
|
||||||
|
*/
|
||||||
|
// @WeaverTableColumn( text = "司龄", width = "10%", column = "workyear")
|
||||||
|
// private Integer workyear;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "性别", width = "10%", column = "sex",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexName")
|
||||||
|
private String sex;
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "生日", width = "10%", column = "birthday")
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "ab83519e-1df8-48a0-9c4b-4ba60aa69c5e",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.orgStatus," +
|
||||||
|
"t.organizationCode," +
|
||||||
|
"t.oName," +
|
||||||
|
"t.oParentId," +
|
||||||
|
"t.showorder",
|
||||||
|
fromSql = "FROM uf_orgChange t",
|
||||||
|
orderby = "showorder",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TimeSubCompanyVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "orgStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexOrgStatus")
|
||||||
|
private String orgStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部编码
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部编码", width = "10%", column = "organizationCode")
|
||||||
|
private String organizationCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部名称", width = "10%", column = "oName")
|
||||||
|
private String oName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "上级分部", width = "10%", column = "oParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String oParentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "显示顺序", width = "10%", column = "showorder")
|
||||||
|
private String showorder;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "4e0e4e0b-2440-4446-a9c6-e7fd44301bf7",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.orgStatus," +
|
||||||
|
"t.oName," +
|
||||||
|
"t.belongSub," +
|
||||||
|
"t.oldName," +
|
||||||
|
"t.oldOChargeId," +
|
||||||
|
"t.newName," +
|
||||||
|
"t.newParentId," +
|
||||||
|
"t.newOChargeId," +
|
||||||
|
"t.showorder",
|
||||||
|
fromSql = "FROM uf_orgChange t",
|
||||||
|
orderby = "showorder",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TransDepartmentVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "orgStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexOrgStatus")
|
||||||
|
private String orgStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "部门名称", width = "10%", column = "oName")
|
||||||
|
private String oName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "所属分部", width = "10%", column = "belongSub",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String belongSub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前部门名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动前部门名称", width = "10%", column = "oldName")
|
||||||
|
private String oldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前上级部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动前上级部门", width = "10%", column = "oldParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String oldParentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前部门负责人
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动前部门负责人", width = "10%", column = "oldOChargeId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String oldOChargeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后部门名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动后部门名称", width = "10%", column = "newName")
|
||||||
|
private String newName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后上级部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动后上级部门", width = "10%", column = "newParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String newParentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后部门负责人
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动后部门负责人", width = "10%", column = "newOChargeId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String newOChargeId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "f3fbe166-778d-4ed7-b026-528c3262fa48",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.orgStatus," +
|
||||||
|
"t.oName," +
|
||||||
|
"t.oldName," +
|
||||||
|
"t.oldParentId," +
|
||||||
|
"t.newName," +
|
||||||
|
"t.newParentId",
|
||||||
|
fromSql = "FROM uf_orgChange t",
|
||||||
|
orderby = "showorder",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TransSubCompanyVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "5%", column = "orgStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexOrgStatus")
|
||||||
|
private String orgStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部名称", width = "10%", column = "oName")
|
||||||
|
private String oName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前分部名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动前分部名称", width = "10%", column = "oldName")
|
||||||
|
private String oldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前上级分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动前上级分部", width = "10%", column = "oldParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String oldParentId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后分部名称
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动后分部名称", width = "10%", column = "newName")
|
||||||
|
private String newName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后上级分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "变动后上级分部", width = "10%", column = "newParentId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String newParentId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,138 @@
|
|||||||
|
package com.engine.jclproduct.entity.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTable;
|
||||||
|
import com.engine.jclproduct.annotation.WeaverTableColumn;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:22 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@WeaverTable(pageId = "ba7d8752-a037-4b1a-b1dc-7361f78f0683",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.startDate," +
|
||||||
|
"t.stopDate," +
|
||||||
|
"t.userId," +
|
||||||
|
"t.workcode," +
|
||||||
|
"t.employeeStatus," +
|
||||||
|
"t.subCompanyId," +
|
||||||
|
"t.changeNewDept," +
|
||||||
|
"t.changeNewJob," +
|
||||||
|
"t.changeNewSuperior," +
|
||||||
|
"t.changeOldDept," +
|
||||||
|
"t.changeOldJob," +
|
||||||
|
"t.changeOldSuperior," +
|
||||||
|
"t.companyStartDate," +
|
||||||
|
"t.lastWorkDate," +
|
||||||
|
"t.workyear," +
|
||||||
|
"t.sex," +
|
||||||
|
"t.birthday",
|
||||||
|
fromSql = "FROM uf_EmploymentRecord t ",
|
||||||
|
orderby = "userid",
|
||||||
|
sortway = "asc",
|
||||||
|
primarykey = "id",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class TransferResourceVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn(column = "id",text = "序号", display = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "startDate",width = "10%",text = "调动日期")
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
@WeaverTableColumn(column = "stopDate",width = "10%",text = "失效日期", display = false)
|
||||||
|
private String stopDate;
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "姓名", width = "10%", column = "userId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 工号
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "工号", width = "10%", column = "workcode")
|
||||||
|
private String workcode;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "状态", width = "10%", column = "employeeStatus",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.statusName")
|
||||||
|
private String employeeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "分部", width = "10%", column = "subCompanyId",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.subCompanyName")
|
||||||
|
private String subCompanyId;
|
||||||
|
/**
|
||||||
|
* 新部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "新部门", width = "10%", column = "changeNewDept",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String changeNewDept;
|
||||||
|
/**
|
||||||
|
* 新岗位
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "新岗位", width = "10%", column = "changeNewJob",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.jobTitleName")
|
||||||
|
private String changeNewJob;
|
||||||
|
/**
|
||||||
|
* 新直接上级
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "新直接上级", width = "10%", column = "changeNewSuperior",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private Integer changeNewSuperior;
|
||||||
|
/**
|
||||||
|
* 原部门
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "原部门", width = "10%", column = "changeOldDept",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.departmentName")
|
||||||
|
private String changeOldDept;
|
||||||
|
/**
|
||||||
|
* 原岗位
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "原岗位", width = "10%", column = "changeOldJob",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.jobTitleName")
|
||||||
|
private String changeOldJob;
|
||||||
|
/**
|
||||||
|
* 原直接上级
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "原直接上级", width = "10%", column = "changeOldSuperior",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.resourceName")
|
||||||
|
private Integer changeOldSuperior;
|
||||||
|
/**
|
||||||
|
* 入职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "入职日期", width = "10%", column = "companyStartDate")
|
||||||
|
private Integer companyStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 离职日期
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "离职日期", width = "10%", column = "lastWorkDate")
|
||||||
|
private Integer lastWorkDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司龄
|
||||||
|
*/
|
||||||
|
// @WeaverTableColumn( text = "司龄", width = "10%", column = "workyear")
|
||||||
|
// private Integer workyear;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
@WeaverTableColumn( text = "性别", width = "10%", column = "sex",transmethod = "com.engine.jclproduct.transmethod.EmReportTransMethod.sexName")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package com.engine.jclproduct.service.impl;
|
||||||
|
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.jclproduct.entity.bo.EmploymentRecordBo;
|
||||||
|
import com.engine.jclproduct.entity.po.*;
|
||||||
|
import com.engine.jclproduct.service.EmploymentRecordService;
|
||||||
|
import com.engine.jclproduct.utils.EmploymentUtil;
|
||||||
|
import com.weaver.file.ConfigOperator;
|
||||||
|
import com.weaver.general.BaseBean;
|
||||||
|
import com.weaver.general.TimeUtil;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 4:23 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmploymentRecordServiceImpl extends Service implements EmploymentRecordService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> initPerson() {
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
//1.任职记录表初始化数据 只执行一次
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select count(1) as num from uf_EmploymentRecord");
|
||||||
|
rs.next();
|
||||||
|
int num = Util.getIntValue(rs.getString("num"));
|
||||||
|
if (num > 0) {
|
||||||
|
map.put("msg","员工任职记录表已经初始化,不可重复执行");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
//2.获取当前人员表人员信息
|
||||||
|
List<HrmresourcePo> hrmresourcePoList = EmploymentUtil.getHrmResources();
|
||||||
|
|
||||||
|
hrmresourcePoList.forEach(e-> rs.executeUpdate("insert into uf_hrmresource_day(userId,workcode,companystartdate,companyworkyear," +
|
||||||
|
" birthday,jobtitle,departmentid,subcompanyid,managerid,status,sex) values(?,?,?,?,?,?,?,?,?,?,?)",e.getUserId(),e.getWorkcode(),
|
||||||
|
e.getCompanyStartDate(),e.getCompanyWorkyear(),e.getBirthday(),e.getJobTitle(),e.getDepartmentId(),e.getSubcompanyId(),e.getManagerId(),e.getStatus(),e.getSex()));
|
||||||
|
|
||||||
|
map.put("msg1","人力资源中间表初始化完成,当前共"+hrmresourcePoList.size()+"条数据");
|
||||||
|
|
||||||
|
List<EmploymentRecordPo> employmentPos = EmploymentRecordBo.buildEmploymentRecordPo(hrmresourcePoList);
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
String formModeId = bb.getPropValue("jclproduct", "eModeId");
|
||||||
|
|
||||||
|
String modeDataCreateDate = DateUtil.getCurrentDate();
|
||||||
|
String modeDataCreateTime = TimeUtil.getOnlyCurrentTimeString();
|
||||||
|
ConfigOperator configOperator = new ConfigOperator();
|
||||||
|
configOperator.setProp("jclproduct.properties", "startDate", modeDataCreateDate);
|
||||||
|
|
||||||
|
employmentPos.forEach(e-> rs.executeUpdate("insert into uf_EmploymentRecord(userId,workcode,employeeStatus,changType,startDate,stopDate," +
|
||||||
|
" departmentId,subCompanyId,superior,position,companyStartDate,workyear,entryDateYear,entryDateMonth,entryDateDay," +
|
||||||
|
" sex,birthday,formmodeid,modeDataCreateDate,modeDataCreateTime,modeDataCreater) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||||
|
e.getUserId(),e.getWorkcode(),e.getEmployeeStatus(),e.getChangType(),e.getStartDate(),e.getStopDate(),e.getDepartmentId(),
|
||||||
|
e.getSubCompanyId(),e.getSuperior(),e.getPosition(),e.getCompanyStartDate(),e.getWorkyear(),e.getEntryDateYear(),e.getEntryDateMonth(),
|
||||||
|
e.getEntryDateDay(),e.getSex(),e.getBirthday(),formModeId,modeDataCreateDate,modeDataCreateTime,1));
|
||||||
|
|
||||||
|
map.put("msg2","员工任职记录表初始化完成,人力资源表共"+employmentPos.size()+"条数据");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> initOrganization() {
|
||||||
|
Map<String, Object> map = new HashMap<>(8);
|
||||||
|
//1.任职记录表初始化数据 只执行一次
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select count(1) as num from uf_orgChange");
|
||||||
|
rs.next();
|
||||||
|
int num = Util.getIntValue(rs.getString("num"));
|
||||||
|
if (num > 0) {
|
||||||
|
map.put("msg","组织变更记录表已经初始化,不可重复执行");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
//1.人力资源分部中间表
|
||||||
|
List<SubCompanyPo> subCompany = EmploymentUtil.getSubCompany();
|
||||||
|
subCompany.forEach(e -> rs.executeUpdate("insert into uf_hrmsubcompany(subcompanyId,subcompanyName,companyId,supsubcomId,showorder,canceled,subcompanyCode) values(?,?,?,?,?,?,?)",e.getSubcompanyId(),
|
||||||
|
e.getSubcompanyName(),e.getCompanyId(),e.getSupsubcomId(),e.getShoworder(),e.getCanceled(),e.getSubcompanyCode()));
|
||||||
|
map.put("msg1","人力资源分部中间表初始化完成,共"+subCompany.size()+"条数据");
|
||||||
|
|
||||||
|
//2.人力资源部门中间表
|
||||||
|
List<DepartmentPo> department = EmploymentUtil.getDepartment();
|
||||||
|
department.forEach(e -> rs.executeUpdate("insert into uf_hrmdepartment(departmentId,departmentmark,subcompanyId,supdepId,showorder,canceled,departmentCode,bmfzr) values(?,?,?,?,?,?,?,?)",e.getDepartmentId(),
|
||||||
|
e.getDepartmentmark(),e.getSubcompanyId(),e.getSupdepId(),e.getShoworder(),e.getCanceled(),e.getDepartmentCode(),e.getBmfzr()));
|
||||||
|
|
||||||
|
map.put("msg2","人力资源部门中间表初始化完成,共"+department.size()+"条数据");
|
||||||
|
|
||||||
|
//3.组织变更记录表
|
||||||
|
List<OrganizationRecordPo> organizationRecordPos = EmploymentRecordBo.buildOrganizationRecordPo(subCompany, department);
|
||||||
|
organizationRecordPos.forEach(e -> rs.executeUpdate("insert into uf_orgChange(orgStatus,startDate,stopDate,oId,oType,oName,oParentId,oChargeId,changeType,showorder,organizationCode,belongSub) values(?,?,?,?,?,?,?,?,?,?,?,?)",e.getOrgStatus(),
|
||||||
|
e.getStartDate(),e.getStopDate(),e.getOId(),e.getOType(),e.getOName(),e.getOParentId(),e.getOChargeId(),e.getChangeType(),e.getShoworder(),e.getOrganizationCode(),e.getBelongSub()));
|
||||||
|
|
||||||
|
|
||||||
|
map.put("msg3","组织变更记录表初始化完成,共"+organizationRecordPos.size()+"条数据");
|
||||||
|
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.engine.jclproduct.transmethod;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import weaver.hrm.company.DepartmentComInfo;
|
||||||
|
import weaver.hrm.company.SubCompanyComInfo;
|
||||||
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
|
import weaver.hrm.resource.ResourceComInfo;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 2:34 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmReportTransMethod {
|
||||||
|
|
||||||
|
public static String subCompanyName(String id) {
|
||||||
|
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
||||||
|
return subCompanyComInfo.getSubCompanyname(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String departmentName(String id) {
|
||||||
|
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||||
|
try {
|
||||||
|
return departmentComInfo.getDepartmentName(id);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String jobTitleName(String id) {
|
||||||
|
JobTitlesComInfo jobTitlesComInfo = new JobTitlesComInfo();
|
||||||
|
return jobTitlesComInfo.getJobTitlesname(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String resourceName(String id) {
|
||||||
|
try {
|
||||||
|
List<String> ids = Arrays.stream(id.split(","))
|
||||||
|
.map(String::valueOf)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||||
|
List<String> names = ids.stream()
|
||||||
|
.map(resourceComInfo::getLastname)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return CollectionUtil.join(names,",");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sexName(String id) {
|
||||||
|
return "1".equals(id) ? "女":"男";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String statusName(String id) {
|
||||||
|
String name = "";
|
||||||
|
switch (id){
|
||||||
|
case "0":
|
||||||
|
name = "试用";
|
||||||
|
break;
|
||||||
|
case "1":
|
||||||
|
name = "正式";
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
name = "临时";
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
name = "试用延期";
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
name = "解聘";
|
||||||
|
break;
|
||||||
|
case "5":
|
||||||
|
name = "离职";
|
||||||
|
break;
|
||||||
|
case "6":
|
||||||
|
name = "退休";
|
||||||
|
break;
|
||||||
|
case "7":
|
||||||
|
name = "无效";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String sexOrgStatus(String id) {
|
||||||
|
return "1".equals(id) ? "封存":"启用";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,305 @@
|
|||||||
|
package com.engine.jclproduct.utils;
|
||||||
|
|
||||||
|
import com.engine.jclproduct.entity.param.TransferParam;
|
||||||
|
import com.engine.jclproduct.entity.po.DepartmentPo;
|
||||||
|
import com.engine.jclproduct.entity.po.EmploymentRecordPo;
|
||||||
|
import com.engine.jclproduct.entity.po.HrmresourcePo;
|
||||||
|
import com.engine.jclproduct.entity.po.SubCompanyPo;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.Year;
|
||||||
|
import java.time.YearMonth;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/23 10:14 AM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmploymentUtil {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Integer getChangeType(Integer status){
|
||||||
|
|
||||||
|
Integer changeType = null;
|
||||||
|
|
||||||
|
switch (status){
|
||||||
|
case 0: case 2: case 3:
|
||||||
|
changeType = 0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
changeType = 1;
|
||||||
|
break;
|
||||||
|
case 4: case 5: case 6: case 7:
|
||||||
|
changeType = 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return changeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年月日
|
||||||
|
* @param companysDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<String,Integer> dateSplitExample(String companysDate){
|
||||||
|
|
||||||
|
if ("".equals(companysDate)) {
|
||||||
|
companysDate = DateUtil.getCurrentDate();
|
||||||
|
}
|
||||||
|
LocalDate date = LocalDate.parse(companysDate);
|
||||||
|
return new HashMap<String,Integer>(4){
|
||||||
|
{
|
||||||
|
put("year",date.getYear());
|
||||||
|
put("month",date.getMonthValue());
|
||||||
|
put("day",date.getDayOfMonth());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前人员表人员信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<HrmresourcePo> getHrmResources(){
|
||||||
|
List<HrmresourcePo> hrmresourcePoList = new ArrayList<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select id,workcode,status,companystartdate,companyworkyear,sex,birthday,jobtitle,departmentid,subcompanyid1,managerid from hrmresource order by id asc");
|
||||||
|
while (rs.next()) {
|
||||||
|
hrmresourcePoList.add(HrmresourcePo.builder()
|
||||||
|
.userId(Util.getIntValue(rs.getString("id")))
|
||||||
|
.workcode(Util.null2String(rs.getString("workcode")))
|
||||||
|
.status(Util.getIntValue(rs.getString("status")))
|
||||||
|
.companyStartDate(Util.null2String(rs.getString("companystartdate")))
|
||||||
|
.companyWorkyear("".equals(Util.null2String(rs.getString("companyworkyear"))) ? "0.00" : Util.null2String(rs.getString("companyworkyear")))
|
||||||
|
.sex(Util.getIntValue(rs.getString("sex")))
|
||||||
|
.birthday(Util.null2String(rs.getString("birthday")))
|
||||||
|
.jobTitle(Util.getIntValue(rs.getString("jobtitle")))
|
||||||
|
.departmentId(Util.getIntValue(rs.getString("departmentid")))
|
||||||
|
.subcompanyId(Util.getIntValue(rs.getString("subcompanyid1")))
|
||||||
|
.managerId(Util.getIntValue(rs.getString("managerid")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
return hrmresourcePoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前分部表信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<SubCompanyPo> getSubCompany() {
|
||||||
|
List<SubCompanyPo> subCompanyPoList = new ArrayList<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select id,subcompanyname,companyid,supsubcomid,showorder,canceled,subcompanycode from hrmsubcompany order by showorder asc");
|
||||||
|
while (rs.next()) {
|
||||||
|
subCompanyPoList.add(SubCompanyPo.builder()
|
||||||
|
.subcompanyId(Util.getIntValue(rs.getString("id")))
|
||||||
|
.subcompanyName(Util.null2String(rs.getString("subcompanyname")))
|
||||||
|
.companyId(Util.getIntValue(rs.getString("companyid")))
|
||||||
|
.supsubcomId(Util.getIntValue(rs.getString("supsubcomid")))
|
||||||
|
.showorder(Util.getFloatValue(rs.getString("showorder")))
|
||||||
|
.canceled(Util.getIntValue(rs.getString("canceled")))
|
||||||
|
.subcompanyCode(Util.null2String(rs.getString("subcompanycode")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
return subCompanyPoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前部门表信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<DepartmentPo> getDepartment() {
|
||||||
|
List<DepartmentPo> departmentPoList = new ArrayList<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select a.id,departmentmark,subcompanyid1,supdepid,showorder,canceled,departmentcode,b.bmfzr from hrmdepartment a\n" +
|
||||||
|
" left join hrmdepartmentdefined b on a.id = b.deptid order by showorder asc");
|
||||||
|
while (rs.next()) {
|
||||||
|
departmentPoList.add(DepartmentPo.builder()
|
||||||
|
.departmentId(Util.getIntValue(rs.getString("id")))
|
||||||
|
.departmentmark(Util.null2String(rs.getString("departmentmark")))
|
||||||
|
.subcompanyId(Util.getIntValue(rs.getString("subcompanyid1")))
|
||||||
|
.supdepId(Util.getIntValue(rs.getString("supdepid")))
|
||||||
|
.showorder(Util.getFloatValue(rs.getString("showorder")))
|
||||||
|
.canceled(Util.getIntValue(rs.getString("canceled")))
|
||||||
|
.departmentCode(Util.null2String(rs.getString("departmentcode")))
|
||||||
|
.bmfzr(Util.null2String(rs.getString("bmfzr")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
return departmentPoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任职记录 各种状态下 相关变动日期记录
|
||||||
|
* @param recordPo
|
||||||
|
*/
|
||||||
|
public static void dutyStatusDate(EmploymentRecordPo recordPo) {
|
||||||
|
String currentDate = DateUtil.getCurrentDate();
|
||||||
|
switch (recordPo.getEmployeeStatus()){
|
||||||
|
case 0:
|
||||||
|
recordPo.setProbationStartDate(currentDate);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
recordPo.setRegularizationDate(currentDate);
|
||||||
|
break;
|
||||||
|
case 4: case 5:
|
||||||
|
recordPo.setLastWorkDate(currentDate);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
recordPo.setExpectedLastWorkDate(currentDate);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期字符串 与当前日期比较
|
||||||
|
* @param dateStr1
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean compareDate(String dateStr1){
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
boolean result = false;
|
||||||
|
try {
|
||||||
|
LocalDate inputDate = LocalDate.parse(dateStr1, formatter);
|
||||||
|
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
|
||||||
|
// 判断当前日期是否大于传入的日期
|
||||||
|
if (today.isAfter(inputDate)) {
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String firstDayOfPreviousMonth() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
YearMonth previousMonth = YearMonth.from(now).minusMonths(1);
|
||||||
|
LocalDate firstDayOfPreviousMonth = previousMonth.atDay(1);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
return firstDayOfPreviousMonth.format(formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String lastDayOfPreviousMonth() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
YearMonth previousMonth = YearMonth.from(now).minusMonths(1);
|
||||||
|
LocalDate lastDayOfPreviousMonth = previousMonth.atEndOfMonth();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
return lastDayOfPreviousMonth.format(formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String firstDayOfPreviousYear() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
Year previousYear = Year.from(now).minusYears(1);
|
||||||
|
LocalDate firstDayOfPreviousYear = previousYear.atDay(1);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
return firstDayOfPreviousYear.format(formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String lastDayOfPreviousYear() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
Year previousYear = Year.from(now).minusYears(1);
|
||||||
|
LocalDate lastDayOfPreviousYear = previousYear.atMonth(12).atEndOfMonth();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
return lastDayOfPreviousYear.format(formatter);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String firstDayOfMonth(String yearMonthStr) {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||||
|
YearMonth yearMonth = YearMonth.parse(yearMonthStr, formatter);
|
||||||
|
LocalDate firstDayOfMonth = yearMonth.atDay(1);
|
||||||
|
return firstDayOfMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String lastDayOfMonth(String yearMonthStr) {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||||
|
YearMonth yearMonth = YearMonth.parse(yearMonthStr, formatter);
|
||||||
|
LocalDate lastDayOfMonth = yearMonth.atEndOfMonth();
|
||||||
|
return lastDayOfMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Map<Integer,Integer> sumPerson(String date,String employeeStatus) {
|
||||||
|
Map<Integer,Integer> map = new HashMap<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select count(1) as nums,departmentid" +
|
||||||
|
" from uf_EmploymentRecord where employeeStatus in ("+employeeStatus+") " +
|
||||||
|
" and startDate <= '"+date+"' and stopDate >= '"+date+"'" +
|
||||||
|
" group by departmentid");
|
||||||
|
while (rs.next()) {
|
||||||
|
int departmentid = Util.getIntValue(rs.getString("departmentid"));
|
||||||
|
int nums = Util.getIntValue(rs.getString("nums"));
|
||||||
|
map.put(departmentid,nums);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Map<Integer,Integer> rangePerson(String startDate,String endDate,String employeeStatus) {
|
||||||
|
Map<Integer,Integer> map = new HashMap<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select count(1) as nums,departmentid" +
|
||||||
|
" from uf_EmploymentRecord where employeeStatus in ("+employeeStatus+") and changtype != 2" +
|
||||||
|
" and startDate >= '"+startDate+"' and startDate <= '"+endDate+"' and stopDate >= '"+endDate+"'" +
|
||||||
|
" group by departmentid");
|
||||||
|
while (rs.next()) {
|
||||||
|
int departmentid = Util.getIntValue(rs.getString("departmentid"));
|
||||||
|
int nums = Util.getIntValue(rs.getString("nums"));
|
||||||
|
map.put(departmentid,nums);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<TransferParam> transferPerson(String startDate,String endDate) {
|
||||||
|
List<TransferParam> paramList = new ArrayList<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select changeOldDept,changeNewDept " +
|
||||||
|
" from uf_EmploymentRecord where changtype = 2 " +
|
||||||
|
" and startDate >= '"+startDate+"' and startDate <= '"+endDate+"' and stopDate >= '"+endDate+"'");
|
||||||
|
while (rs.next()) {
|
||||||
|
int changeOldDept = Util.getIntValue(rs.getString("changeOldDept"));
|
||||||
|
int changeNewDept = Util.getIntValue(rs.getString("changeNewDept"));
|
||||||
|
paramList.add(TransferParam.builder().changeNewDept(changeNewDept).changeOldDept(changeOldDept).build());
|
||||||
|
}
|
||||||
|
return paramList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.engine.jclproduct.utils;
|
||||||
|
|
||||||
|
import org.apache.poi.ss.usermodel.CellType;
|
||||||
|
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||||
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/1 4:56 PM
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ExcelUtil {
|
||||||
|
|
||||||
|
public static XSSFWorkbook genWorkbookV2(List<List<Object>> rowList, String sheetName) {
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
|
|
||||||
|
// 设置title样式
|
||||||
|
XSSFCellStyle titleCellStyle = workbook.createCellStyle();
|
||||||
|
XSSFFont titleFont = workbook.createFont();
|
||||||
|
titleFont.setFontName("仿宋");
|
||||||
|
titleFont.setFontHeightInPoints((short) 15);
|
||||||
|
titleCellStyle.setFont(titleFont);
|
||||||
|
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
titleCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());//背景色
|
||||||
|
titleCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
|
||||||
|
|
||||||
|
// 设置主体样式
|
||||||
|
XSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||||
|
XSSFFont font = workbook.createFont();
|
||||||
|
font.setFontName("宋体");
|
||||||
|
font.setFontHeightInPoints((short) 10);// 设置字体大小
|
||||||
|
cellStyle.setFont(font);// 选择需要用到的字体格式
|
||||||
|
cellStyle.setWrapText(true);
|
||||||
|
|
||||||
|
XSSFSheet sheet = workbook.createSheet(sheetName);
|
||||||
|
//自适应宽度
|
||||||
|
sheet.autoSizeColumn(0, true);
|
||||||
|
//默认列宽
|
||||||
|
sheet.setDefaultColumnWidth(25);
|
||||||
|
//默认行高
|
||||||
|
sheet.setDefaultRowHeightInPoints(18);
|
||||||
|
|
||||||
|
for (int rowIndex = 0; rowIndex < rowList.size(); rowIndex++) {
|
||||||
|
List<Object> infoList = rowList.get(rowIndex);
|
||||||
|
XSSFRow row = sheet.createRow(rowIndex);
|
||||||
|
for (int cellIndex = 0; cellIndex < infoList.size(); cellIndex++) {
|
||||||
|
XSSFCell cell = row.createCell(cellIndex);
|
||||||
|
if (rowIndex == 0) {
|
||||||
|
cell.setCellStyle(titleCellStyle);
|
||||||
|
} else {
|
||||||
|
cell.setCellStyle(cellStyle);
|
||||||
|
}
|
||||||
|
Object o = infoList.get(cellIndex);
|
||||||
|
if (o instanceof String) {
|
||||||
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
} else if (o instanceof Boolean) {
|
||||||
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
} else {
|
||||||
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(o == null ? "" : o.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return workbook;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.engine.jclproduct.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ParamUtil;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.jclproduct.service.EmployeeRecordReportService;
|
||||||
|
import com.engine.jclproduct.service.impl.EmployeeRecordReportServiceImpl;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
import javax.ws.rs.core.StreamingOutput;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/25 11:08 AM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmployeeRecordReportAction {
|
||||||
|
|
||||||
|
private EmployeeRecordReportService getService(User user) {
|
||||||
|
return ServiceUtil.getService(EmployeeRecordReportServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/record/employee")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String commonReport(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("datas",getService(user).commonReport(ParamUtil.request2Map(request)));
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/employee/export")
|
||||||
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
|
public Response reportExport(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
XSSFWorkbook workbook = getService(user).reportExport(ParamUtil.request2Map(request));
|
||||||
|
String time = LocalDate.now().toString();
|
||||||
|
String fileName = "报表导出" + time;
|
||||||
|
try {
|
||||||
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
StreamingOutput output = outputStream -> {
|
||||||
|
workbook.write(outputStream);
|
||||||
|
outputStream.flush();
|
||||||
|
};
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/record/organization")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String orgReport(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("datas",getService(user).orgReport(ParamUtil.request2Map(request)));
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.engine.jclproduct.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.jclproduct.service.EmploymentRecordService;
|
||||||
|
import com.engine.jclproduct.service.impl.EmploymentRecordServiceImpl;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 4:22 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class EmploymentRecordAction {
|
||||||
|
|
||||||
|
private EmploymentRecordService getService(User user) {
|
||||||
|
return ServiceUtil.getService(EmploymentRecordServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/initPerson")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String initPerson(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("datas",getService(user).initPerson());
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/initOrganization")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String initOrganization(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("datas",getService(user).initOrganization());
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 13:44
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PeopleSums {
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private LinkedList<Integer> datas;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 13:32
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PeoplesAndNames {
|
||||||
|
|
||||||
|
private Integer peoples;
|
||||||
|
|
||||||
|
private String names;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 13:27
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class Postion {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private Integer postionType;
|
||||||
|
|
||||||
|
private String postionName;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 10:36
|
||||||
|
* @Description: 数据集
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PostionMatrixVo {
|
||||||
|
|
||||||
|
private LinkedList<Postion> tops;
|
||||||
|
|
||||||
|
private LinkedList<PostionPeople> centers;
|
||||||
|
|
||||||
|
private LinkedList<PeopleSums> footers;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 13:30
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PostionPeople {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private Integer row;
|
||||||
|
|
||||||
|
private Integer fsum;
|
||||||
|
|
||||||
|
private Integer ssum;
|
||||||
|
|
||||||
|
private LinkedList<PeoplesAndNames> fdatas;
|
||||||
|
|
||||||
|
private LinkedList<PeoplesAndNames> sdatas;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/4/2 17:53
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PostionPoints {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer resourceId;
|
||||||
|
|
||||||
|
private Integer changeType;
|
||||||
|
|
||||||
|
private String jobStartDate;
|
||||||
|
|
||||||
|
private String jobYears;
|
||||||
|
|
||||||
|
private Integer points;
|
||||||
|
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
private Integer checkResult;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.engine.wysecond.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/27 10:08
|
||||||
|
* @Description: uf_ywzwxx
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ResourcesPo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String resourceId;
|
||||||
|
|
||||||
|
private String resource;
|
||||||
|
|
||||||
|
private String department;
|
||||||
|
|
||||||
|
private String postionType;
|
||||||
|
|
||||||
|
private String postion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任职日期
|
||||||
|
*/
|
||||||
|
private String workDate;
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.engine.wysecond.entity.resume;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class EducationInfo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String xl;
|
||||||
|
|
||||||
|
private String xw;
|
||||||
|
|
||||||
|
private String byyx;
|
||||||
|
|
||||||
|
private String xxzy;
|
||||||
|
|
||||||
|
private Integer xxxs;
|
||||||
|
|
||||||
|
private Integer sfzgxl;
|
||||||
|
|
||||||
|
private Integer sfzgxw;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.engine.wysecond.entity.resume;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 15:05
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class EducationOrWorkInfo {
|
||||||
|
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
private String startAndEndDate;
|
||||||
|
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
private String level;
|
||||||
|
}
|
@ -0,0 +1,116 @@
|
|||||||
|
package com.engine.wysecond.entity.resume;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import net.coobird.thumbnailator.Thumbnails;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.util.IOUtils;
|
||||||
|
import weaver.file.ImageFileManager;
|
||||||
|
import weaver.general.GCONST;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.util.Base64;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 14:56
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PersonnelResumePo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String workcode;
|
||||||
|
private String lastName;
|
||||||
|
private String sex;
|
||||||
|
private String birthday;
|
||||||
|
private String resourceImageId;
|
||||||
|
private String policy;
|
||||||
|
|
||||||
|
private String nation;
|
||||||
|
private String nativePlace;
|
||||||
|
private String companyStartDate;
|
||||||
|
private String joinPartyDate;
|
||||||
|
private String workStartDate;
|
||||||
|
private String highPersonType;
|
||||||
|
private String jobCall;
|
||||||
|
private String department;
|
||||||
|
private String jobTitle;
|
||||||
|
private String postionLevel;
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
private String fullHighEducational;
|
||||||
|
private String fullHighMajor;
|
||||||
|
private String fullHighSchool;
|
||||||
|
private String fullHighDegree;
|
||||||
|
|
||||||
|
|
||||||
|
private String notfullHighEducational;
|
||||||
|
private String notfullHighMajor;
|
||||||
|
private String notfullHighSchool;
|
||||||
|
private String notfullHighDegree;
|
||||||
|
|
||||||
|
|
||||||
|
public String getSex() {
|
||||||
|
if ("1".equals(sex)) {
|
||||||
|
return "女";
|
||||||
|
}
|
||||||
|
return "男";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
if (StringUtils.isBlank(resourceImageId)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
ImageFileManager manager = new ImageFileManager();
|
||||||
|
manager.getImageFileInfoById(Util.getIntValue(resourceImageId));
|
||||||
|
InputStream inputStream = manager.getInputStream();
|
||||||
|
String imageStr = "";
|
||||||
|
try {
|
||||||
|
String outPutPath = GCONST.getRootPath() + "hrm" + File.separator + "import" + File.separator + "template" + File.separator
|
||||||
|
+ manager.getImageFileName();
|
||||||
|
|
||||||
|
File f = new File(outPutPath);
|
||||||
|
if (!f.exists()) {
|
||||||
|
String substring = outPutPath.substring(0, outPutPath.lastIndexOf(File.separator));
|
||||||
|
File file = new File(substring);
|
||||||
|
if (file.mkdirs()) {
|
||||||
|
boolean newFile = f.createNewFile();
|
||||||
|
if (!newFile) {
|
||||||
|
throw new IOException(outPutPath + "文件创建失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Thumbnails.of(inputStream).forceSize(100, 120).toFile(f);
|
||||||
|
try (InputStream fileInputStream = Files.newInputStream(f.toPath())) { // 使用 try-with-resources 确保 fileInputStream 关闭
|
||||||
|
imageStr = "data:image/" + manager.getImageFileType() + ";base64," + Base64.getEncoder().encodeToString(IOUtils.toByteArray(fileInputStream));
|
||||||
|
}
|
||||||
|
// 删除文件
|
||||||
|
f.delete();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return imageStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthday() {
|
||||||
|
if (StringUtils.isBlank(birthday)) {
|
||||||
|
return "";
|
||||||
|
}else {
|
||||||
|
return birthday.substring(0,7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.engine.wysecond.entity.resume;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 15:00
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PersonnelResumeTable {
|
||||||
|
|
||||||
|
private List<PersonnelResumeTd> columns;
|
||||||
|
|
||||||
|
private List<List<PersonnelResumeTd>> datas;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.engine.wysecond.entity.resume;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 15:01
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PersonnelResumeTd {
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private Integer colspans;
|
||||||
|
|
||||||
|
private Integer rowspans;
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.engine.wysecond.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.wysecond.entity.resume.PersonnelResumePo;
|
||||||
|
import com.engine.wysecond.entity.resume.PersonnelResumeTable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 14:41
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PersonnelResumeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 人员简历
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/2/17 14:53
|
||||||
|
* @param: [resourceId]
|
||||||
|
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> getResumeList(String resourceId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 根据人员id获取主表信息
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/2/18 10:43
|
||||||
|
* @param: [resourceId]
|
||||||
|
* @return: com.engine.shkjsecond.entity.PersonnelResumePo
|
||||||
|
*/
|
||||||
|
PersonnelResumePo peopleMainInfo(String resourceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据人员id获取明细表信息
|
||||||
|
* @param resourceId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PersonnelResumeTable> peopleDetailInfo(String resourceId);
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.engine.wysecond.service;
|
||||||
|
|
||||||
|
import com.engine.wysecond.entity.PostionMatrixVo;
|
||||||
|
import com.engine.wysecond.entity.ResourcesPo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/26 10:03
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PostionMatrixService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 岗位矩阵图
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/2/26 10:09
|
||||||
|
* @param: []
|
||||||
|
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||||
|
*/
|
||||||
|
PostionMatrixVo postionMatrix();
|
||||||
|
|
||||||
|
|
||||||
|
/** 建模人员业务职务信息
|
||||||
|
* @Description:
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/2/28 16:41
|
||||||
|
* @param: []
|
||||||
|
* @return: java.util.List<com.engine.wysecond.entity.ResourcesPo>
|
||||||
|
*/
|
||||||
|
List<ResourcesPo> postionPeoples();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 按照起始时间过滤
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/3/3 10:42
|
||||||
|
* @param: [resourcesPos]
|
||||||
|
* @return: java.util.List<com.engine.wysecond.entity.ResourcesPo>
|
||||||
|
*/
|
||||||
|
List<ResourcesPo> filterClosestWorkDate(List<ResourcesPo> resourcesPos);
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.engine.wysecond.service;
|
||||||
|
|
||||||
|
import com.engine.wysecond.entity.ResourcesPo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/28 16:18
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface ResourceCardService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 更新人员卡片工作信息自定义字段 (存在导入全量更新)
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2025/2/28 16:22
|
||||||
|
* @param: [resourcesPo]
|
||||||
|
* @return: int
|
||||||
|
*/
|
||||||
|
int upDateCard(List<ResourcesPo> resourcesPo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模业务职务信息导入更新人员卡片字段
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int modeExport();
|
||||||
|
}
|
@ -0,0 +1,287 @@
|
|||||||
|
package com.engine.wysecond.service.impl;
|
||||||
|
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.wysecond.entity.resume.*;
|
||||||
|
import com.engine.wysecond.service.PersonnelResumeService;
|
||||||
|
import com.engine.wysecond.util.FieldTransUtils;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.company.DepartmentComInfo;
|
||||||
|
import weaver.hrm.job.EducationLevelComInfo;
|
||||||
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 14:41
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class PersonnelResumeServiceImpl extends Service implements PersonnelResumeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getResumeList(String resourceId) {
|
||||||
|
Map<String, Object> resultMap = new HashMap<>(8);
|
||||||
|
PersonnelResumePo personnelResumePo = peopleMainInfo(resourceId);
|
||||||
|
resultMap.put("workcode",personnelResumePo.getWorkcode());
|
||||||
|
resultMap.put("lastName",personnelResumePo.getLastName());
|
||||||
|
resultMap.put("sex",personnelResumePo.getSex());
|
||||||
|
resultMap.put("birthday",personnelResumePo.getBirthday());
|
||||||
|
resultMap.put("resourceImageId",personnelResumePo.getImage());
|
||||||
|
resultMap.put("nation",personnelResumePo.getNation());
|
||||||
|
resultMap.put("nativePlace",personnelResumePo.getNativePlace());
|
||||||
|
resultMap.put("companyStartDate",personnelResumePo.getCompanyStartDate());
|
||||||
|
resultMap.put("joinPartyDate",personnelResumePo.getJoinPartyDate());
|
||||||
|
resultMap.put("workStartDate",personnelResumePo.getWorkStartDate());
|
||||||
|
resultMap.put("highPersonType",personnelResumePo.getHighPersonType());
|
||||||
|
resultMap.put("jobCall",personnelResumePo.getJobCall());
|
||||||
|
resultMap.put("department",personnelResumePo.getDepartment());
|
||||||
|
resultMap.put("jobTitle",personnelResumePo.getJobTitle());
|
||||||
|
resultMap.put("postionLevel",personnelResumePo.getPostionLevel());
|
||||||
|
resultMap.put("fullHighEducational",personnelResumePo.getFullHighEducational());
|
||||||
|
resultMap.put("fullHighMajor",personnelResumePo.getFullHighMajor());
|
||||||
|
resultMap.put("fullHighSchool",personnelResumePo.getFullHighSchool());
|
||||||
|
resultMap.put("fullHighDegree",personnelResumePo.getFullHighDegree());
|
||||||
|
resultMap.put("policy",personnelResumePo.getPolicy());
|
||||||
|
resultMap.put("position",personnelResumePo.getPosition());
|
||||||
|
|
||||||
|
resultMap.put("notfullHighEducational",personnelResumePo.getNotfullHighEducational());
|
||||||
|
resultMap.put("notfullHighMajor",personnelResumePo.getNotfullHighMajor());
|
||||||
|
resultMap.put("notfullHighSchool",personnelResumePo.getNotfullHighSchool());
|
||||||
|
resultMap.put("notfullHighDegree",personnelResumePo.getNotfullHighDegree());
|
||||||
|
|
||||||
|
|
||||||
|
//表格拓展
|
||||||
|
resultMap.put("tables", peopleDetailInfo(resourceId));
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PersonnelResumeTable> peopleDetailInfo(String resourceId) {
|
||||||
|
List<PersonnelResumeTable> tables = new ArrayList<>();
|
||||||
|
|
||||||
|
List<PersonnelResumeTd> columns = new ArrayList<>();
|
||||||
|
List<List<PersonnelResumeTd>> datas = new ArrayList<>();
|
||||||
|
|
||||||
|
//1.教育和工作经历经历
|
||||||
|
LinkedList<EducationOrWorkInfo> educationInfos = selectEducationOrWorkInfo(resourceId);
|
||||||
|
|
||||||
|
//按照起始时间排序
|
||||||
|
educationInfos.sort(Comparator.comparing(EducationOrWorkInfo::getStartDate));
|
||||||
|
|
||||||
|
//增加空行
|
||||||
|
//educationInfos.add(EducationOrWorkInfo.builder().build());
|
||||||
|
for (EducationOrWorkInfo educationInfo : educationInfos) {
|
||||||
|
List<PersonnelResumeTd> educTr = new ArrayList<>();
|
||||||
|
educTr.add(PersonnelResumeTd.builder().colspans(2).value(educationInfo.getStartAndEndDate()).rowspans(1).build());
|
||||||
|
educTr.add(PersonnelResumeTd.builder().colspans(2).value(educationInfo.getAddress()).rowspans(1).build());
|
||||||
|
educTr.add(PersonnelResumeTd.builder().colspans(1).value(educationInfo.getContent()).rowspans(1).build());
|
||||||
|
educTr.add(PersonnelResumeTd.builder().colspans(2).value(educationInfo.getLevel()).rowspans(1).build());
|
||||||
|
datas.add(educTr);
|
||||||
|
}
|
||||||
|
|
||||||
|
columns.add(PersonnelResumeTd.builder().colspans(1).value("简历").rowspans(educationInfos.size()+1).build());
|
||||||
|
columns.add(PersonnelResumeTd.builder().colspans(2).value("起始时间-结束时间").rowspans(1).build());
|
||||||
|
columns.add(PersonnelResumeTd.builder().colspans(2).value("单位/学校(从高中毕业后开始填写)").rowspans(1).build());
|
||||||
|
columns.add(PersonnelResumeTd.builder().colspans(1).value("岗位/专业").rowspans(1).build());
|
||||||
|
columns.add(PersonnelResumeTd.builder().colspans(2).value("业务职务层级/学历").rowspans(1).build());
|
||||||
|
|
||||||
|
tables.add(PersonnelResumeTable.builder().columns(columns).datas(datas).build());
|
||||||
|
|
||||||
|
return tables;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private LinkedList<EducationOrWorkInfo> selectEducationOrWorkInfo(String resourceId) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
LinkedList<EducationOrWorkInfo> educationOrWorkInfos = new LinkedList<>();
|
||||||
|
//教育经历
|
||||||
|
rs.executeQuery("select rxsj,bysj,byyx,xxzy,xl from uf_jxjl where xm = ?",resourceId);
|
||||||
|
EducationLevelComInfo educ = new EducationLevelComInfo();
|
||||||
|
while (rs.next()) {
|
||||||
|
String date = Util.null2String(rs.getString("rxsj")) +" - " + Util.null2String(rs.getString("bysj"));
|
||||||
|
|
||||||
|
educationOrWorkInfos.add(EducationOrWorkInfo.builder()
|
||||||
|
.startDate(Util.null2String(rs.getString("rxsj")))
|
||||||
|
.startAndEndDate(date)
|
||||||
|
.address(Util.null2String(rs.getString("byyx")))
|
||||||
|
.content(Util.null2String(rs.getString("xxzy")))
|
||||||
|
.level(educ.getEducationLevelname(Util.null2String(rs.getString("xl"))))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
//工作经历
|
||||||
|
rs.executeQuery("select qssj,zzsj,lldw,rzgw,zwzwdj from uf_gzjj where xm = ?",resourceId);
|
||||||
|
while (rs.next()) {
|
||||||
|
String date = Util.null2String(rs.getString("qssj")) +" - " + Util.null2String(rs.getString("zzsj"));
|
||||||
|
educationOrWorkInfos.add(EducationOrWorkInfo.builder()
|
||||||
|
.startDate(Util.null2String(rs.getString("qssj")))
|
||||||
|
.startAndEndDate(date)
|
||||||
|
.address(Util.null2String(rs.getString("lldw")))
|
||||||
|
.content(Util.null2String(rs.getString("rzgw")))
|
||||||
|
.level(Util.null2String(rs.getString("zwzwdj")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
return educationOrWorkInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
@Override
|
||||||
|
public PersonnelResumePo peopleMainInfo(String resourceId) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
|
String nation = rs.getPropValue("wysecond", "nation");
|
||||||
|
String joinPartyDate = rs.getPropValue("wysecond", "joinPartyDate");
|
||||||
|
String workStartDate = rs.getPropValue("wysecond", "workStartDate");
|
||||||
|
String highPersonType = rs.getPropValue("wysecond", "highPersonType");
|
||||||
|
String jobCall = rs.getPropValue("wysecond", "jobCall");
|
||||||
|
String postion = rs.getPropValue("wysecond", "postion");
|
||||||
|
String position = rs.getPropValue("wysecond", "position");
|
||||||
|
String policy = rs.getPropValue("wysecond", "policy");
|
||||||
|
String jobTitle = rs.getPropValue("wysecond", "jobTitle");
|
||||||
|
DepartmentComInfo dept = new DepartmentComInfo();
|
||||||
|
JobTitlesComInfo job = new JobTitlesComInfo();
|
||||||
|
|
||||||
|
rs.executeQuery("SELECT h.id, workcode, lastname, sex, birthday, resourceimageid, b."+nation+" as nation, nativeplace, \n" +
|
||||||
|
" companystartdate, b."+joinPartyDate+" as joinPartyDate, c."+workStartDate+" as workStartDate, c."+highPersonType+" as highPersonType, \n" +
|
||||||
|
" b."+jobCall+" as jobCall,departmentid, d."+jobTitle+" as jobTitle, c."+postion+" as postion,d."+position+" as position, d."+policy+" as policy FROM hrmresource h \n" +
|
||||||
|
" LEFT JOIN cus_fielddata b on b.id = h.id and b.scopeid = 1 and b.scope = 'HrmCustomFieldByInfoType' \n" +
|
||||||
|
" LEFT JOIN cus_fielddata c on c.id = h.id and c.scopeid = 3 and c.scope = 'HrmCustomFieldByInfoType' \n" +
|
||||||
|
" LEFT JOIN cus_fielddata d on d.id = h.id and d.scopeid = -1 and d.scope = 'HrmCustomFieldByInfoType' \n" +
|
||||||
|
"where h.id = ?",resourceId);
|
||||||
|
PersonnelResumePo personnelResumePo = PersonnelResumePo.builder().build();
|
||||||
|
if (rs.next()) {
|
||||||
|
String id = Util.null2String(rs.getString("id"));
|
||||||
|
personnelResumePo.setWorkcode(Util.null2String(rs.getString("workcode")));
|
||||||
|
personnelResumePo.setLastName(Util.null2String(rs.getString("lastname")));
|
||||||
|
personnelResumePo.setSex(Util.null2String(rs.getString("sex")));
|
||||||
|
personnelResumePo.setBirthday(Util.null2String(rs.getString("birthday")));
|
||||||
|
personnelResumePo.setResourceImageId(Util.null2String(rs.getString("resourceimageid")));
|
||||||
|
personnelResumePo.setNation(selectNationName(Util.null2String(rs.getString("nation"))));
|
||||||
|
personnelResumePo.setNativePlace(Util.null2String(rs.getString("nativeplace")));
|
||||||
|
personnelResumePo.setCompanyStartDate(Util.null2String(rs.getString("companystartdate")));
|
||||||
|
personnelResumePo.setJoinPartyDate(Util.null2String(rs.getString("joinPartyDate")));
|
||||||
|
personnelResumePo.setWorkStartDate(Util.null2String(rs.getString("workStartDate")));
|
||||||
|
personnelResumePo.setHighPersonType(selectItemValue(highPersonType,Util.getIntValue(rs.getString("highPersonType")),String.valueOf(user.getLanguage())));
|
||||||
|
personnelResumePo.setJobCall(selectItemValue(jobCall,Util.getIntValue(rs.getString("jobCall")),String.valueOf(user.getLanguage())));
|
||||||
|
personnelResumePo.setDepartment(dept.getDepartmentName(Util.null2String(rs.getString("departmentid"))));
|
||||||
|
personnelResumePo.setJobTitle(FieldTransUtils.selectJobTitleName(Util.null2String(rs.getString("jobTitle"))));
|
||||||
|
personnelResumePo.setPostionLevel(selectPostionLevel(Util.null2String(rs.getString("postion"))));
|
||||||
|
personnelResumePo.setPosition(selectItemValue(position,Util.getIntValue(rs.getString("position")),String.valueOf(user.getLanguage())));
|
||||||
|
personnelResumePo.setPolicy(selectItemValue(policy,Util.getIntValue(rs.getString("policy")),String.valueOf(user.getLanguage())));
|
||||||
|
|
||||||
|
//全日制最高学历
|
||||||
|
//全日制最高学历毕业院校
|
||||||
|
//全日制最高学历毕业专业
|
||||||
|
List<EducationInfo> educationInfos = selectEducInfo(id);
|
||||||
|
EducationInfo highEduc = educationInfos.stream()
|
||||||
|
.filter(info -> (info.getXxxs() == 0 && info.getSfzgxl() == 0))
|
||||||
|
.max(Comparator.comparingInt(EducationInfo::getId))
|
||||||
|
.orElse(new EducationInfo());
|
||||||
|
|
||||||
|
personnelResumePo.setFullHighEducational(highEduc.getXl());
|
||||||
|
personnelResumePo.setFullHighSchool(highEduc.getByyx());
|
||||||
|
personnelResumePo.setFullHighMajor(highEduc.getXxzy());
|
||||||
|
|
||||||
|
//全日制最高学位
|
||||||
|
EducationInfo highMajor = educationInfos.stream()
|
||||||
|
.filter(info -> (info.getXxxs() == 0 && info.getSfzgxw() == 0))
|
||||||
|
.max(Comparator.comparingInt(EducationInfo::getId))
|
||||||
|
.orElse(new EducationInfo());
|
||||||
|
personnelResumePo.setFullHighDegree(highMajor.getXw());
|
||||||
|
|
||||||
|
//非全全日制最高学历
|
||||||
|
//非全日制最高学历毕业院校
|
||||||
|
//非全日制最高学历毕业专业
|
||||||
|
EducationInfo nfHighEduc = educationInfos.stream()
|
||||||
|
.filter(info -> (info.getXxxs() == 1 && info.getSfzgxl() == 0))
|
||||||
|
.max(Comparator.comparingInt(EducationInfo::getId))
|
||||||
|
.orElse(new EducationInfo());
|
||||||
|
|
||||||
|
personnelResumePo.setNotfullHighEducational(nfHighEduc.getXl());
|
||||||
|
personnelResumePo.setNotfullHighSchool(nfHighEduc.getByyx());
|
||||||
|
personnelResumePo.setNotfullHighMajor(nfHighEduc.getXxzy());
|
||||||
|
|
||||||
|
//非全日制最高学位
|
||||||
|
EducationInfo nfHighMajor = educationInfos.stream()
|
||||||
|
.filter(info -> (info.getXxxs() == 1 && info.getSfzgxw() == 0))
|
||||||
|
.max(Comparator.comparingInt(EducationInfo::getId))
|
||||||
|
.orElse(new EducationInfo());
|
||||||
|
personnelResumePo.setNotfullHighDegree(nfHighMajor.getXw());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return personnelResumePo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String selectItemValue(String field, Integer selectValue,String language) {
|
||||||
|
field = field.substring("field".length());
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
|
rs.executeQuery("select selectname from cus_selectitem where fieldid = ? and selectvalue = ?",field,selectValue);
|
||||||
|
rs.next();
|
||||||
|
return Util.formatMultiLang(Util.null2String(rs.getString("selectname")),language);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String selectWorkflowItem(String fieldName, String tableName,Integer selectValue,String language) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
Integer fieldId = null;
|
||||||
|
rs.executeQuery("select id from workflow_billfield where billid = (select id from workflow_bill where tablename = '"+tableName+"') \n" +
|
||||||
|
" and fieldname = '"+fieldName+"'");
|
||||||
|
if (rs.next()) {
|
||||||
|
fieldId = Util.getIntValue(rs.getString("id"));
|
||||||
|
}
|
||||||
|
rs.executeQuery("select selectname from workflow_selectitem where fieldid = ? and selectvalue = ?",fieldId,selectValue);
|
||||||
|
rs.next();
|
||||||
|
return Util.formatMultiLang(Util.null2String(rs.getString("selectname")),language);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String selectNationName(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select mz from uf_mz_ where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("mz"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String selectPostionLevel(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select ywzwcj from uf_ywzwcj where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("ywzwcj"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<EducationInfo> selectEducInfo(String resourceId) {
|
||||||
|
List<EducationInfo> educationInfos = new ArrayList<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
EducationLevelComInfo educ = new EducationLevelComInfo();
|
||||||
|
rs.executeQuery("select id,xl,xw,byyx,xxzy,sfzgxw,sfzgxl,xxxs from uf_jxjl where xm = ?",resourceId);
|
||||||
|
while (rs.next()) {
|
||||||
|
educationInfos.add(EducationInfo.builder()
|
||||||
|
.id(Util.getIntValue(rs.getString("id")))
|
||||||
|
.xl(educ.getEducationLevelname(Util.null2String(rs.getString("xl"))))
|
||||||
|
.xw(selectWorkflowItem("xw","uf_jxjl",Util.getIntValue(rs.getString("xw")),String.valueOf(user.getLanguage())))
|
||||||
|
.byyx(Util.null2String(rs.getString("byyx")))
|
||||||
|
.xxzy(Util.null2String(rs.getString("xxzy")))
|
||||||
|
.xxxs(Util.getIntValue(rs.getString("xxxs")))
|
||||||
|
.sfzgxw(Util.getIntValue(rs.getString("sfzgxw")))
|
||||||
|
.sfzgxl(Util.getIntValue(rs.getString("sfzgxl")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
return educationInfos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.engine.wysecond.service.impl;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.wysecond.entity.ResourcesPo;
|
||||||
|
import com.engine.wysecond.service.PostionMatrixService;
|
||||||
|
import com.engine.wysecond.service.ResourceCardService;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/28 16:18
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceCardServiceImpl extends Service implements ResourceCardService {
|
||||||
|
|
||||||
|
private PostionMatrixService getService(User user) {
|
||||||
|
return ServiceUtil.getService(PostionMatrixServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int upDateCard(List<ResourcesPo> resourcesPo) {
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String postionType = rs.getPropValue("wysecond", "postionType");
|
||||||
|
String postion = rs.getPropValue("wysecond", "postion");
|
||||||
|
resourcesPo.forEach(resources -> {
|
||||||
|
rs.executeQuery("select count(1) as sums from cus_fielddata where id = ? and scopeid =3 and scope = 'HrmCustomFieldByInfoType'",resources.getResourceId());
|
||||||
|
rs.next();
|
||||||
|
|
||||||
|
int sums = Util.getIntValue(rs.getString("sums"));
|
||||||
|
if (sums > 0) {
|
||||||
|
//更新
|
||||||
|
rs.executeUpdate("update cus_fielddata set " + postionType + "= ?," + postion + "= ? where id = ? and scopeid =3 and scope = 'HrmCustomFieldByInfoType'", resources.getPostionType(),
|
||||||
|
resources.getPostion(), resources.getResourceId());
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//插入
|
||||||
|
rs.executeUpdate("insert into cus_fielddata(id,scopeid,scope,"+postionType+","+postion+") values(?,?,?,?,?)",resources.getResourceId(),
|
||||||
|
3,"HrmCustomFieldByInfoType",resources.getPostionType(),resources.getPostion());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
return resourcesPo.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int modeExport() {
|
||||||
|
//导入Excel完成后回调 获取全量数据
|
||||||
|
List<ResourcesPo> resourcesPoList = getService(user).postionPeoples();
|
||||||
|
return upDateCard(resourcesPoList);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.engine.wysecond.util;
|
||||||
|
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/4/8 13:47
|
||||||
|
* @Description: 字段值转换
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class FieldTransUtils {
|
||||||
|
|
||||||
|
|
||||||
|
public static String selectHrmItem(String fieldName,Integer selectValue,String language) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
|
rs.executeQuery("select selectname from hrm_selectitem where fieldid = (select fieldid from hrm_formfield where fieldname = '"+fieldName+"') and selectvalue = ?",selectValue);
|
||||||
|
rs.next();
|
||||||
|
return Util.formatMultiLang(Util.null2String(rs.getString("selectname")),language);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String selectItemValue(String field, Integer selectValue,String language) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select selectname from cus_selectitem where fieldid = ? and selectvalue = ?",field,selectValue);
|
||||||
|
rs.next();
|
||||||
|
return Util.formatMultiLang(Util.null2String(rs.getString("selectname")),language);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String selectJobTitleName(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select gwmc from uf_gwgl where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("gwmc"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String selectNationName(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select mz from uf_mz_ where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("mz"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String selectPostionType(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select ywzwxl from uf_ywzwxl where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("ywzwxl"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String selectPostion(String value) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select ywzwcj from uf_ywzwcj where id = ?",value);
|
||||||
|
rs.next();
|
||||||
|
return Util.null2String(rs.getString("ywzwcj"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.engine.wysecond.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.wysecond.service.PersonnelResumeService;
|
||||||
|
import com.engine.wysecond.service.impl.PersonnelResumeServiceImpl;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/17 14:40
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PersonnelResumeAction {
|
||||||
|
|
||||||
|
private PersonnelResumeService getService(User user) {
|
||||||
|
return ServiceUtil.getService(PersonnelResumeServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getResumeList")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String getResumeList(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("resourceId") String resourceId){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("resumeList",getService(user).getResumeList(resourceId));
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.engine.wysecond.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.wysecond.service.PostionMatrixService;
|
||||||
|
import com.engine.wysecond.service.impl.PostionMatrixServiceImpl;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/21 11:11
|
||||||
|
* @Description: 岗位矩阵图
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PostionMatrixAction {
|
||||||
|
|
||||||
|
private PostionMatrixService getService(User user) {
|
||||||
|
return ServiceUtil.getService(PostionMatrixServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/matrix")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String postionMatrix(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("postionList",getService(user).postionMatrix());
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.engine.wysecond.web;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.wysecond.service.ResourceCardService;
|
||||||
|
import com.engine.wysecond.service.impl.ResourceCardServiceImpl;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/3/6 11:33
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceCardAction {
|
||||||
|
|
||||||
|
private ResourceCardService getService(User user) {
|
||||||
|
return ServiceUtil.getService(ResourceCardServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/modeExport")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String modeExport(@Context HttpServletRequest request, @Context HttpServletResponse response){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
getService(user).modeExport();
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package weaver.formmode.customjavacode.modeexpand;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.wysecond.entity.ResourcesPo;
|
||||||
|
import com.engine.wysecond.service.PostionMatrixService;
|
||||||
|
import com.engine.wysecond.service.ResourceCardService;
|
||||||
|
import com.engine.wysecond.service.impl.PostionMatrixServiceImpl;
|
||||||
|
import com.engine.wysecond.service.impl.ResourceCardServiceImpl;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.soa.workflow.request.RequestInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/2/28 17:44
|
||||||
|
* @Description: 建模卡片按钮扩展
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PostionModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
|
|
||||||
|
private ResourceCardService getCardService(User user) {
|
||||||
|
return ServiceUtil.getService(ResourceCardServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PostionMatrixService getMatrixService(User user) {
|
||||||
|
return ServiceUtil.getService(PostionMatrixServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||||
|
Map<String, String> result = new HashMap<>();
|
||||||
|
try {
|
||||||
|
User user = (User)param.get("user");
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
RequestInfo requestInfo = (RequestInfo)param.get("RequestInfo");
|
||||||
|
if(requestInfo != null){
|
||||||
|
int billid = Util.getIntValue(requestInfo.getRequestid());
|
||||||
|
int modeid = Util.getIntValue(requestInfo.getWorkflowid());
|
||||||
|
if(billid > 0 && modeid > 0){
|
||||||
|
rs.executeQuery("select xm from uf_ywzwxx where id = ?",billid);
|
||||||
|
rs.next();
|
||||||
|
String xm = Util.null2String(rs.getString("xm"));
|
||||||
|
|
||||||
|
String sql = "select id,xm,ywzwxl,ywzwcj,rbywzwcjqssj from uf_ywzwxx where rbywzwcjqssj is not null and xm = ?";
|
||||||
|
rs.executeQuery(sql,xm);
|
||||||
|
List<ResourcesPo> resourcesList = new ArrayList<>();
|
||||||
|
while (rs.next()) {
|
||||||
|
resourcesList.add(ResourcesPo.builder()
|
||||||
|
.id(Util.getIntValue(rs.getString("id")))
|
||||||
|
.resourceId(Util.null2String(rs.getString("xm")))
|
||||||
|
.postionType(Util.null2String(rs.getString("ywzwxl")))
|
||||||
|
.postion(Util.null2String(rs.getString("ywzwcj")))
|
||||||
|
.workDate(Util.null2String(rs.getString("rbywzwcjqssj")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ResourcesPo> resourcesPos = getMatrixService(user).filterClosestWorkDate(resourcesList);
|
||||||
|
|
||||||
|
//更新
|
||||||
|
getCardService(user).upDateCard(resourcesPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
result.put("errmsg","业务职务信息更新人员卡片失败");
|
||||||
|
result.put("flag", "false");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,205 @@
|
|||||||
|
package weaver.interfaces.jclproduct;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.engine.jclproduct.entity.bo.EmploymentRecordBo;
|
||||||
|
import com.engine.jclproduct.entity.po.DataDutyPo;
|
||||||
|
import com.engine.jclproduct.entity.po.EmploymentRecordPo;
|
||||||
|
import com.engine.jclproduct.entity.po.HrmresourcePo;
|
||||||
|
import com.engine.jclproduct.utils.EmploymentUtil;
|
||||||
|
import com.weaver.file.ConfigOperator;
|
||||||
|
import com.weaver.general.BaseBean;
|
||||||
|
import com.weaver.general.TimeUtil;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.schedule.BaseCronJob;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/10/22 4:24 PM
|
||||||
|
* @Description: 人员入转调离 任职变化 记录任务
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EmploymentRecordCrob extends BaseCronJob {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
//1.获取当前人员信息数据
|
||||||
|
List<HrmresourcePo> hrmresourcePoList = EmploymentUtil.getHrmResources();
|
||||||
|
|
||||||
|
//人员信息表更新集合
|
||||||
|
List<HrmresourcePo> hrmresourceUpdate = new ArrayList<>();
|
||||||
|
|
||||||
|
//人员信息表新增集合
|
||||||
|
List<HrmresourcePo> hrmresourceInsert = new ArrayList<>();
|
||||||
|
|
||||||
|
//任职记录表新增集合
|
||||||
|
List<EmploymentRecordPo> employmentRecordInsert = new ArrayList<>();
|
||||||
|
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
String formModeId = bb.getPropValue("jclproduct", "eModeId");
|
||||||
|
|
||||||
|
String modeDataCreateDate = DateUtil.getCurrentDate();
|
||||||
|
String modeDataCreateTime = TimeUtil.getOnlyCurrentTimeString();
|
||||||
|
ConfigOperator configOperator = new ConfigOperator();
|
||||||
|
configOperator.setProp("jclproduct.properties", "startDate", modeDataCreateDate);
|
||||||
|
|
||||||
|
//2.与人力资源中间表对比每一条人员数据 todo 数据量大的情况下线程处理
|
||||||
|
hrmresourcePoList.forEach(hrmresource->{
|
||||||
|
|
||||||
|
//1.入转调离 人员数据变化处理
|
||||||
|
DataDutyPo dataDutyPo = dutyDatasChange(hrmresource);
|
||||||
|
if (dataDutyPo.getHrmresourceUpdate() != null) {
|
||||||
|
hrmresourceUpdate.add(dataDutyPo.getHrmresourceUpdate());
|
||||||
|
}
|
||||||
|
if (dataDutyPo.getHrmresourceInsert() != null) {
|
||||||
|
hrmresourceInsert.add(dataDutyPo.getHrmresourceInsert());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(dataDutyPo.getEmploymentRecordInsert())) {
|
||||||
|
employmentRecordInsert.addAll(dataDutyPo.getEmploymentRecordInsert());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
bb.writeLog("hrmresourceUpdate:"+hrmresourceUpdate.size());
|
||||||
|
bb.writeLog("hrmresourceInsert:"+hrmresourceInsert.size());
|
||||||
|
bb.writeLog("employmentRecordInsert:"+employmentRecordInsert.size());
|
||||||
|
//3.人员信息中间表
|
||||||
|
//更新
|
||||||
|
hrmresourceUpdate.forEach(e -> rs.executeUpdate("update uf_hrmresource_day set status=?,companystartdate=?,companyworkyear=?," +
|
||||||
|
" sex=?,birthday=?,jobtitle=?,departmentid=?,subcompanyid=?,managerid=? where userid=?",e.getStatus(),e.getCompanyStartDate(),
|
||||||
|
e.getCompanyWorkyear(),e.getSex(),e.getBirthday(),e.getJobTitle(),e.getDepartmentId(),e.getSubcompanyId(),e.getManagerId(),e.getUserId()));
|
||||||
|
|
||||||
|
//插入
|
||||||
|
hrmresourceInsert.forEach(e-> rs.executeUpdate("insert into uf_hrmresource_day(userId,workcode,companystartdate,companyworkyear," +
|
||||||
|
" birthday,jobtitle,departmentid,subcompanyid,managerid,status,sex) values(?,?,?,?,?,?,?,?,?,?,?)",e.getUserId(),e.getWorkcode(),
|
||||||
|
e.getCompanyStartDate(),e.getCompanyWorkyear(),e.getBirthday(),e.getJobTitle(),e.getDepartmentId(),e.getSubcompanyId(),e.getManagerId(),e.getStatus(),e.getSex()));
|
||||||
|
|
||||||
|
|
||||||
|
//4.人员任职记录表
|
||||||
|
employmentRecordInsert.forEach(e->{
|
||||||
|
|
||||||
|
//1.更新上一条数据stopDate
|
||||||
|
List<EmploymentRecordPo> list = new ArrayList<>();
|
||||||
|
rs.executeQuery("select id,startDate from uf_EmploymentRecord where userid = ?",e.getUserId());
|
||||||
|
while (rs.next()) {
|
||||||
|
list.add(EmploymentRecordPo.builder().id(Util.getIntValue(rs.getString("id"))).startDate(Util.null2String(rs.getString("startDate"))).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
String date = DateUtil.getCurrentDate();
|
||||||
|
EmploymentRecordPo latest = list.stream()
|
||||||
|
.max(Comparator.comparing(EmploymentRecordPo::getId))
|
||||||
|
.orElse(null);
|
||||||
|
assert latest != null;
|
||||||
|
if (EmploymentUtil.compareDate(latest.getStartDate())) {
|
||||||
|
date = DateUtil.getYesterday();
|
||||||
|
}
|
||||||
|
|
||||||
|
rs.executeUpdate("update uf_EmploymentRecord set stopDate = ? where id = ?",date,latest.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//2.新增数据
|
||||||
|
rs.executeUpdate("insert into uf_EmploymentRecord(userId,workcode,employeeStatus,changType,startDate,stopDate," +
|
||||||
|
" departmentId,subCompanyId,superior,position,changeOldSuperior,changeNewSuperior,changeOldJob,changeNewJob,changeOldDept,changeNewDept," +
|
||||||
|
" companyStartDate,workyear,entryDateYear,entryDateMonth,entryDateDay,expectedLastWorkDate,lastWorkDate,probationActualStopDate,regularizationDate," +
|
||||||
|
" sex,birthday,formmodeid,modeDataCreateDate,modeDataCreateTime,modeDataCreater) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||||
|
e.getUserId(),e.getWorkcode(),e.getEmployeeStatus(),e.getChangType(),e.getStartDate(),e.getStopDate(),e.getDepartmentId(),
|
||||||
|
e.getSubCompanyId(),e.getSuperior(),e.getPosition(),e.getChangeOldSuperior(),e.getChangeNewSuperior(),
|
||||||
|
e.getChangeOldJob(),e.getChangeNewJob(),e.getChangeOldDept(),e.getChangeNewDept(),e.getCompanyStartDate(),
|
||||||
|
e.getWorkyear(),e.getEntryDateYear(),e.getEntryDateMonth(),e.getEntryDateDay(), e.getExpectedLastWorkDate(),
|
||||||
|
e.getLastWorkDate(),e.getProbationActualStopDate(),e.getRegularizationDate(),e.getSex(),e.getBirthday(),formModeId,modeDataCreateDate,modeDataCreateTime,1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入转调离 人员数据变化处理
|
||||||
|
* @param hrmresource
|
||||||
|
*/
|
||||||
|
private DataDutyPo dutyDatasChange(HrmresourcePo hrmresource){
|
||||||
|
DataDutyPo dataDutyPo = new DataDutyPo();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
//2.1 根据userid获取上一次人员中间表数据作对比
|
||||||
|
rs.executeQuery("select id,userid,workcode,status,companystartdate,companyworkyear,sex,birthday," +
|
||||||
|
" jobtitle,departmentid,subcompanyid,managerid from uf_hrmresource_day where userid = ?",hrmresource.getUserId());
|
||||||
|
|
||||||
|
if (rs.next()) {
|
||||||
|
//3.数据存在作比较
|
||||||
|
HrmresourcePo lastResource = HrmresourcePo.builder()
|
||||||
|
.id(Util.getIntValue(rs.getString("id")))
|
||||||
|
.status(Util.getIntValue(rs.getString("status")))
|
||||||
|
.companyWorkyear(Util.null2String(rs.getString("companyworkyear")))
|
||||||
|
.subcompanyId(Util.getIntValue(rs.getString("subcompanyid")))
|
||||||
|
.departmentId(Util.getIntValue(rs.getString("departmentid")))
|
||||||
|
.jobTitle(Util.getIntValue(rs.getString("jobtitle")))
|
||||||
|
.managerId(Util.getIntValue(rs.getString("managerid")))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
//3.0 数据一致不做处理
|
||||||
|
//3.11 人员状态比较
|
||||||
|
List<EmploymentRecordPo> employmentRecords = new ArrayList<>();
|
||||||
|
if (!hrmresource.getStatus().equals(lastResource.getStatus())) {
|
||||||
|
//状态变更
|
||||||
|
EmploymentRecordPo employmentRecord = EmploymentRecordBo.setEmploymentRecordPo(hrmresource);
|
||||||
|
//记录各种状态下日期
|
||||||
|
EmploymentUtil.dutyStatusDate(employmentRecord);
|
||||||
|
employmentRecords.add(employmentRecord);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//3.12 调动状态比较(分别是 部门 岗位 人员上级 任一个条件发生变化 都记录为调动)
|
||||||
|
if (!hrmresource.getDepartmentId().equals(lastResource.getDepartmentId())
|
||||||
|
|| !hrmresource.getJobTitle().equals(lastResource.getJobTitle())
|
||||||
|
|| !hrmresource.getManagerId().equals(lastResource.getManagerId())){
|
||||||
|
|
||||||
|
EmploymentRecordPo employmentRecord = EmploymentRecordBo.setEmploymentRecordPo(hrmresource);
|
||||||
|
// 记录调动下新旧组织数据留痕
|
||||||
|
employmentRecord.setChangeOldDept(lastResource.getDepartmentId());
|
||||||
|
employmentRecord.setChangeOldJob(lastResource.getJobTitle());
|
||||||
|
employmentRecord.setChangeOldSuperior(lastResource.getManagerId());
|
||||||
|
|
||||||
|
employmentRecord.setChangeNewDept(hrmresource.getDepartmentId());
|
||||||
|
employmentRecord.setChangeNewJob(hrmresource.getJobTitle());
|
||||||
|
employmentRecord.setChangeNewSuperior(hrmresource.getManagerId());
|
||||||
|
|
||||||
|
//调动
|
||||||
|
employmentRecord.setChangType(2);
|
||||||
|
employmentRecords.add(employmentRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!hrmresource.getStatus().equals(lastResource.getStatus())
|
||||||
|
|| !hrmresource.getDepartmentId().equals(lastResource.getDepartmentId())
|
||||||
|
|| !hrmresource.getJobTitle().equals(lastResource.getJobTitle())
|
||||||
|
|| !hrmresource.getManagerId().equals(lastResource.getManagerId())) {
|
||||||
|
//3.1 数据不一致,人员中间表更新
|
||||||
|
hrmresource.setId(lastResource.getId());
|
||||||
|
dataDutyPo.setHrmresourceUpdate(hrmresource);
|
||||||
|
//3.2 数据不一致,任职记录表新增
|
||||||
|
dataDutyPo.setEmploymentRecordInsert(employmentRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//4.数据不存在作新增
|
||||||
|
//4.1 人员中间表新增
|
||||||
|
dataDutyPo.setHrmresourceInsert(hrmresource);
|
||||||
|
//4.2 任职记录表新增
|
||||||
|
List<EmploymentRecordPo> recordList = Collections.singletonList(EmploymentRecordBo.setEmploymentRecordPo(hrmresource));
|
||||||
|
dataDutyPo.setEmploymentRecordInsert(recordList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataDutyPo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package weaver.interfaces.wysecond;
|
||||||
|
|
||||||
|
import com.api.formmode.page.util.Util;
|
||||||
|
import com.engine.integration.util.StringUtils;
|
||||||
|
import com.engine.wysecond.entity.ResourcesPo;
|
||||||
|
import com.engine.wysecond.service.PostionMatrixService;
|
||||||
|
import com.engine.wysecond.service.ResourceCardService;
|
||||||
|
import com.engine.wysecond.service.impl.PostionMatrixServiceImpl;
|
||||||
|
import com.engine.wysecond.service.impl.ResourceCardServiceImpl;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.workflow.action.Action;
|
||||||
|
import weaver.soa.workflow.request.RequestInfo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/3/7 10:34
|
||||||
|
* @Description: 拟晋升业务职务人选审批 流程转建模后数据再写入人员卡片
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PostionPromotionAction implements Action{
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(RequestInfo requestInfo) {
|
||||||
|
int formid = Math.abs(requestInfo.getRequestManager().getFormid());
|
||||||
|
String requestid = requestInfo.getRequestid();
|
||||||
|
String tableName = "formtable_main_"+formid;
|
||||||
|
String detailName = tableName+"_dt1";
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
|
List<String> nameList = new ArrayList<>();
|
||||||
|
rs.executeQuery("select d.xm from "+tableName+" a Left JOIN "+detailName+" d on a.id = d.mainid where a.requestid = ?",requestid);
|
||||||
|
while (rs.next()) {
|
||||||
|
nameList.add(Util.null2String(rs.getString("xm")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(nameList)) {
|
||||||
|
List<ResourcesPo> resourcesPos = postionPeoples(nameList);
|
||||||
|
ResourceCardService resourceCardService = new ResourceCardServiceImpl();
|
||||||
|
resourceCardService.upDateCard(resourcesPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Action.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<ResourcesPo> postionPeoples(List<String> nameList) {
|
||||||
|
PostionMatrixService postionMatrixService = new PostionMatrixServiceImpl();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String join = StringUtils.join(nameList, ",");
|
||||||
|
List<ResourcesPo> resourcesList = new ArrayList<>();
|
||||||
|
rs.executeQuery("select id,xm,szbm,ywzwxl,ywzwcj,rbywzwcjqssj from uf_ywzwxx where " +
|
||||||
|
" rbywzwcjqssj is not null and xm in ("+join+")");
|
||||||
|
while (rs.next()) {
|
||||||
|
resourcesList.add(ResourcesPo.builder()
|
||||||
|
.id(com.weaver.general.Util.getIntValue(rs.getString("id")))
|
||||||
|
.resourceId(com.weaver.general.Util.null2String(rs.getString("xm")))
|
||||||
|
.department(com.weaver.general.Util.null2String(rs.getString("szbm")))
|
||||||
|
.postionType(com.weaver.general.Util.null2String(rs.getString("ywzwxl")))
|
||||||
|
.postion(com.weaver.general.Util.null2String(rs.getString("ywzwcj")))
|
||||||
|
.workDate(com.weaver.general.Util.null2String(rs.getString("rbywzwcjqssj")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
return postionMatrixService.filterClosestWorkDate(resourcesList);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,288 @@
|
|||||||
|
package weaver.interfaces.wysecond;
|
||||||
|
|
||||||
|
import com.engine.wysecond.util.FieldTransUtils;
|
||||||
|
import weaver.conn.RecordSetTrans;
|
||||||
|
import weaver.formmode.setup.ModeRightInfo;
|
||||||
|
import weaver.general.TimeUtil;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.hrm.company.DepartmentComInfo;
|
||||||
|
import weaver.hrm.job.EducationLevelComInfo;
|
||||||
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
|
import weaver.hrm.location.LocationComInfo;
|
||||||
|
import weaver.interfaces.schedule.BaseCronJob;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author
|
||||||
|
* @Date 2025/4/1 18:04
|
||||||
|
* @Description: 人员信息存为快照 业务字段全部转换成文本存储 共 87个字段
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceInfoSnipCron extends BaseCronJob {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
//1.基本信息
|
||||||
|
String workPeopleType = rs.getPropValue("wysecond", "workPeopleType");
|
||||||
|
String workStatus = rs.getPropValue("wysecond", "workStatus");
|
||||||
|
String policy = rs.getPropValue("wysecond", "policy");
|
||||||
|
String landNumber = rs.getPropValue("wysecond", "landNumber");
|
||||||
|
String officeEmail = rs.getPropValue("wysecond", "officeEmail");
|
||||||
|
String position = rs.getPropValue("wysecond", "position");
|
||||||
|
String personType = rs.getPropValue("wysecond", "personType");
|
||||||
|
String jobTitle = rs.getPropValue("wysecond", "jobTitle");
|
||||||
|
|
||||||
|
|
||||||
|
//2.个人信息
|
||||||
|
String age = rs.getPropValue("wysecond", "age");
|
||||||
|
String nation = rs.getPropValue("wysecond", "nation");
|
||||||
|
String birthplace = rs.getPropValue("wysecond", "birthplace");
|
||||||
|
String residenceAddress = rs.getPropValue("wysecond", "residenceAddress");
|
||||||
|
String currentAddress = rs.getPropValue("wysecond", "currentAddress");
|
||||||
|
String residenceType = rs.getPropValue("wysecond", "residenceType");
|
||||||
|
String maritalStatus = rs.getPropValue("wysecond", "maritalStatus");
|
||||||
|
String marryDate = rs.getPropValue("wysecond", "marryDate");
|
||||||
|
String religious = rs.getPropValue("wysecond", "religious");
|
||||||
|
String joinLeagueDate = rs.getPropValue("wysecond", "joinLeagueDate");
|
||||||
|
String joinPartyDate = rs.getPropValue("wysecond", "joinPartyDate");
|
||||||
|
String contactAddress = rs.getPropValue("wysecond", "contactAddress");
|
||||||
|
String mobile = rs.getPropValue("wysecond", "mobile");
|
||||||
|
String email = rs.getPropValue("wysecond", "email");
|
||||||
|
String emergencyName = rs.getPropValue("wysecond", "emergencyName");
|
||||||
|
String emergencyType = rs.getPropValue("wysecond", "emergencyType");
|
||||||
|
String emergencyPhone = rs.getPropValue("wysecond", "emergencyPhone");
|
||||||
|
String highEducation = rs.getPropValue("wysecond", "highEducation");
|
||||||
|
String highDegree = rs.getPropValue("wysecond", "highDegree");
|
||||||
|
String highMajor = rs.getPropValue("wysecond", "highMajor");
|
||||||
|
String schollType = rs.getPropValue("wysecond", "schollType");
|
||||||
|
String jobCall = rs.getPropValue("wysecond", "jobCall");
|
||||||
|
String schoolName = rs.getPropValue("wysecond", "schoolName");
|
||||||
|
|
||||||
|
//3.工作信息
|
||||||
|
String cardNumber = rs.getPropValue("wysecond", "cardNumber");
|
||||||
|
String bankName = rs.getPropValue("wysecond", "bankName");
|
||||||
|
String highPersonType = rs.getPropValue("wysecond", "highPersonType");
|
||||||
|
String identitys = rs.getPropValue("wysecond", "identitys");
|
||||||
|
String socialWorkYear = rs.getPropValue("wysecond", "socialWorkYear");
|
||||||
|
String partyPosition = rs.getPropValue("wysecond", "partyPosition");
|
||||||
|
String tradePosition = rs.getPropValue("wysecond", "tradePosition");
|
||||||
|
String trialStartDate = rs.getPropValue("wysecond", "trialStartDate");
|
||||||
|
String trialEndDate = rs.getPropValue("wysecond", "trialEndDate");
|
||||||
|
String regularDate = rs.getPropValue("wysecond", "regularDate");
|
||||||
|
String workStartDate = rs.getPropValue("wysecond", "workStartDate");
|
||||||
|
String graduatesJoin = rs.getPropValue("wysecond", "graduatesJoin");
|
||||||
|
String proTechnical = rs.getPropValue("wysecond", "proTechnical");
|
||||||
|
String proLevel = rs.getPropValue("wysecond", "proLevel");
|
||||||
|
String postionType = rs.getPropValue("wysecond", "postionType");
|
||||||
|
String postion = rs.getPropValue("wysecond", "postion");
|
||||||
|
String beStartDate = rs.getPropValue("wysecond", "beStartDate");
|
||||||
|
String beEndDate = rs.getPropValue("wysecond", "beEndDate");
|
||||||
|
String belongUnit = rs.getPropValue("wysecond", "belongUnit");
|
||||||
|
String interStartDate = rs.getPropValue("wysecond", "interStartDate");
|
||||||
|
String beJob = rs.getPropValue("wysecond", "beJob");
|
||||||
|
String interEndDate = rs.getPropValue("wysecond", "interEndDate");
|
||||||
|
String interLastDay = rs.getPropValue("wysecond", "interLastDay");
|
||||||
|
String onDegree = rs.getPropValue("wysecond", "onDegree");
|
||||||
|
String onMajor = rs.getPropValue("wysecond", "onMajor");
|
||||||
|
String onSchollType = rs.getPropValue("wysecond", "onSchollType");
|
||||||
|
String onSchollName = rs.getPropValue("wysecond", "onSchollName");
|
||||||
|
String classifiedLevel = rs.getPropValue("wysecond", "classifiedLevel");
|
||||||
|
String joinDeptDate = rs.getPropValue("wysecond", "joinDeptDate");
|
||||||
|
String joinJobDate = rs.getPropValue("wysecond", "joinJobDate");
|
||||||
|
String jobType = rs.getPropValue("wysecond", "jobType");
|
||||||
|
String skillLevel = rs.getPropValue("wysecond", "skillLevel");
|
||||||
|
String belongTeam = rs.getPropValue("wysecond", "belongTeam");
|
||||||
|
String teamLeader = rs.getPropValue("wysecond", "teamLeader");
|
||||||
|
String dingId = rs.getPropValue("wysecond", "dingId");
|
||||||
|
|
||||||
|
|
||||||
|
String month = DateUtil.getCurrentDate().substring(0,7);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String modeId = rs.getPropValue("wysecond", "modeId");
|
||||||
|
String currentDate = TimeUtil.getCurrentDateString();
|
||||||
|
String currentTime = TimeUtil.getOnlyCurrentTimeString();
|
||||||
|
|
||||||
|
DepartmentComInfo dept = new DepartmentComInfo();
|
||||||
|
JobTitlesComInfo job = new JobTitlesComInfo();
|
||||||
|
LocationComInfo location = new LocationComInfo();
|
||||||
|
EducationLevelComInfo education = new EducationLevelComInfo();
|
||||||
|
|
||||||
|
List<List<Object>> insertList = new ArrayList<>();
|
||||||
|
|
||||||
|
rs.executeQuery("select a.id,a.workcode,a.lastname,a.sex,b."+workPeopleType+" as workPeopleType,b."+workStatus+" as workStatus,\n" +
|
||||||
|
"b."+policy+" as policy,b."+landNumber+" as landNumber,b."+officeEmail+" as officeEmail,b."+position+" as position,b."+personType+" as personType,\n" +
|
||||||
|
"a.departmentid,b."+jobTitle+" as jobtitle,a.loginid,a.accounttype,a.belongto,a.status,a.resourceimageid,a.locationid,\n" +
|
||||||
|
"a.certificatenum,a.birthday,c."+age+" as age,a.height,a.weight,c."+nation+" as nation,a.nativeplace,c."+birthplace+" as birthplace,a.healthinfo,\n" +
|
||||||
|
"c."+residenceAddress+" as residenceAddress,c."+currentAddress+" as currentAddress,c."+residenceType+" as residenceType,c."+maritalStatus+" as maritalStatus,\n" +
|
||||||
|
"c."+marryDate+" as marryDate,c."+religious+" as religious,c."+joinLeagueDate+" as joinLeagueDate,c."+joinPartyDate+" as joinPartyDate,\n" +
|
||||||
|
"c."+contactAddress+" as contactAddress,c."+mobile+" as mobile,c."+email+" as email,\n" +
|
||||||
|
"c."+emergencyName+" as emergencyName,c."+emergencyType+" as emergencyType,c."+emergencyPhone+" as emergencyPhone,c."+highEducation+" as highEducation,\n" +
|
||||||
|
"c."+highDegree+" as highDegree,c."+highMajor+" as highMajor,c."+schollType+" as schollType,c."+jobCall+" as jobCall,c."+schoolName+" as schoolName,\n" +
|
||||||
|
"d."+cardNumber+" as cardNumber,d."+bankName+" as bankName,d."+highPersonType+" as highPersonType,d."+identitys+" as identitys,a.workyear,d."+socialWorkYear+" as socialWorkYear,\n" +
|
||||||
|
"a.companyworkyear,d."+partyPosition+" as partyPosition,d."+tradePosition+" as tradePosition,a.companystartdate,a.startdate,\n" +
|
||||||
|
"a.enddate,d."+trialStartDate+" as trialStartDate,d."+trialEndDate+" as trialEndDate,d."+regularDate+" as regularDate,d."+workStartDate+" as workStartDate,\n" +
|
||||||
|
"d."+graduatesJoin+" as graduatesJoin,d."+proTechnical+" as proTechnical,d."+proLevel+" as proLevel,d."+postionType+" as postionType,d."+postion+" as postion,d."+beStartDate+" as beStartDate,\n" +
|
||||||
|
"d."+beEndDate+" as beEndDate,d."+belongUnit+" as belongUnit,d."+interStartDate+" as interStartDate,d."+beJob+" as beJob,d."+interEndDate+" as interEndDate,\n" +
|
||||||
|
"d."+interLastDay+" as interLastDay,d."+onDegree+" as onDegree,d."+onMajor+" as onMajor,d."+onSchollType+" as onSchollType,d."+onSchollName+" as onSchollName,d."+classifiedLevel+" as classifiedLevel,\n" +
|
||||||
|
"d."+joinDeptDate+" as joinDeptDate,d."+joinJobDate+" as joinJobDate,d."+jobType+" as jobType,d."+skillLevel+" as skillLevel,d."+belongTeam+" as belongTeam,d."+teamLeader+" as teamLeader,d."+dingId+" as dingId\n" +
|
||||||
|
"from hrmresource a \n" +
|
||||||
|
"left join cus_fielddata b on a.id = b.id and b.scopeid = -1 and b.scope = 'HrmCustomFieldByInfoType'\n" +
|
||||||
|
"left join cus_fielddata c on a.id = c.id and c.scopeid = 1 and c.scope = 'HrmCustomFieldByInfoType'\n" +
|
||||||
|
"left join cus_fielddata d on a.id = d.id and d.scopeid = 3 and d.scope = 'HrmCustomFieldByInfoType'");
|
||||||
|
while (rs.next()) {
|
||||||
|
List<Object> peopleList = new ArrayList<>();
|
||||||
|
peopleList.add(Util.getIntValue(rs.getString("id")));
|
||||||
|
peopleList.add(month);
|
||||||
|
peopleList.add(Util.null2String(rs.getString("workcode")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("lastname")));
|
||||||
|
peopleList.add(FieldTransUtils.selectHrmItem("sex",Util.getIntValue(rs.getString("sex")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(workPeopleType.substring("field".length()),Util.getIntValue(rs.getString("workPeopleType")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(workStatus.substring("field".length()),Util.getIntValue(rs.getString("workStatus")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(policy.substring("field".length()),Util.getIntValue(rs.getString("policy")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("landNumber")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("officeEmail")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(position.substring("field".length()),Util.getIntValue(rs.getString("position")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(personType.substring("field".length()),Util.getIntValue(rs.getString("personType")),"7"));
|
||||||
|
peopleList.add(dept.getDepartmentname(Util.null2String(rs.getString("departmentid"))));
|
||||||
|
peopleList.add(FieldTransUtils.selectJobTitleName(Util.null2String(rs.getString("jobTitle"))));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("loginid")));
|
||||||
|
peopleList.add(FieldTransUtils.selectHrmItem("accounttype",Util.getIntValue(rs.getString("accounttype")),"7"));
|
||||||
|
peopleList.add(Util.getIntValue(rs.getString("belongto")));
|
||||||
|
peopleList.add(FieldTransUtils.selectHrmItem("status",Util.getIntValue(rs.getString("status")),"7"));
|
||||||
|
// 照片不存
|
||||||
|
//peopleList.add(Util.getIntValue(rs.getString("resourceimageid"),0));
|
||||||
|
peopleList.add(location.getLocationname(Util.null2String(rs.getString("locationid"))));
|
||||||
|
|
||||||
|
peopleList.add(Util.null2String(rs.getString("certificatenum")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("birthday")));
|
||||||
|
peopleList.add(Util.getIntValue(rs.getString("age")));
|
||||||
|
peopleList.add(Util.getIntValue(rs.getString("height")));
|
||||||
|
peopleList.add(Util.getIntValue(rs.getString("weight")));
|
||||||
|
peopleList.add(FieldTransUtils.selectNationName(Util.null2String(rs.getString("nation"))));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("nativeplace")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("birthplace")));
|
||||||
|
peopleList.add(FieldTransUtils.selectHrmItem("healthinfo",Util.getIntValue(rs.getString("healthinfo")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("residenceAddress")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("currentAddress")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(residenceType.substring("field".length()),Util.getIntValue(rs.getString("residenceType")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(maritalStatus.substring("field".length()),Util.getIntValue(rs.getString("maritalStatus")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("marryDate")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(religious.substring("field".length()),Util.getIntValue(rs.getString("religious")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("joinLeagueDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("joinPartyDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("contactAddress")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("mobile")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("email")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("emergencyName")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("emergencyType")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("emergencyPhone")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(highEducation.substring("field".length()),Util.getIntValue(rs.getString("highEducation")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(highDegree.substring("field".length()),Util.getIntValue(rs.getString("highDegree")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("highMajor")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(schollType.substring("field".length()),Util.getIntValue(rs.getString("schollType")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(jobCall.substring("field".length()),Util.getIntValue(rs.getString("jobCall")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("schoolName")));
|
||||||
|
|
||||||
|
peopleList.add(Util.null2String(rs.getString("cardNumber")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("bankName")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(highPersonType.substring("field".length()),Util.getIntValue(rs.getString("highPersonType")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(identitys.substring("field".length()),Util.getIntValue(rs.getString("identity")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("workyear")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("socialWorkYear")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("companyworkyear")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("partyPosition")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("tradePosition")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("companystartdate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("startdate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("enddate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("trialStartDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("trialEndDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("regularDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("workStartDate")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(graduatesJoin.substring("field".length()),Util.getIntValue(rs.getString("graduatesJoin")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(proTechnical.substring("field".length()),Util.getIntValue(rs.getString("proTechnical")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(proLevel.substring("field".length()),Util.getIntValue(rs.getString("proLevel")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectPostionType(Util.null2String(rs.getString("postionType"))));
|
||||||
|
peopleList.add(FieldTransUtils.selectPostion(Util.null2String(rs.getString("postion"))));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("beStartDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("beEndDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("belongUnit")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("interStartDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("beJob")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("interEndDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("interLastDay")));
|
||||||
|
peopleList.add(Util.formatMultiLang(education.getEducationLevelname(Util.null2String(rs.getString("onDegree"))),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("onMajor")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(onSchollType.substring("field".length()),Util.getIntValue(rs.getString("onSchollType")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("onSchollName")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(classifiedLevel.substring("field".length()),Util.getIntValue(rs.getString("classifiedLevel")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("joinDeptDate")));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("joinJobDate")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(jobType.substring("field".length()),Util.getIntValue(rs.getString("jobType")),"7"));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(skillLevel.substring("field".length()),Util.getIntValue(rs.getString("skillLevel")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("belongTeam")));
|
||||||
|
peopleList.add(FieldTransUtils.selectItemValue(teamLeader.substring("field".length()),Util.getIntValue(rs.getString("teamLeader")),"7"));
|
||||||
|
peopleList.add(Util.null2String(rs.getString("dingId")));
|
||||||
|
|
||||||
|
peopleList.add(modeId);
|
||||||
|
peopleList.add("1");//创建人
|
||||||
|
peopleList.add(currentDate);
|
||||||
|
peopleList.add(currentTime);
|
||||||
|
|
||||||
|
|
||||||
|
insertList.add(peopleList);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// List<Object> objects = insertList.get(0);
|
||||||
|
// List<List<Object>> var = new ArrayList<>();
|
||||||
|
// var.add(objects);
|
||||||
|
// rs.writeLog("入参:"+var.toString());
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// String sql = "insert into uf_resourcesnip(ryid,ny,bh,xm,xb,yglb,zgzt,zzmm,zjhm,bgyx,zw,rylb,bm,gw,dlm,zhlx,zzh,zt,bgdd,sfzhm,csrq,nl,sg," +
|
||||||
|
// "tz,mz,jg,csd,jkzk,hjdz,xtxdz,hklb,hyzk,lzsj,zjxy,rtsj,cjdpsj,lxzz,yddh,gryx,jjlxrxm,jjlxrgx,jjlxrdh,zgxl,zgxw,zgxlxlzy,byyxlx,zyjszgmc,zgxlxwbyyx," +
|
||||||
|
// "yxkh,yxkhxqc,hzsgccrcxx,grsf,gl,kjshgl,sl,dnzw,ghzw,rzrq,htksrq,htjsrq,syqksrq,syqjzrq,zzrq,sccjgzsj,sfyjsrz,zyjszgxl,zyjszgjb,ywzwxl,ywzwcj," +
|
||||||
|
// "pzqssj,pzzzsj,ldgxszdw,sxksrq,pzryszdwdrzwgw,sxdqrq,sxzhgzr,zdxl,zdzy,zdyxlx,zdyx,smdj,jrdqbmsj,jrdqgwsj,gwlb,zyjndj,szbz,sfwbzc,ddid,formmodeid," +
|
||||||
|
// "modedatacreater,modedatacreatedate,modedatacreatetime) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +
|
||||||
|
// "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
|
//
|
||||||
|
// rs.executeBatchSql(sql,var,null);
|
||||||
|
|
||||||
|
|
||||||
|
RecordSetTrans rsTrans = new RecordSetTrans();
|
||||||
|
try {
|
||||||
|
rsTrans.setAutoCommit(false);
|
||||||
|
rsTrans.executeUpdate("delete from uf_resourcesnip where ny = ?",month);
|
||||||
|
//throw new RuntimeException("当月数据已存在,请去对应人员快照表删除后重新记录");
|
||||||
|
String sql = "insert into uf_resourcesnip(ryid,ny,bh,xm,xb,yglb,zgzt,zzmm,zjhm,bgyx,zw,rylb,bm,gw,dlm,zhlx,zzh,zt,bgdd,sfzhm,csrq,nl,sg," +
|
||||||
|
"tz,mz,jg,csd,jkzk,hjdz,xtxdz,hklb,hyzk,lzsj,zjxy,rtsj,cjdpsj,lxzz,yddh,gryx,jjlxrxm,jjlxrgx,jjlxrdh,zgxl,zgxw,zgxlxlzy,byyxlx,zyjszgmc,zgxlxwbyyx," +
|
||||||
|
"yxkh,yxkhxqc,hzsgccrcxx,grsf,gl,kjshgl,sl,dnzw,ghzw,rzrq,htksrq,htjsrq,syqksrq,syqjzrq,zzrq,sccjgzsj,sfyjsrz,zyjszgxl,zyjszgjb,ywzwxl,ywzwcj," +
|
||||||
|
"pzqssj,pzzzsj,ldgxszdw,sxksrq,pzryszdwdrzwgw,sxdqrq,sxzhgzr,zdxl,zdzy,zdyxlx,zdyx,smdj,jrdqbmsj,jrdqgwsj,gwlb,zyjndj,szbz,sfwbzc,ddid,formmodeid," +
|
||||||
|
"modedatacreater,modedatacreatedate,modedatacreatetime) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +
|
||||||
|
"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
|
|
||||||
|
rsTrans.executeBatchSql(sql, insertList);
|
||||||
|
|
||||||
|
rsTrans.commit();
|
||||||
|
|
||||||
|
//耗时
|
||||||
|
// ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||||
|
// modeRightInfo.setNewRight(true);
|
||||||
|
// modeRightInfo.editModeDataShare();
|
||||||
|
} catch (Exception e) {
|
||||||
|
rsTrans.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue