Commit 4c60c12f by wangli

接口字段变更

1 parent 55d26429
...@@ -15,7 +15,9 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,7 +15,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -88,6 +90,7 @@ public class EngineerServiceImpl implements EngineerService { ...@@ -88,6 +90,7 @@ public class EngineerServiceImpl implements EngineerService {
skill.setEngineerCode(e.getEngineerCode()); skill.setEngineerCode(e.getEngineerCode());
skill.setEngineerName(e.getName()); skill.setEngineerName(e.getName());
skill.setGroupName(groupNames.getOrDefault(e.getGroupId(), "")); skill.setGroupName(groupNames.getOrDefault(e.getGroupId(), ""));
skill.setUpdateTime(this.Timestamp2Datetime(e.getUpdateTime(), "yyyy-MM-dd hh:mm:ss"));
// 获取一个工程师的技能列表 // 获取一个工程师的技能列表
skill.setCategoryIds(engineerSkills.getOrDefault(e.getEngineerCode(), emptySkills)); skill.setCategoryIds(engineerSkills.getOrDefault(e.getEngineerCode(), emptySkills));
...@@ -166,7 +169,7 @@ public class EngineerServiceImpl implements EngineerService { ...@@ -166,7 +169,7 @@ public class EngineerServiceImpl implements EngineerService {
item.setEngineerCode(e.getEngineerCode()); item.setEngineerCode(e.getEngineerCode());
item.setEngineerName(e.getName()); item.setEngineerName(e.getName());
item.setWorkType((e.getKind() == 1) ? "fullJob": "partJob"); item.setKind((e.getKind() == 1) ? "fullJob": "partJob");
b = buss.getOrDefault(e.getEngineerCode(), null); b = buss.getOrDefault(e.getEngineerCode(), null);
if (b == null) { if (b == null) {
...@@ -318,13 +321,13 @@ public class EngineerServiceImpl implements EngineerService { ...@@ -318,13 +321,13 @@ public class EngineerServiceImpl implements EngineerService {
item.setAddress(e.getAddress()); item.setAddress(e.getAddress());
groupName = groups.getOrDefault(e.getGroupId(), ""); groupName = groups.getOrDefault(e.getGroupId(), "");
item.setGroup(groupName); item.setGroupName(groupName);
age = this.getEngineerAge(e.getBirth()); age = this.getEngineerAge(e.getBirth());
item.setAge(age); item.setAge(age);
workType = (e.getKind() == 1) ? "fullJob": "partJob"; workType = (e.getKind() == 1) ? "fullJob": "partJob";
item.setWorkType(workType); item.setKind(workType);
items.add(item); items.add(item);
} }
...@@ -360,4 +363,9 @@ public class EngineerServiceImpl implements EngineerService { ...@@ -360,4 +363,9 @@ public class EngineerServiceImpl implements EngineerService {
} }
return (age <= 0) ? "" : Integer.toString(age); return (age <= 0) ? "" : Integer.toString(age);
} }
private String Timestamp2Datetime(Timestamp t, String pattern) {
DateTimeFormatter df = DateTimeFormatter.ofPattern(pattern);
return df.format(t.toLocalDateTime());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!