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