Commit 6fd00f23 authored by hezhuozhi's avatar hezhuozhi

适配人大金仓

parent 112f157a
...@@ -17,7 +17,6 @@ import com.yeejoin.amos.feign.privilege.util.AesUtil; ...@@ -17,7 +17,6 @@ import com.yeejoin.amos.feign.privilege.util.AesUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -26,8 +25,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -26,8 +25,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
...@@ -66,6 +65,11 @@ public class TestController extends BaseController { ...@@ -66,6 +65,11 @@ public class TestController extends BaseController {
@Autowired @Autowired
FinancingInfoMapper financingInfoMapper; FinancingInfoMapper financingInfoMapper;
public static void main(String[] args) {
String aa = "2024-11-27 18:35:35.0";
LocalDateTime localDateTime = LocalDateTime.parse(aa);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/initTime") @GetMapping(value = "/initTime")
@ApiOperation(httpMethod = "GET", value = "初始时间", notes = "初始时间") @ApiOperation(httpMethod = "GET", value = "初始时间", notes = "初始时间")
...@@ -199,21 +203,28 @@ public class TestController extends BaseController { ...@@ -199,21 +203,28 @@ public class TestController extends BaseController {
log.info("================电子合同时间更新完成========================="); log.info("================电子合同时间更新完成=========================");
} }
private Date dealHour(Object dateString) { private Date dealHour(Object dateString) {
if(Objects.isNull(dateString)){ if (Objects.isNull(dateString)) {
return null; return null;
} }
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
// 转换为 LocalDateTime // 转换为 LocalDateTime
LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString)); // LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString));
// 转换为 Date // 转换为 Date
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); Date date = null;
date = format.parse(String.valueOf(dateString));
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(date); calendar.setTime(date);
// 加8小时 // 加8小时
calendar.add(Calendar.HOUR_OF_DAY, 8); calendar.add(Calendar.HOUR_OF_DAY, 8);
return calendar.getTime(); return calendar.getTime();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
private void dealKcTime() { private void dealKcTime() {
......
...@@ -272,3 +272,5 @@ hygf.icbc.camsPublicKey=655CE8706E6ED9A30B92E57D8D645ADDE8C541C27C5C5AFD529C610C ...@@ -272,3 +272,5 @@ hygf.icbc.camsPublicKey=655CE8706E6ED9A30B92E57D8D645ADDE8C541C27C5C5AFD529C610C
hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB
hygf.icbc.outVendorId=gxjr hygf.icbc.outVendorId=gxjr
hygf.icbc.projectId=PJ140014023565102203 hygf.icbc.projectId=PJ140014023565102203
hygf.sms.maintenanceCode=SMS_HYGF_0005
hygf.sms.repaymentCode=SMS_HYGF_0006
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment