修改xml部门字段类型匹配 增加工号功能
This commit is contained in:
parent
80e709a6ae
commit
e94f43df25
|
|
@ -1,7 +1,5 @@
|
|||
package com.weaver.seconddev.xianghui.performance.entity.bo;
|
||||
|
||||
import com.weaver.common.distribution.genid.IdGenerator;
|
||||
import com.weaver.common.hrm.cache.HrmDepartmentComInfo;
|
||||
import com.weaver.common.hrm.util.StringUtils;
|
||||
import com.weaver.common.hrm.util.Util;
|
||||
import com.weaver.common.i18n.tool.util.I18nContextUtil;
|
||||
|
|
@ -84,6 +82,7 @@ public class EbTableMonitorBO {
|
|||
.dclr(getPengdingPerson(hrKpiFlow,employeePO.getTenantKey()))
|
||||
.fbsj(hrKpiFlow.getCreateTime())
|
||||
.bm(hrKpiFlow.getDepartmentId())
|
||||
.gh(hrKpiFlow.getJobNum())
|
||||
.qljbm(deptPath)
|
||||
.zq(formattedDate)
|
||||
.df(hrKpiFlow.getScore())
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public class EbTableMonitorPO {
|
|||
private Date pfzq;
|
||||
private Long khdx;
|
||||
private Long bm;
|
||||
private String gh;
|
||||
private String dqjd;
|
||||
private String dclr;
|
||||
private Date fbsj;
|
||||
|
|
|
|||
|
|
@ -42,9 +42,20 @@ public class EbTableScoreCoefficientPO {
|
|||
* 自定义字段
|
||||
*/
|
||||
private Long bm;
|
||||
private Date nf;
|
||||
private String nf;
|
||||
private BigDecimal zxfs;
|
||||
private BigDecimal zdfs;
|
||||
private String pfxs;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EbTableScoreCoefficientPO{" +
|
||||
"id=" + id +
|
||||
"bm=" + bm +
|
||||
", nf=" + nf +
|
||||
", zxfs=" + zxfs +
|
||||
", zdfs=" + zdfs +
|
||||
", pfxs='" + pfxs + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,5 +81,11 @@ public class HrKpiFlowPO {
|
|||
*/
|
||||
private BigDecimal score;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String jobNum;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ import com.weaver.seconddev.xianghui.performance.entity.po.HrKpiFlowPO;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface EbTableScoreCoefficientMapper extends BaseMapper<EbTableScoreCoefficientPO> {
|
||||
|
||||
List<EbTableScoreCoefficientPO> selectScoreCoefficient(@Param("hrKpiFlowPO") HrKpiFlowPO hrKpiFlowPO,@Param("year") String year,@Param("tenantKey") String tenantKey);
|
||||
List<EbTableScoreCoefficientPO> selectScoreCoefficient(@Param("departmentId") String departmentId,@Param("year") String year,
|
||||
@Param("tenantKey") String tenantKey,@Param("score") BigDecimal score);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,12 @@ public class EbTableMonitorServiceImpl implements EbTableMonitorService {
|
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
||||
year = sdf.format(hrKpiFlowPO.getRealPeriod());
|
||||
}
|
||||
List<EbTableScoreCoefficientPO> coefficientPOList = ebTableScoreCoefficientMapper.selectScoreCoefficient(hrKpiFlowPO, year, tenantKey);
|
||||
String departmentId = Optional.ofNullable(hrKpiFlowPO.getDepartmentId())
|
||||
.map(Object::toString)
|
||||
.orElse("");
|
||||
List<EbTableScoreCoefficientPO> coefficientPOList = ebTableScoreCoefficientMapper.selectScoreCoefficient(departmentId, year, tenantKey,hrKpiFlowPO.getScore());
|
||||
|
||||
|
||||
EbTableScoreCoefficientPO coefficientPO = coefficientPOList.stream()
|
||||
.max(Comparator.comparingLong(EbTableScoreCoefficientPO::getId))
|
||||
.orElse(null);
|
||||
|
|
@ -103,7 +108,7 @@ public class EbTableMonitorServiceImpl implements EbTableMonitorService {
|
|||
try {
|
||||
return new BigDecimal(pfxs);
|
||||
} catch (NumberFormatException e) {
|
||||
log.error("无效的pfxs数值格式: {}", pfxs+"--->"+hrKpiFlowPO.getScore());
|
||||
log.error("无效的pfxs数值格式: {} -> {}", pfxs,hrKpiFlowPO.getScore());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
pfzq = #{record.pfzq},
|
||||
khdx = #{record.khdx},
|
||||
bm = #{record.bm},
|
||||
gh = #{record.gh},
|
||||
dqjd = #{record.dqjd},
|
||||
dclr = #{record.dclr},
|
||||
fbsj = #{record.fbsj},
|
||||
|
|
@ -59,6 +60,7 @@
|
|||
pfzq,
|
||||
khdx,
|
||||
bm,
|
||||
gh,
|
||||
dqjd,
|
||||
dclr,
|
||||
fbsj,
|
||||
|
|
@ -86,6 +88,7 @@
|
|||
#{record.pfzq},
|
||||
#{record.khdx},
|
||||
#{record.bm},
|
||||
#{record.gh},
|
||||
#{record.dqjd},
|
||||
#{record.dclr},
|
||||
#{record.fbsj},
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
<resultMap id="hrKpiFlowResultMap" type="com.weaver.seconddev.xianghui.performance.entity.po.EbTableScoreCoefficientPO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="bm" column="bm"/>
|
||||
<result property="nf" column="nf"/>
|
||||
<result property="zxfs" column="zxfs"/>
|
||||
<result property="zdfs" column="zdfs"/>
|
||||
<result property="pfxs" column="pfxs"/>
|
||||
|
|
@ -12,6 +14,8 @@
|
|||
<select id="selectScoreCoefficient" resultMap="hrKpiFlowResultMap">
|
||||
SELECT
|
||||
id,
|
||||
bm,
|
||||
nf,
|
||||
zxfs,
|
||||
zdfs,
|
||||
pfxs
|
||||
|
|
@ -20,10 +24,10 @@
|
|||
WHERE
|
||||
delete_type = 0
|
||||
AND TENANT_KEY = #{tenantKey}
|
||||
AND bm = #{hrKpiFlowPO.departmentId}
|
||||
AND bm = #{departmentId}
|
||||
AND nf = #{year}
|
||||
AND zxfs <= #{hrKpiFlowPO.score}
|
||||
AND zdfs >= #{hrKpiFlowPO.score}
|
||||
AND zxfs <= #{score}
|
||||
AND zdfs >= #{score}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<result property="createTime" column="create_time"/>
|
||||
<result property="departmentId" column="department"/>
|
||||
<result property="score" column="score"/>
|
||||
<result property="jobNum" column="job_num"/>
|
||||
<!-- 未查询的字段不需要映射,会自动为null -->
|
||||
</resultMap>
|
||||
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
hkf.kpi_current_step,
|
||||
hkf.DATE_TYPE,
|
||||
hkf.score,
|
||||
e.job_num,
|
||||
CASE
|
||||
WHEN hkf.flow_status IN ('noScore', 'noApprove')
|
||||
THEN 'scoreOverTime'
|
||||
|
|
|
|||
Loading…
Reference in New Issue