备份用户部门代码
This commit is contained in:
parent
d7a607571b
commit
41e0ee3906
|
@ -6,7 +6,6 @@ import com.chint.domain.aggregates.system.FsscSystem;
|
||||||
import com.chint.domain.value_object.UserLoginParam;
|
import com.chint.domain.value_object.UserLoginParam;
|
||||||
import com.chint.infrastructure.constant.AuthMessageConstant;
|
import com.chint.infrastructure.constant.AuthMessageConstant;
|
||||||
import com.chint.interfaces.rest.base.PostRequest;
|
import com.chint.interfaces.rest.base.PostRequest;
|
||||||
import com.chint.interfaces.rest.user.PushUser;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -47,7 +46,7 @@ public class User implements Serializable {
|
||||||
private String password;
|
private String password;
|
||||||
private LocalDateTime syncTime;
|
private LocalDateTime syncTime;
|
||||||
@MappedCollection(idColumn = "user_id", keyColumn = "user_key")
|
@MappedCollection(idColumn = "user_id", keyColumn = "user_key")
|
||||||
private List<UserDepartmentInfo> userDepartmentInfo;
|
private List<UserDepartmentInfo> userDepartmentInfoList;
|
||||||
@Transient
|
@Transient
|
||||||
private List<FsscSystem> fsscSystemList;
|
private List<FsscSystem> fsscSystemList;
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -73,9 +72,16 @@ public class User implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public User addDeptInfo(){
|
public User addDeptInfo(UserDepartmentInfo userDepartmentInfo) {
|
||||||
//
|
if (this.userDepartmentInfoList == null) {
|
||||||
// }
|
this.userDepartmentInfoList = new ArrayList<>();
|
||||||
|
}
|
||||||
|
if (userDepartmentInfo.getIfPrimary().equals(1) && !this.userDepartmentInfoList.isEmpty()) {
|
||||||
|
this.userDepartmentInfoList.forEach(it -> it.setIfPrimary(0));
|
||||||
|
}
|
||||||
|
this.userDepartmentInfoList.add(userDepartmentInfo);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public User(Long userId, String employeeNo, Integer employeeLevel, String name, String email, String phoneNumber, UserLoginParam userLoginParam, String standardLevel, String companyCode) {
|
public User(Long userId, String employeeNo, Integer employeeLevel, String name, String email, String phoneNumber, UserLoginParam userLoginParam, String standardLevel, String companyCode) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
@ -109,7 +115,6 @@ public class User implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public User addFssc(String CompanyName, String sysCode) {
|
public User addFssc(String CompanyName, String sysCode) {
|
||||||
FsscSystem fsscSystem = new FsscSystem(CompanyName, sysCode);
|
FsscSystem fsscSystem = new FsscSystem(CompanyName, sysCode);
|
||||||
this.addFsscSystemToList(fsscSystem);
|
this.addFsscSystemToList(fsscSystem);
|
||||||
|
|
|
@ -34,6 +34,137 @@ public class UserDepartmentInfo implements Serializable {
|
||||||
private String departmentNameSeven;
|
private String departmentNameSeven;
|
||||||
private Integer ifPrimary;
|
private Integer ifPrimary;
|
||||||
|
|
||||||
// Builder static inner class
|
public Builder start(User user) {
|
||||||
|
return new Builder(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDepartmentInfo(String companyCode, String companyName, String departmentCodeOne,
|
||||||
|
String departmentNameOne, String departmentCodeTwo, String departmentNameTwo,
|
||||||
|
String departmentCodeThree, String departmentNameThree, String departmentCodeFour,
|
||||||
|
String departmentNameFour, String departmentCodeFive, String departmentNameFive,
|
||||||
|
String departmentCodeSix, String departmentNameSix, String departmentCodeSeven,
|
||||||
|
String departmentNameSeven, Integer ifPrimary) {
|
||||||
|
this.companyCode = companyCode;
|
||||||
|
this.companyName = companyName;
|
||||||
|
this.departmentCodeOne = departmentCodeOne;
|
||||||
|
this.departmentNameOne = departmentNameOne;
|
||||||
|
this.departmentCodeTwo = departmentCodeTwo;
|
||||||
|
this.departmentNameTwo = departmentNameTwo;
|
||||||
|
this.departmentCodeThree = departmentCodeThree;
|
||||||
|
this.departmentNameThree = departmentNameThree;
|
||||||
|
this.departmentCodeFour = departmentCodeFour;
|
||||||
|
this.departmentNameFour = departmentNameFour;
|
||||||
|
this.departmentCodeFive = departmentCodeFive;
|
||||||
|
this.departmentNameFive = departmentNameFive;
|
||||||
|
this.departmentCodeSix = departmentCodeSix;
|
||||||
|
this.departmentNameSix = departmentNameSix;
|
||||||
|
this.departmentCodeSeven = departmentCodeSeven;
|
||||||
|
this.departmentNameSeven = departmentNameSeven;
|
||||||
|
this.ifPrimary = ifPrimary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Builder {
|
||||||
|
private User user;
|
||||||
|
private String companyCode;
|
||||||
|
private String companyName;
|
||||||
|
private String departmentCodeOne;
|
||||||
|
private String departmentNameOne;
|
||||||
|
private String departmentCodeTwo;
|
||||||
|
private String departmentNameTwo;
|
||||||
|
private String departmentCodeThree;
|
||||||
|
private String departmentNameThree;
|
||||||
|
private String departmentCodeFour;
|
||||||
|
private String departmentNameFour;
|
||||||
|
private String departmentCodeFive;
|
||||||
|
private String departmentNameFive;
|
||||||
|
private String departmentCodeSix;
|
||||||
|
private String departmentNameSix;
|
||||||
|
private String departmentCodeSeven;
|
||||||
|
private String departmentNameSeven;
|
||||||
|
private Integer ifPrimary;
|
||||||
|
|
||||||
|
public Builder(User user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder companyInfo(String companyCode, String companyName) {
|
||||||
|
this.companyCode = companyCode;
|
||||||
|
this.companyName = companyName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptOne(String departmentCodeOne, String departmentNameOne) {
|
||||||
|
this.departmentCodeOne = departmentCodeOne;
|
||||||
|
this.departmentNameOne = departmentNameOne;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptTwo(String departmentCodeTwo, String departmentNameTwo) {
|
||||||
|
this.departmentCodeTwo = departmentCodeTwo;
|
||||||
|
this.departmentNameTwo = departmentNameTwo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptThree(String departmentCodeThree, String departmentNameThree) {
|
||||||
|
this.departmentCodeThree = departmentCodeThree;
|
||||||
|
this.departmentNameThree = departmentNameThree;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptFour(String departmentCodeFour, String departmentNameFour) {
|
||||||
|
this.departmentCodeFour = departmentCodeFour;
|
||||||
|
this.departmentNameFour = departmentNameFour;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptFive(String departmentCodeFive, String departmentNameFive) {
|
||||||
|
this.departmentCodeFive = departmentCodeFive;
|
||||||
|
this.departmentNameFive = departmentNameFive;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptSix(String departmentCodeSix, String departmentNameSix) {
|
||||||
|
this.departmentCodeSix = departmentCodeSix;
|
||||||
|
this.departmentNameSix = departmentNameSix;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder primary() {
|
||||||
|
this.ifPrimary = 1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deptSeven(String departmentCodeSeven, String departmentNameSeven) {
|
||||||
|
this.departmentCodeSeven = departmentCodeSeven;
|
||||||
|
this.departmentNameSeven = departmentNameSeven;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDepartmentInfo addToUser() {
|
||||||
|
UserDepartmentInfo userDepartmentInfo = new UserDepartmentInfo(companyCode,
|
||||||
|
companyName,
|
||||||
|
departmentCodeOne,
|
||||||
|
departmentNameOne,
|
||||||
|
departmentCodeTwo,
|
||||||
|
departmentNameTwo,
|
||||||
|
departmentCodeThree,
|
||||||
|
departmentNameThree,
|
||||||
|
departmentCodeFour,
|
||||||
|
departmentNameFour,
|
||||||
|
departmentCodeFive,
|
||||||
|
departmentNameFive,
|
||||||
|
departmentCodeSix,
|
||||||
|
departmentNameSix,
|
||||||
|
departmentCodeSeven,
|
||||||
|
departmentNameSeven,
|
||||||
|
ifPrimary);
|
||||||
|
if (userDepartmentInfo.getIfPrimary() == null || userDepartmentInfo.getIfPrimary() != 1) {
|
||||||
|
userDepartmentInfo.setIfPrimary(0);
|
||||||
|
}
|
||||||
|
user.addDeptInfo(userDepartmentInfo);
|
||||||
|
return userDepartmentInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,7 +288,11 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
||||||
|
|
||||||
// 加载机票信息
|
// 加载机票信息
|
||||||
if (cTripFlightTripInfo != null) {
|
if (cTripFlightTripInfo != null) {
|
||||||
orderFlightRecord.loadTicketInfo(cTripFlightRecord.getTicketNo(),
|
String ticketNo = cTripFlightRecord.getTicketNo();
|
||||||
|
if (ticketNo != null) {
|
||||||
|
ticketNo = ticketNo.replace("-", "");
|
||||||
|
}
|
||||||
|
orderFlightRecord.loadTicketInfo(ticketNo,
|
||||||
String.valueOf(cTripFlightRecordBase.getPrice()),
|
String.valueOf(cTripFlightRecordBase.getPrice()),
|
||||||
cTripFlightTripInfo.getTicketNoStatusName());
|
cTripFlightTripInfo.getTicketNoStatusName());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue