generated from dxfeng/secondev-chapanda-feishu
招聘阶段同步,BUG修复
This commit is contained in:
parent
021fc2b8e8
commit
2c0d1833d3
|
|
@ -220,30 +220,32 @@ public class RecruitFlowServiceImpl extends Service implements RecruitFlowServic
|
|||
* @param flowStepId
|
||||
*/
|
||||
private void syncOrder(String stepId, String flowStepId) {
|
||||
List<RecruitStepDt1> stepDt1List = getStepDt1List(stepId);
|
||||
List<RecruitStepDt1> flowStepDt1List = getStepDt1List(flowStepId);
|
||||
List<RecruitStepDt1> stepDt1List = getStepDt1List(stepId);
|
||||
|
||||
// 只保留stepDt1List中相同的元素
|
||||
flowStepDt1List.retainAll(stepDt1List);
|
||||
stepDt1List.retainAll(flowStepDt1List);
|
||||
Map<RecruitStepDt1, String> collect = flowStepDt1List.stream().collect(Collectors.toMap(item -> item, RecruitStepDt1::getId, (k1, k2) -> k1));
|
||||
|
||||
int index = 0;
|
||||
for (int i = 0; i < stepDt1List.size(); i++) {
|
||||
RecruitStepDt1 character = stepDt1List.get(i);
|
||||
if (flowStepDt1List.contains(character)) {
|
||||
RecruitStepDt1 remove = flowStepDt1List.get(index++);
|
||||
stepDt1List.set(i, remove);
|
||||
for (int i = 0; i < flowStepDt1List.size(); i++) {
|
||||
RecruitStepDt1 character = flowStepDt1List.get(i);
|
||||
if (stepDt1List.contains(character)) {
|
||||
RecruitStepDt1 remove = stepDt1List.get(index++);
|
||||
String s = collect.get(remove);
|
||||
remove.setId(s);
|
||||
flowStepDt1List.set(i, remove);
|
||||
}
|
||||
}
|
||||
|
||||
// 调整展示顺序
|
||||
int order = 0;
|
||||
for (RecruitStepDt1 stepDt1 : stepDt1List) {
|
||||
for (RecruitStepDt1 stepDt1 : flowStepDt1List) {
|
||||
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
|
||||
dataMap.put("zssx", order += 10);
|
||||
dataMap.put("id", stepDt1.getId());
|
||||
RecruitRecordSet.updateDataById(dataMap, "uf_jcl_zpjdsz_dt1");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue