ariesy 解决时间格式中间加个T

release
yefei 2 years ago
parent e6b9081cc7
commit 40a3549248
  1. 14
      dxhy-customs/src/main/java/com/dxhy/customs/service/impl/CustomsRecordDkrzServiceImpl.java
  2. 9
      dxhy-customs/src/main/java/com/dxhy/customs/service/impl/CustomsSignServiceImpl.java
  3. 13
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/ckzrz/impl/DomesticExportCustomsCkServiceImpl.java
  4. 21
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/ckzrz/impl/DomesticExportInvoiceCkServiceImpl.java
  5. 4
      dxhy-gateway/src/main/resources/bootstrap-test.yaml
  6. 4
      dxhy-operation-flow/src/main/resources/bootstrap-test.yaml

@ -3,6 +3,8 @@ package com.dxhy.customs.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -148,6 +150,12 @@ public class CustomsRecordDkrzServiceImpl extends MpBaseServiceImpl<CustomsRecor
map.put("upgradeStatus", "1"); map.put("upgradeStatus", "1");
map.put("select", true); map.put("select", true);
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
TdxDkCount tDxDkCount = null; TdxDkCount tDxDkCount = null;
TdxTaxCurrent tDxTaxCurrent = null; TdxTaxCurrent tDxTaxCurrent = null;
List<TdxTaxCurrent> tDxTaxCurrents = customsTaxCurrentService List<TdxTaxCurrent> tDxTaxCurrents = customsTaxCurrentService
@ -937,6 +945,12 @@ public class CustomsRecordDkrzServiceImpl extends MpBaseServiceImpl<CustomsRecor
map.put("inAccountStatus","未入账"); map.put("inAccountStatus","未入账");
} }
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
map.put("taxAmount", AmountFormatUtil.fmtMicrometer(MathUtil.round((String)map.get("taxAmount")))); map.put("taxAmount", AmountFormatUtil.fmtMicrometer(MathUtil.round((String)map.get("taxAmount"))));
map.put("yxTaxAmount", map.put("yxTaxAmount",
AmountFormatUtil.fmtMicrometer(MathUtil.round((String)map.get("yxTaxAmount")))); AmountFormatUtil.fmtMicrometer(MathUtil.round((String)map.get("yxTaxAmount"))));

@ -46,6 +46,8 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
/** /**
@ -126,6 +128,13 @@ public class CustomsSignServiceImpl extends MpBaseServiceImpl<CustomsRecordDao,
if (map.get("fillInDate") != null) { if (map.get("fillInDate") != null) {
map.put("fillInDate", map.get("fillInDate")); map.put("fillInDate", map.get("fillInDate"));
} }
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
if ("1".equals(map.get("inAccountStatus"))){ if ("1".equals(map.get("inAccountStatus"))){
map.put("inAccountStatus","已入账"); map.put("inAccountStatus","已入账");
}else { }else {

@ -143,6 +143,11 @@ public class DomesticExportCustomsCkServiceImpl extends ServiceImpl<DomesticExpo
tDxDkCount = tdxDkCounts.get(0); tDxDkCount = tdxDkCounts.get(0);
String fillInDate = (String)map.get("fillInDate"); String fillInDate = (String)map.get("fillInDate");
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
if (!DateUtil.isInTwoDate(tDxTaxCurrent.getSelectStartDate(), tDxTaxCurrent.getSelectEndDate(), if (!DateUtil.isInTwoDate(tDxTaxCurrent.getSelectStartDate(), tDxTaxCurrent.getSelectEndDate(),
fillInDate)) { fillInDate)) {
map.put("select", false); map.put("select", false);
@ -565,10 +570,10 @@ public class DomesticExportCustomsCkServiceImpl extends ServiceImpl<DomesticExpo
if (map.get("rzhDate") != null) { if (map.get("rzhDate") != null) {
map.put("rzhDate", map.get("rzhDate")); map.put("rzhDate", map.get("rzhDate"));
} }
if (map.get("postingTme") != null && map.get("postingTme").toString() != null && StringUtils.isNotEmpty(map.get("postingTme").toString())) { if(map.get("postingTime") != null) {
String postingTime = map.get("postingTme").toString().replace("T"," "); LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
log.info("postingTme={}",postingTime); String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTme", postingTime); map.put("postingTime", format);
} }
// 字典值转换 // 字典值转换

@ -3,6 +3,8 @@ package com.dxhy.domestic.service.ckzrz.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -106,6 +108,12 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo
map.put("inAccountStatus","未入账"); map.put("inAccountStatus","未入账");
} }
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
map.put("exportAmount", AmountFormatUtil map.put("exportAmount", AmountFormatUtil
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString()))); .fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString())));
map.put("exportTaxAmount", AmountFormatUtil map.put("exportTaxAmount", AmountFormatUtil
@ -429,6 +437,12 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo
map.put("inAccountStatus","未入账"); map.put("inAccountStatus","未入账");
} }
if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
map.put("exportAmount", AmountFormatUtil map.put("exportAmount", AmountFormatUtil
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString()))); .fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString())));
map.put("exportTaxAmount", AmountFormatUtil map.put("exportTaxAmount", AmountFormatUtil
@ -533,7 +547,6 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo
String rzhYesorno = (String)map.get("rzhYesorno"); String rzhYesorno = (String)map.get("rzhYesorno");
String invoiceStatus = (String)map.get("invoiceStatus"); String invoiceStatus = (String)map.get("invoiceStatus");
String authStatus = (String)map.get("authStatus"); String authStatus = (String)map.get("authStatus");
String postingTime = map.get("postingTime").toString();
map.put("xh", map.put("xh",
String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1));
@ -550,7 +563,11 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo
map.put("authStatus", dictdetaServcice.queryDictName(DictConstant.AUTH_STATUS_ALL, authStatus)); map.put("authStatus", dictdetaServcice.queryDictName(DictConstant.AUTH_STATUS_ALL, authStatus));
map.put("bdkStatus", dictdetaServcice.queryDictName(DictConstant.BDK_STATUS, bdkStatus)); map.put("bdkStatus", dictdetaServcice.queryDictName(DictConstant.BDK_STATUS, bdkStatus));
map.put("cxrzStatus", dictdetaServcice.queryDictName(DictConstant.CXRZ_STATUS, cxrzStatus)); map.put("cxrzStatus", dictdetaServcice.queryDictName(DictConstant.CXRZ_STATUS, cxrzStatus));
map.put("postingTime", StringUtils.isNotEmpty(postingTime) ? postingTime.replace("T"," ") : ""); if(map.get("postingTime") != null) {
LocalDateTime dateTime = (LocalDateTime) map.get("postingTime");
String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
map.put("postingTime", format);
}
if ("1".equals(map.get("inAccountStatus"))){ if ("1".equals(map.get("inAccountStatus"))){
map.put("inAccountStatus","已入账"); map.put("inAccountStatus","已入账");

@ -4,7 +4,7 @@ spring:
nacos: nacos:
config: config:
# Nacos config 地址 # Nacos config 地址
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.146:33000
# Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace)
namespace: b271ba8e-84d9-4393-88b8-9271aff9465c namespace: b271ba8e-84d9-4393-88b8-9271aff9465c
# Nacos config 分组 # Nacos config 分组
@ -19,7 +19,7 @@ spring:
file-extension: yaml file-extension: yaml
# Nacos discovery 配置 # Nacos discovery 配置
discovery: discovery:
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.146:33000
# Nacos config 登录用户名 # Nacos config 登录用户名
username: admin username: admin
# Nacos config 登录密码 # Nacos config 登录密码

@ -4,7 +4,7 @@ spring:
nacos: nacos:
config: config:
# Nacos config 地址 # Nacos config 地址
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.146:33000
# Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace)
namespace: b271ba8e-84d9-4393-88b8-9271aff9465c namespace: b271ba8e-84d9-4393-88b8-9271aff9465c
# Nacos config 分组 # Nacos config 分组
@ -19,7 +19,7 @@ spring:
file-extension: yaml file-extension: yaml
# Nacos discovery 配置 # Nacos discovery 配置
discovery: discovery:
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.146:33000
# Nacos config 登录用户名 # Nacos config 登录用户名
username: admin username: admin
# Nacos config 登录密码 # Nacos config 登录密码

Loading…
Cancel
Save