Commit 2cf3038d by huluobin

update

parent d387373e
...@@ -22,6 +22,8 @@ import java.text.DecimalFormat; ...@@ -22,6 +22,8 @@ import java.text.DecimalFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Accessors(chain = true) @Accessors(chain = true)
@TableName(value = "cost", autoResultMap = true) @TableName(value = "cost", autoResultMap = true)
...@@ -235,6 +237,8 @@ public class CostDomain implements Serializable { ...@@ -235,6 +237,8 @@ public class CostDomain implements Serializable {
private String costCurrentReviewer; private String costCurrentReviewer;
private static final String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则
public CostDto castToDto() { public CostDto castToDto() {
StatusMapper statusMapper = SpringContextUtil.getBean(StatusMapper.class); StatusMapper statusMapper = SpringContextUtil.getBean(StatusMapper.class);
...@@ -256,7 +260,13 @@ public class CostDomain implements Serializable { ...@@ -256,7 +260,13 @@ public class CostDomain implements Serializable {
// 获取文件名 // 获取文件名
String filePath = this.getFilePath(); String filePath = this.getFilePath();
if (null != filePath && filePath.contains("&")) { if (null != filePath && filePath.contains("&")) {
costDto.setFileName(filePath.substring(filePath.lastIndexOf("&") + 1)); String fileName = filePath.substring(filePath.lastIndexOf("&") + 1);
// 去除中文
Pattern pat = Pattern.compile(REGEX_CHINESE);
Matcher mat = pat.matcher(fileName);
costDto.setFileName(mat.replaceAll(""));
} }
// 抵个税 // 抵个税
if (1 == costDto.getCostForm()) { if (1 == costDto.getCostForm()) {
......
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