Commit 6fd00f23 authored by hezhuozhi's avatar hezhuozhi

适配人大金仓

parent 112f157a
......@@ -17,7 +17,6 @@ import com.yeejoin.amos.feign.privilege.util.AesUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -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.utils.ResponseModel;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......@@ -66,6 +65,11 @@ public class TestController extends BaseController {
@Autowired
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)
@GetMapping(value = "/initTime")
@ApiOperation(httpMethod = "GET", value = "初始时间", notes = "初始时间")
......@@ -199,21 +203,28 @@ public class TestController extends BaseController {
log.info("================电子合同时间更新完成=========================");
}
private Date dealHour(Object dateString) {
if(Objects.isNull(dateString)){
if (Objects.isNull(dateString)) {
return null;
}
// 转换为 LocalDateTime
LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString));
// 转换为 Date
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
// 转换为 LocalDateTime
// LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString));
// 转换为 Date
Date date = null;
// 加8小时
calendar.add(Calendar.HOUR_OF_DAY, 8);
return calendar.getTime();
date = format.parse(String.valueOf(dateString));
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
// 加8小时
calendar.add(Calendar.HOUR_OF_DAY, 8);
return calendar.getTime();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private void dealKcTime() {
......
......@@ -272,3 +272,5 @@ hygf.icbc.camsPublicKey=655CE8706E6ED9A30B92E57D8D645ADDE8C541C27C5C5AFD529C610C
hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB
hygf.icbc.outVendorId=gxjr
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