外部差旅单同步dto

This commit is contained in:
huangxh3 2024-02-01 17:08:14 +08:00
parent 510ea39b50
commit a1159c1bb6
15 changed files with 253 additions and 3 deletions

View File

@ -0,0 +1,18 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 审批人列表
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSApprove {
private String outEmployeeId;//审批人外部员工ID
private Integer approveType;//审批人管控的预定类型
private Integer approveGrade;//审批层级
}

View File

@ -0,0 +1,18 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 城市可预订次数
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSCityBookableQuantity {
private String city;//城市
private String quantity;//次数
private Integer type;//类型
private String policyCode;//差旅政策Code
}

View File

@ -0,0 +1,19 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 成本中心列表
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSCostCenter {
private String costCenterName;//成本中心名称
private String costCenterCode;//成本中心Code
private String costCenterTypeName;//成本中心类型名称
private String costCenterTypeCode;//成本中心类型Code
private Boolean isDefault;//是否默认值
}

View File

@ -0,0 +1,17 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 外部差旅政策
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSDetail {
private String cityName;//城市名称
private Integer maxPrice;//入住标准
private Integer violationStrategy;//违规策略
}

View File

@ -0,0 +1,20 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 差旅内容
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AOSItem {
private String startDate;
private String endDate;
private String departCity;
private String arriveCity;
private String otherCity;
private String baseCity;
}

View File

@ -0,0 +1,19 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 多人入住时入住标准上浮
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSManyPeopleFloating {
private Integer type;//类型
private Integer value;//
private String basePriceType;//基准价模式
private String roomPriceType;//房价模式
}

View File

@ -0,0 +1,16 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 单人入住时入住标准上浮
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSOnePeopleFloating {
private Integer type;//类型
private Integer value;//
}

View File

@ -0,0 +1,21 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 其他城市政策
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSOtherCityTravelPolicy {
private Integer maxPrice;//入住标准
private Integer violationStrategy;//违规策略
}

View File

@ -0,0 +1,24 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 差旅内容
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AOSPerson {
private String name;
private Integer relation;
private Integer passengerType;
private Integer credentialType;
private String credentialNo;
private String credentialExpiredDate;
private String nationality;
private String birthday;
private String mobilePhone;
private String outEmployeeId;
}

View File

@ -0,0 +1,18 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 前置差旅政策
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSPreTravelPolicy {
private String policyCode;//差旅政策Code
private Integer productTypeId;//产品ID
private Integer approveRuleType;//使用差旅单审批规则
}

View File

@ -0,0 +1,17 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 行程提交项
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AOSSubmitItem {
private String code;//行程提交项代码
private String content;//行程提交项内容
}

View File

@ -0,0 +1,38 @@
package com.chint.interfaces.rest.ly.dto.applyordersync;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ApplyOrderSync {
private String outTravelApplyNo;//外部差旅单单号
private Integer travelApplyType;//差旅类型
private String travelApplyTime;//差旅单申请时间
private String travelUpdateTime;//差旅单更新时间
private Integer operationType;//操作类型
private String outEnterpriseId;//外部企业id
private String outEmployeeId;//外部员工ID申请人
private String travelDescription;//差旅内容
private String bookableProducts;//可预订产品
private Integer status;//差旅单状态
private double travelBudget;//差旅申请单预算
private String travelRemark;//其他差旅
private Integer carBookableQuantity;//可用车次数
private Integer bookableQuantity;//机票&火车票可预订数量
private Integer roomBookableQuantity;//酒店可预订间数
private String travelPolicyCode;//差旅政策代码差旅职级
private String redirectUrl;//重定向地址
private List<AOSItem> itemList;
private List<AOSPerson> personList;
private List<AOSPreTravelPolicy> preTravelPolicyList;
private List<AOSOtherCityTravelPolicy> cityTravelPolicies;
private List<AOSSubmitItem> submitItemList;
private List<AOSApprove> approverList;
private List<AOSCostCenter> costCenterList;
}

View File

@ -40,7 +40,9 @@ public class UserHttpRequestImpl implements UserHttpRequest {
private User loadSFAndRank(User user) {
List<UserDataDTO> loadSFInfo = loadSFInfo(user);
String custManaLevel = loadSFInfo.get(0).getCust_manaLevel();
String level = custManaLevel != null ? custManaLevel : loadSFInfo.get(0).getCust_profLevel();
// String level = custManaLevel != null ? custManaLevel : loadSFInfo.get(0).getCust_profLevel();
String level = custManaLevel != null ? custManaLevel : "M0";
if (level.contains("R")) {
level = level.substring(0, level.length() - 3) + "M0";
}

View File

@ -5,7 +5,8 @@ chint:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
host: localhost
# host: 10.9.56.48
port: 3306
database: itinerary_booking
username: root
password: 123456
password: root

View File

@ -19,6 +19,7 @@ public class LTTest {
private LYUserRequest lyUserRequest;
private User user = new User(1L, 230615020L, 1, "卢麟哲", "1033719135@qq.com", "15857193365");
private User hxh = new User(1L, 231116009L, 1, "黄小恒", "1628870217@qq.com", "18296007063");
@Test
void loadToken(){
@ -27,7 +28,8 @@ public class LTTest {
@Test
void saveCurrentUser2Ly(){
BaseContext.setCurrentUser(user);
// BaseContext.setCurrentUser(user);
BaseContext.setCurrentUser(hxh);
System.out.println(lyUserRequest.saveCurrentUser());
}