联特 二开
This commit is contained in:
parent
8d68683f93
commit
0c1c3bab6e
|
|
@ -0,0 +1,3 @@
|
|||
alter table hrsa_hrm_snapshot add column lt_cbzxcode varchar(255);
|
||||
alter table hrsa_hrm_snapshot add column lt_gwpc varchar(255);
|
||||
alter table hrsa_hrm_snapshot add column lt_xcbzsc varchar(255);
|
||||
|
|
@ -431,6 +431,10 @@ public class HrmSnapshotPO {
|
|||
* 联特 成本中心
|
||||
*/
|
||||
private String ltCbzx;
|
||||
private String ltCbzxcode;
|
||||
|
||||
private String ltGwpc;
|
||||
private String ltXcbzsc;
|
||||
|
||||
|
||||
//主键id集合
|
||||
|
|
|
|||
|
|
@ -605,6 +605,15 @@
|
|||
<if test="ltCbzx != null">
|
||||
lt_cbzx,
|
||||
</if>
|
||||
<if test="ltCbzxcode != null">
|
||||
lt_cbzxcode,
|
||||
</if>
|
||||
<if test="ltGwpc != null">
|
||||
lt_gwpc,
|
||||
</if>
|
||||
<if test="ltXcbzsc != null">
|
||||
lt_xcbzsc,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="accountid1 != null">
|
||||
|
|
@ -814,6 +823,15 @@
|
|||
<if test="ltCbzx != null">
|
||||
#{ltCbzx},
|
||||
</if>
|
||||
<if test="ltCbzxcode != null">
|
||||
#{ltCbzxcode},
|
||||
</if>
|
||||
<if test="ltGwpc != null">
|
||||
#{ltGwpc},
|
||||
</if>
|
||||
<if test="ltXcbzsc != null">
|
||||
#{ltXcbzsc},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,14 +39,33 @@ public class HrmSnapshotJob extends BaseCronJob {
|
|||
// 获取联特成本中心数据
|
||||
BaseBean baseBean = new BaseBean();
|
||||
String cbzxField = baseBean.getPropValue("ltSalaryReport", "cbzx_field_name");
|
||||
String cbzxCodeField = baseBean.getPropValue("ltSalaryReport", "cbzx_code_field_name");
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute("select id,"+cbzxField+" from cus_fielddata where scopeid=3 and "+cbzxField+" != '' ");
|
||||
rs.execute("select id,"+cbzxField +","+cbzxCodeField+" from cus_fielddata where scopeid=3 ");
|
||||
HashMap<Long, String> ltCbzxMap = new HashMap<>();
|
||||
HashMap<Long, String> ltCbzxCodeMap = new HashMap<>();
|
||||
while (rs.next()) {
|
||||
ltCbzxMap.put(Long.valueOf(rs.getInt("id")), rs.getString(cbzxField));
|
||||
ltCbzxCodeMap.put(Long.valueOf(rs.getInt("id")), rs.getString(cbzxCodeField));
|
||||
}
|
||||
|
||||
|
||||
String gwpcField = baseBean.getPropValue("ltSalaryReport", "gwpc_field_name");
|
||||
String xcbzscField = baseBean.getPropValue("ltSalaryReport", "xcbzsc_field_name");
|
||||
rs.execute("select id,"+gwpcField +","+xcbzscField+" from cus_fielddata where scopeid=-1 ");
|
||||
HashMap<Long, String> ltGwpcMap = new HashMap<>();
|
||||
HashMap<Long, String> ltXcbzscMap = new HashMap<>();
|
||||
while (rs.next()) {
|
||||
ltGwpcMap.put(Long.valueOf(rs.getInt("id")), rs.getString(gwpcField));
|
||||
ltXcbzscMap.put(Long.valueOf(rs.getInt("id")), rs.getString(xcbzscField));
|
||||
}
|
||||
|
||||
|
||||
hrmSnapshotPOS.stream().forEach(po -> {
|
||||
po.setLtCbzx(Utils.null2String(ltCbzxMap.get(po.getEmployeeId())));
|
||||
po.setLtCbzxcode(Utils.null2String(ltCbzxCodeMap.get(po.getEmployeeId())));
|
||||
po.setLtGwpc(Utils.null2String(ltGwpcMap.get(po.getEmployeeId())));
|
||||
po.setLtXcbzsc(Utils.null2String(ltXcbzscMap.get(po.getEmployeeId())));
|
||||
});
|
||||
|
||||
Date snapshotTime = StrUtil.isNotBlank(appointSnapshotTime) && SalaryDateUtil.checkDay(appointSnapshotTime) ? SalaryDateUtil.dateStrToLocalDate(appointSnapshotTime) : SalaryDateUtil.localDateToDate(LocalDate.now());
|
||||
|
|
|
|||
Loading…
Reference in New Issue