同步代码

This commit is contained in:
lulz1 2024-02-26 09:12:26 +08:00
parent 93a001ce6a
commit c4885c2aa8
14 changed files with 33 additions and 27 deletions

View File

@ -24,7 +24,7 @@ import com.chint.infrastructure.echo_framework.command.Command;
import com.chint.infrastructure.util.DelayDispatch;
import com.chint.interfaces.rest.bpm.BPMParamFactory;
import com.chint.interfaces.rest.bpm.BPMRequest;
import com.chint.interfaces.rest.bpm.dot.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dto.ExceedStandardDto;
import com.chint.interfaces.rest.user.UserHttpRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -51,6 +51,10 @@ public class GlobalExceptionHandler {
while (rootCause instanceof InvocationTargetException && cause != null) {
rootCause = cause;
}
if(cause == null){
rootCause.printStackTrace();
return Result.error("未知错误");
}
Throwable causeCause = cause.getCause();
causeCause.printStackTrace();
return Result.error(causeCause.getMessage());

View File

@ -5,7 +5,7 @@ import com.chint.domain.exceptions.NotFoundException;
import com.chint.infrastructure.constant.BPMConstant;
import com.chint.infrastructure.constant.CommonMessageConstant;
import com.chint.infrastructure.constant.SupplierNameConstant;
import com.chint.interfaces.rest.bpm.dot.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dto.ExceedStandardDto;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;

View File

@ -3,10 +3,10 @@ package com.chint.interfaces.rest.bpm;
import com.chint.domain.aggregates.user.User;
import com.chint.infrastructure.util.BaseContext;
import com.chint.interfaces.rest.base.PostRequest;
import com.chint.interfaces.rest.bpm.dot.BPMBaseRequest;
import com.chint.interfaces.rest.bpm.dot.BPMResponse;
import com.chint.interfaces.rest.bpm.dot.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dot.RescheduleDto;
import com.chint.interfaces.rest.bpm.dto.BPMBaseRequest;
import com.chint.interfaces.rest.bpm.dto.BPMResponse;
import com.chint.interfaces.rest.bpm.dto.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dto.RescheduleDto;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,4 +1,4 @@
package com.chint.interfaces.rest.bpm.dot;
package com.chint.interfaces.rest.bpm.dto;
import lombok.Data;
import lombok.experimental.Accessors;

View File

@ -1,4 +1,4 @@
package com.chint.interfaces.rest.bpm.dot;
package com.chint.interfaces.rest.bpm.dto;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.chint.interfaces.rest.bpm.dot;
package com.chint.interfaces.rest.bpm.dto;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.chint.interfaces.rest.bpm.dot;
package com.chint.interfaces.rest.bpm.dto;
import lombok.Data;
import lombok.experimental.Accessors;

View File

@ -87,7 +87,7 @@ public class CTripEstimateRequest {
.valuationBaseInfo()
.eID(user.getEmployeeNo().toString())
.corpID(C_TRIP_CORP_ID)
// .rankName(user.getRankCode())
.rankName(user.getStandardLevel())
.done()
.valuationProductInfo()
.addFlightProductInfo(flightProductInfo)

View File

@ -95,10 +95,10 @@ public class BookingRelatedApiRequestBuilder {
return this;
}
// public ValuationBaseInfoBuilder rankName(String rankName) {
// baseInfo.setRankName(rankName);
// return this;
// }
public ValuationBaseInfoBuilder rankName(String rankName) {
baseInfo.setRankName(rankName);
return this;
}
public ValuateBudgetRequestTypeBuilder done() {
requestContent.setValuationBaseInfo(baseInfo);

View File

@ -10,7 +10,7 @@ public class ValuationBaseInfo {
// 员工ID
private String eID;
// 职级名称
// private String rankName;
private String rankName;
// Getters and setters...
}

View File

@ -27,6 +27,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Optional;
import static com.chint.infrastructure.constant.RankConstant.STANDARD_LEVEL_THREE;
import static com.chint.infrastructure.constant.SFConstant.OPENAI_BASE_URL;
import static com.chint.infrastructure.constant.SFConstant.USER_DATA_PATH;
@ -59,6 +60,8 @@ public class UserHttpRequestImpl implements UserHttpRequest {
if (ranks != null) {
user.setStandardLevel(ranks.getStandardLevel());
// user.setStandardLevel("测试职级");
} else {
user.setStandardLevel(STANDARD_LEVEL_THREE);
}
return user;
}

View File

@ -9,15 +9,14 @@ import com.chint.interfaces.rest.ly.LYPostRequest;
import com.chint.interfaces.rest.ly.LYTokenRequest;
import com.chint.interfaces.rest.ly.LYUserRequest;
import com.chint.interfaces.rest.ly.dto.applyordersync.*;
import com.chint.interfaces.rest.bpm.dot.BPMBaseRequest;
import com.chint.interfaces.rest.bpm.dot.BPMResponse;
import com.chint.interfaces.rest.bpm.dot.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dot.RescheduleDto;
import com.chint.interfaces.rest.bpm.dto.BPMBaseRequest;
import com.chint.interfaces.rest.bpm.dto.BPMResponse;
import com.chint.interfaces.rest.bpm.dto.ExceedStandardDto;
import com.chint.interfaces.rest.bpm.dto.RescheduleDto;
import com.chint.interfaces.rest.ly.dto.commonresult.Result;
import com.chint.interfaces.rest.ly.dto.estimateprice.*;
import com.chint.interfaces.rest.ly.vo.estimateprice.TrainPriceVo;
import com.google.gson.Gson;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

View File

@ -43,14 +43,14 @@ class RouteApplicationTests {
LocalDateTime parse = LocalDateTime.parse("2024-04-15 23:59:00", dateTimeFormatter);
System.out.println(parse);
}
// @Test
@Test
void loginSign() {
String sfno = "230615020";
String syscode = "abc";
String billcode = "CCC12321412323";
String companycode = "A30000001";
String sfno = "210901385";
String syscode = "FSSC";
String billcode = "CLSQ240226000004";
String companycode = "正泰集团股份有限公司";
String sec = "Superdandan";
String timespan = "12312321412312";
String timespan = "1708908662738";
String s = Digest.md5(sfno + syscode + billcode + companycode + sec + timespan);
System.out.println(s);
}