联特科技绩效需求
parent
adecc5ca95
commit
686c6e968b
@ -1,10 +1,14 @@
|
|||||||
package com.api.seclinktel.web;
|
package com.api.seclinktel.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author liang.cheng
|
* @Author liang.cheng
|
||||||
* @Date 2025/6/19 11:03
|
* @Date 2025/6/19 11:03
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
public class PerformanceWorkflowAction {
|
|
||||||
|
@Path("/seclinktel/performance/workflow")
|
||||||
|
public class PerformanceWorkflowAction extends com.engine.seclinktel.web.PerformanceWorkflowAction {
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/20 09:56
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DetailFields {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer rowIndex;
|
||||||
|
|
||||||
|
private double mkz;
|
||||||
|
|
||||||
|
private double mbz;
|
||||||
|
|
||||||
|
private double tzz;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/20 17:18
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DetailFieldsInterview {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer rowIndex;
|
||||||
|
|
||||||
|
private String mkz;
|
||||||
|
|
||||||
|
private String mbz;
|
||||||
|
|
||||||
|
private String tzz;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 14:33
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class QuantitativeData {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
private List<DetailFields> quantFields;
|
||||||
|
|
||||||
|
private List<DetailFieldsInterview> interviewFields;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,24 +0,0 @@
|
|||||||
package com.engine.seclinktel.entity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author liang.cheng
|
|
||||||
* @Date 2025/6/19 14:33
|
|
||||||
* @Description: 定量
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
public class QuantitativeDataPO {
|
|
||||||
|
|
||||||
private Integer rowIndex;
|
|
||||||
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
private double mkz;
|
|
||||||
|
|
||||||
private double mbz;
|
|
||||||
|
|
||||||
private double tzz;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +1,81 @@
|
|||||||
package com.engine.seclinktel.service.impl;
|
package com.engine.seclinktel.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.seclinktel.entity.QuantitativeData;
|
||||||
|
import com.engine.seclinktel.service.PerformanceWorkflowService;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author liang.cheng
|
* @Author liang.cheng
|
||||||
* @Date 2025/6/19 11:12
|
* @Date 2025/6/19 11:12
|
||||||
* @Description: TODO
|
* @Description: TODO
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
public class PerformanceWorkflowServiceImpl {
|
public class PerformanceWorkflowServiceImpl extends Service implements PerformanceWorkflowService {
|
||||||
|
|
||||||
|
private final static Map<Integer, List<String>> fieldMap = new HashMap<Integer, List<String>>() {{
|
||||||
|
put(0, Arrays.asList("q1mjz","q1mbz","q1tzz"));
|
||||||
|
put(1, Arrays.asList("q2mjz","q2mbz","q2tzz"));
|
||||||
|
put(2, Arrays.asList("q3mjz","q3mbz","q3tzz"));
|
||||||
|
put(3, Arrays.asList("q2mjz","q2mbz","q2tzz"));
|
||||||
|
put(4, Arrays.asList("ndmjz","ndmbz","ndtzz"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QuantitativeData buildDetailData(QuantitativeData quantitativeData) {
|
||||||
|
|
||||||
|
List<String> fields = fieldMap.get(quantitativeData.getValue());
|
||||||
|
String join = CollectionUtil.join(fields, ",");
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
if (quantitativeData.getType() == 1) {
|
||||||
|
//1.管理人员个人绩效合约
|
||||||
|
quantitativeData.getQuantFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_glrydyjmb where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.getDoubleValue(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.getDoubleValue(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.getDoubleValue(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
quantitativeData.getInterviewFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_dlrydxjmb where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.null2String(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.null2String(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.null2String(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//2.员工个人绩效合约
|
||||||
|
quantitativeData.getQuantFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_grjhjmb_dt1 where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.getDoubleValue(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.getDoubleValue(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.getDoubleValue(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
quantitativeData.getInterviewFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_grjhjmb_dt3 where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.null2String(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.null2String(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.null2String(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return quantitativeData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue